10.5.9.3. SEND
10.5.9.3. SEND
Explanation | Transmits binary data via the Ethernet communication channel (You may use the PRINT statement when transmitting string data that terminates with null.) | ||
Syntax | <ENETObject>.SEND <BUFV Variable>,<Byte count> | ||
Parameter | BUFV Variable | Buffer variable that stores binary data to be transmitted |
|
Byte Count | Count of bytes to be transmitted | 1~1400 | |
Example | ENET1.BUFV[0],24 ‘Transmit the data of 24 bytes starting from the position of offset 0 in BUFV. ENET1.BUFV[1000],24 ‘Transmit the data of 4 bytes starting from the position of offset 1000 in BUFV. |
When null (0)-terminated string data is to be transmitted, the PRINT statement is generally used. However, as the binary data may have null (0) values in the middle position, the transmission may be terminated in the data’s middle position if the data is transmitted using the PRINT statement.
Accordingly, when binary data is to be transmitted, the ENET.SEND statement capable of transmitting the designated count of bytes should be used.
Work | Data type | Appropriate statement |
Transmission | null-terminated string | |
binary | ENET.SEND | |
Reception | null-terminated string | INPUT |
binary | INPUT |