ProSoft Technology AN-X-PB User Manual
Page 45

AN-X-PBSLV Page
39
January 2008
Operation
Description
U8
Copy one byte to one byte
U16
Copy two bytes to two bytes
U16_SW
Copy and swap two bytes to two bytes
U32
Copy four bytes to four bytes
U32_SW
Copy and swap four bytes to four bytes (first byte is
copied to fourth byte, second byte is copied to third
byte, etc)
U8_TO_U16
Copy one byte to two bytes, unsigned. The high
byte of the destination is set to 0.
S8_TO_S16
Copy one byte to two bytes, signed. If the high bit
in the source byte is set, the byte with the higher
offset in the produce block is 0xff. Otherwise it is 0.
U16_TO_U8
Copy two bytes to one byte, unsigned, ignore the
contents of the upper byte of the source.
U16_TO_U8_OV Copy two bytes to one byte, unsigned. If the upper
byte of the source is non-zero, clamp the destination
at 255. For example if the first byte contains 00 and
the second byte contains 01, the destination is set to
0xFF = 255 decimal.
S16_TO_S8
Copy two bytes to one byte, signed. If the source
value is outside the range of an 8-bit signed integer
(-128 to 127), the value is clamped at –128 or 127.
TIP
To obtain a data operation that isn’t supported, use a combination of data
operations, one in the produce and one in the consume. For example, to
copy a single byte to the high byte of a 16-bit word, use a U8_TO_U16
to copy the byte to a word in the produce block, then use a U16_SW in
the consume to extract the data.
The count defines how many items of the data type are extracted from
the produce block.
The maximum value of the count is determined by the length of node
input data to which the consumed data is being written.
The node can be any valid node number from 1 to 125. The node must
exist in the PROFIBUS configuration for the AN-X and must be one of
the active nodes on the AN-X-PBSLV.
The area/offset identifies the starting piece of PROFIBUS data for the
node. The area must be I. The offset must be a valid offset into the
PROFIBUS data for the node. The range of valid offsets is determined