beautypg.com

ProSoft Technology ILX56-MM User Manual

Page 90

background image

Reference

ILX56-MM ♦ ControlLogix Platform

User Manual

InRAx Message Manager for Industrial Communication

Page 90 of 112

ProSoft Technology, Inc.

February 6, 2012

6.3

Base Data Type Conversion Rules

6.3.1 Boolean

Source

Conversion

BOOL

Direct Assignment.

INT8, UINT8, CHAR,
BYTE, INT16, UINT16,

WORD, INT32,

UINT32, DWORD,
INT64, UINT64, or

QWORD

If the source data value is zero, the destination data value will be set to
zero. If the source data value is nonzero, the destination data value will be

set to one.

FLOAT32 or FLOAT64 The source value is rounded to the nearest INT64 value and the above

INT64 to BOOL conversion rule applied.

STRING

The string is converted to INT64 and moved according to the above INT64
to BOOL conversion rule. If the string could not be converted to INT64

(invalid chars, overflow, and so on), a conversion error will result

6.3.2 INT8, UINT8, CHAR, or BYTE

Source

Conversion

BOOL

The source value of zero or one is assigned to the destination.

INT8, UINT8, CHAR,

or BYTE

Direct assignment. If source is unsigned (UINT8, CHAR, or BYTE) and
dest is signed (INT8) a value change may result (255 to -1 for example). If

source is signed and dest is unsigned a value change may result (-2 to 254

for example).

INT16, UINT16,
WORD, INT32,

UINT32, DWORD,

INT64, UINT64, or

QWORD

The most significant source data byte(s) are discarded (possible data loss).

The least significant source data byte is copied to the destination.

FLOAT32 or FLOAT64 The source value is rounded to the nearest INT64 value and the above

INT64 to 8 bit INT conversion rule applied. If the rounded source value will

not fit in an INT64 a conversion error will result.

STRING

The string is converted to INT64 and moved according to the above INT64
to 8 bit INT conversion rule. If the string could not be converted to INT64

(invalid chars, overflow, and so on) a conversion error will result.