beautypg.com

ProSoft Technology AN-X-PB User Manual

Page 43

background image

AN-X-PBSLV Page

37

January 2008

Operation

Description

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.

The count defines how many items of the data type are to be transferred
to the produce block. The maximum value of the count is determined by
the combination of the amount of data defined for the node and the data
operation.

The node can be any valid node number from 1 to 125. The node must
exist in the PROFIBUS configuration for the AN-X.

The area/offset identifies the starting piece of PROFIBUS data for the
node. The area can be I or O. The offset is a byte offset and does not
depend on the data operation. The offset must be a valid offset into the
PROFIBUS data for the node. The area and node must be separated by a
“/” character.

Some examples of area and offset:

I/0

O/243

Consume Section

The consume line marks the start of the consume definitions for an
AN-X. It consists of a comma, followed by the keyword “consume”.

Example:

, consume