PLC Device
In ST program, you can use PLC Devices directly. Device can be used in the right/left side of the expression and factor of a function.
It is identical to PLC device but it includes a prefix between the device type and address which indicates bit and word.
Following is how to use PLC Device.
Format: DeviceType Prefix DeviceAddress
Prefix
Items | Description |
None | 1-bit device |
X | 1-bit device |
W | Word (16-bit) device |
Example
Examples | Description |
MX00 := 1 | Substitute 1 to M00 (bit) (Turns ON the M00) |
M01 := 1 | Substitute 1 to M01 (bit) (Turns ON the M01) |
DW100 := 100 | Substitute 100 to D100 |
DW101 := 0x100 | Substitute 0x100 (hexadecimal) to D101 |
X, Y, M, K, L, F -> None/X/W
T, C, S -> None/X
D-> X/W
Z, TC, TS, CC, CS -> W