Specify a non-retentive assignment
The non-retentive assignment is different from the regular assignment described above in that the tag in a non-retentive assignment is reset to zero each time the controller:
- Enters the Run mode
A non-retentive assignment has this syntax:
tag [:=] expression ;
where:
Component | Description | |
tag | Represents the tag that is getting the new value; the tag must be a BOOL, SINT,
INT, DINT, or REAL. | |
[:=] | Is the non-retentive assignment symbol. | |
expression | Represents the new value to assign to the tag. | |
If tag is this data type | Use this type of expression | |
BOOL | BOOL | |
SINT | Numeric | |
INT | ||
DINT | ||
REAL |
Provide Feedback