S5 Item Syntax |
Home Back Next |
The S5 item syntax is set up as shown below:
If the data type is BOOL, the bit number is required:
If the data type is STRING, the string length is required:
Legend: <> mandatory [ ] optional <Area>
1BYTE-oriented means that a byte is addressed for each physical address. WORD-oriented means that a word (16 bits) is addressed for each physical address. <Data type> for Data blocks and extended Data blocks
<Data type> for all other areaes
1 KA Suffix is not possible with string arrays
Notes on counters and timers Counters and timers are always addressed by words. For this reason, the specification of a data type is not required! The start address directly follows the “T” or “C/Z” area. Timers can only be read! Counters can be read and written. Timer values are indicated in seconds (e.g., T = 0.7 => T = 0.7 s = 700 ms). Counters are represented in decimals (0 to 999). <Start address>The start address specifies the addresses starting at which can be read or written. Example: DB5.DW6: Double word 6 of the data block 5 is the start address. Example: MB17: Flag byte 17 is the start address. If the start address is a certain bit, the bit number must also be specified. <.Bit number>The bit number must always be specified when the data type is BOOL. Example: I4.3: bit 3 of input byte 4 – an input bit is addressed here. Example: FX12.1: Bit 1 of flag byte 12 – a flag bit is addressed here. Note: Writing to bits of a S5 PLC is not permitted. Please read the byte/word, set the bit and write the byte/word back. [.Array size]An array (i.e., field, row, data area) is a series of equal elements. An array combines several units of one data type into a field. If, for example, several words are read out from a data block, this is called an array of words. To create an array, the length of the array is added to the standard syntax separated by a dot. Example: DB10DW2.5. For more information on arrays, see also Arrays. [Suffix]A value can be represented in another format with the aid of a suffix. For more information on suffixes, see also Suffixes.
|