Data conversions: PLC-2

The PLC-2 does not have any file type specifiers (or file numbers). Within the PLC-2 everything is simply an offset from the beginning of its data table. There is not anything within the packet itself that can specify the data type. But there are different types of data stored within the PLC-2 itself; these are BCD values and binary values. All timer and counter values are stored as BCD numbers, but words containing relays are binary data; the format is really determined by the PLC program and how that program interprets the data. Different instructions interpret the data differently.
Several data type specifiers can be added immediately after the PLC-2 address itself. These specifiers tell DDE which translation mode to use when sending the data to a client. These specifiers are:
N
16-bit signed integer
D
12-bit, 3-digit BCD number
E
16-bit, 4-digit BCD number
DH
12-bit, 3-digit BCD number, displays the hexadecimal value
EH
16-bit, 4-digit BCD number, displays the hexadecimal value
For example in Microsoft Excel, =RSLINX|Testsol!'320,D' returns a 12-bit, 3-digit BCD number. A request for a block of 10 pieces of data in 3-digit BCD, starting at data table address 320 would have the following form, =RSLINX|Testsol!'320,L10,C1,D'.
If a format type is not specified, then a default of type 'N' is used (16-bit signed integer).
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal