Download NS-Series HMIs (Programmable Terminals) Multivendor
Transcript
3-5 Data Format 3-5-1 Numerals The NS-series PT treats the numeric data stored in FX sequencer as little-endianed. For example, when 16bit integer value 0x1234 is written into D0 from NS, sequencer's memory becomes like right. Another value Address example, 32bit integer 0x12345678 is written, D0 Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Value 0 0 1 0 1 1 0 0 0 1 Value(hex) 0 0 1 0 0 0 0x1234 sequencer's memory becomes like below. Address D0 D1 Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Value 0 0 0 1 1 1 1 0 0 1 0 1 0 1 1 0 0 0 1 Value(hex) 1 0 0 1 0 0 0x5678 0 0 1 0 0 0 0x1234 Even when NS accesses bit devices as a word device, the rule is as same as above. 1 For example, when the Device M Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Value 0 0 1 0 1 1 0 0 0 1 Value(hex) 0 0 1 0 0 0 0x1234 status of M device is like above, M0W becomes 0x1234. 3-5-2 Strings ASCII String For example, when an ASCII string "ABCDEF" is written from NS, sequencer's memory becomes like right. Address D0 D1 D2 D3 Value(char) "AB" "CD" "EF" NULL NULL Value(hex) 0x4241 0x4443 0x4645 0x0000 Please make sure that NS handles string data by 1 word. So when the length of the string is even, two byte of null characters will be appended. Unicode String For example, when a Unicode string "ABCDEF" is written from NS, sequencer's memory becomes like below. Address D0 D1 D2 D3 D4 D5 D6 Value(char) A B C D E F NULL Value(hex) 0x0041 0x0042 0x0043 0x0044 0x0045 0x0046 0x0000 40