Chapter
4
Reference Manual
IVC-2D
188
©
SICK AG • Advanced Industrial Sensors • www.sick.com • All rights reserved
Communication
Write Ethernet Bytes Formatted
This tool is used for sending multiple bytes with a specified format to another device over
an Ethernet connection.
The tool sends the values from the table starting at row number
Table index
and continues
with the following rows until
Number of value
values has been sent.
In order to send data to a device, a connection to that device must have been opened with
the 'Open Ethernet Raw' tool. The program step in which the connection was opened is
used as the parameter
Open Step
.
Formatting string
The format of the information to send is specified in a string where the type and precision
is specified for each value. The binary data is formatted according to the IEEE-754 stan-
dard. The following formats are available:
Format Description
Ix
Integer with x bytes (1, 2 or 4 bytes)
Fy
Float with y bytes (4 or 8 bytes)
Uz
Unsigned integer with z bytes (1, 2 or 4 bytes)
Pn
Pad with n bytes (0-999 bytes). The padded bytes will be set to 0.
The format specified in the sting will have precedence over the format in the table cell. E.g.
if the table cell holds a float, and the string specifies an integer, the value will be truncated
to an integer.
For padding bytes, no table cell is accessed.
Example:
If the telegram holds two integers with 2 bytes, one integer with 4 bytes and three floats
with 4 bytes, the string shall have the following format:
I2I2I4F4F4F4
Input Parameters
01=Open step
The program step in which the connection was opened.
02=Timeout
The time in milliseconds during which the camera will try to
send data. This includes the time it takes to establish the
connection, if necessary.
03= Table index
Table row in which the first value to send is stored.
04= Number of values
The number of values to send.
05= Format string
A string specifying how the values shall be formatted. See
table above.
06= Endian
Controls Little or Big Endian for the byte order of the trans-
mitted data.
Returned Values
01=Sent bytes
The total number of bytes that was sent.
Error Messages
Err. = 1
The program step referred to by
01=Open step
is not an
'Open Ethernet Raw' step.
The Emulator does
not emulate this
tool. See section
Handling the
Emulator for more
information.