Validity: Rule, Task
This keyword provides access to a system integer volatile register.
Syntax |
I32 r (I32 n) |
---|---|
n |
Index of the volatile register r. Minimum representable number: 1 Maximum representable number: RTE.CFG keyword: num_r |
Attributes |
Bit-accessible |
Notes |
The content is lost at power off. At next switch on it is placed = 0 |
Registers are written to and read from all TASKs and RULEs.
Example
; in r(1) will be stored the sum between the contents of r(123) ; and the contents of register r(125) plus 270(45 * 6) r(1) = r(123) + r(125) + 45 * 6 ; in register r(2) will be stored the decimal value 56 r(2) = 56 |
Example
; bit 5 of register r(3) is set equal to 1 r(3).5 = 1 ; if bit 31 of register r(8) is set equal to 1 ; then in the string register sr(1) is stored the string ; "the register r(8) contains a negative number" ; otherwise in the sting register sr(1) is stored ; "the register r(8) contains a positive number" if(r(8).31) sr(1) = "the register r(8) contains a negative number" else sr(1) = "register r(8) contains a positive number" endif |