Bool data type, A bool, Bool – Delta RMC151 User Manual
Page 339
5 Programming
32-bit integer number.
When typing a DINT number, it must not include a decimal point.
32-bit string of bits.
Each bit in a DWORD data type is a boolean and can be individually addressed
by adding "." and then the bit number.
Example: MyDWordVariable.12 is a boolean.
Note:
The DWORD and DINT data types are not interchangeable. A function that
requires a DINT will not accept a DWORD. Use a conversion function to convert
a DWORD to a DINT or a DINT to a REAL.
Boolean, 1 bit, either True or False.
For discrete I/O, On = True, Off = False.
As a bit in a DWORD, 1 = True, 0 = False.
Each bit in a DWORD data type is a boolean and can be individually addressed
by adding "." and then the bit number.
Example: MyDWordVariable.12 is a boolean.
To find the data type of a register, use the Address Selection Tool, or the Register Maps.
Arrays
An array is a numerically indexed sequence of elements of the same data type. The RMC
supports arrays of each 32-bit data type: REAL, DINT, and DWORD. See the Arrays topic
for details.
Internal versus External Data Types
Some registers have different data types depending on whether they are accessed from
user programs or externally, such as from a PLC. The RMC150 Register Map and RMC70
Register Map topics list the external and internal data types of the registers. When
reading from and writing to registers in the RMC via one of the communication protocols,
use the external data type.
The different external and internal data types are intended to make it easier to
communicate with the RMC. Some registers that are DINT or DWORD internally are a
REAL externally, so that the PLC does not have to deal with may different data types.
Converting Data Types
When used in expressions, data types can not be mixed without explicitly converting
them. The following functions convert data to different data types:
•
REAL_TO_DINT(a)
•
DINT_TO_REAL(a)
•
DWORD_TO_DINT(a)
•
DINT_TO_DWORD(a)
See the functions topic for usage details.
5.12.2. BOOL Data Type
deltamotion.com
319