![MEL M2-iLAN Series Скачать руководство пользователя страница 41](http://html1.mh-extra.com/html/mel/m2-ilan-series/m2-ilan-series_user-manual_1766769041.webp)
M2i-LAN Laser-Scanner manual
HB-M2-iLAN-UDP-E.doc
page 41 of 44
MEL Mikroelektronik GmbH, Breslauer Str. 2, 85386 Eching / Germany
www.MELSensor.de
U
U
D
D
P
P
I
I
m
m
p
p
l
l
e
e
m
m
e
e
n
n
t
t
a
a
t
t
i
i
o
o
n
n
Scanner-IP/Scanner-Port, Rechner-IP/Rechner-Port
The Scanner electronic system sends scan data to computer =
PC-IP: PC-Port-Number
The computer sends commands to the scanner electronic system =
Scanner-IP: Scanner-Port-Number
In the Scanner-electronic unit a UDP-Server is active, as well as in the PC. The scanner data format for
UDP transmission is the same as for TCP. The interface register description is valid for UDP as well as for
TCP.
I
I
P
P
-
-
P
P
r
r
o
o
g
g
r
r
a
a
m
m
m
m
i
i
n
n
g
g
f
f
o
o
r
r
U
U
D
D
P
P
-
-
t
t
r
r
a
a
n
n
s
s
m
m
i
i
s
s
s
s
i
i
o
o
n
n
p
p
r
r
o
o
t
t
o
o
c
c
o
o
l
l
:
:
chTemp[0] = 0x22;
// command
chTemp[1] = 0x55;
// command
chTemp[2] = 0xAA;
// command
chTemp[3] = 0x55;
// command
chTemp[4] = 0xAA;
// command
chTemp[5] = 0x55;
// command
chTemp[6] = 0x00;
chTemp[7] = 0x00;
chTemp[8] = 0x00;
chTemp[9] = 0x00;
chTemp[10] = 0x00;
//RechnerIP (IP of the PC)
chTemp[11] = atoi("192");
chTemp[12] = atoi("168");
chTemp[13] = atoi("123");
chTemp[14] = atoi("117");
//Gateway
chTemp[15] = atoi("192");
chTemp[16] = atoi("168");
chTemp[17] = atoi("123");
chTemp[18] = atoi("1");
//Subnetzmaske (subnet mask)
chTemp[19] = atoi("255");
chTemp[20] = atoi("255");
chTemp[21] = atoi("255");
chTemp[22] = atoi("0");
//ScannerIP (working IP)
chTemp[23] = atoi("192");
chTemp[24] = atoi("168");
chTemp[25] = atoi("123");
chTemp[26] = atoi("224");
//ScannerPort
chTemp[27] = atoi("3000") & 0x00FF;
chTemp[28] = (atoi("3000") & 0xFF00) >> 8;
//RechnerPort (port of the PC)
chTemp[29] = atoi("3000") & 0x00FF;
chTemp[30] = (atoi("3000") & 0xFF00) >> 8;
chTemp[31] = m_bTCPUDPFlag;
m_pCEthernetScannerDlg->SendToCurrentSelectedIP((unsigned char*)chTemp, 32);