Validity: Rule, Task
By this keyword, the management of the status of semaphores in profibus or devicenet communication by the user is enabled.
Syntax |
I32 sem_user |
---|---|
Attributes |
Retentive variable. Bit-accessible |
The meaning of the bits is as follows:
Bit |
Hexadecimal value |
Description |
---|---|---|
BIT 0 |
0x1 |
Enables the use of user-controlled data validation enable via the sem_sts keyword (default value 0) |
If, for example, you want to start validating the data configured in the pfb.cfg or dns.cfg file, not at switch on of the system but after a set time or on a condition, the user will initialize the keyword sem_user.0 = 1 and then enable/disable data validation via the keyword sem_sts.
Example
; In the autoexec.stp file: ; disable validation of transmitted data by RTE(default) sem_user.0 = 1 ; in the task: ; after 120 seconds I enable data validation _if (tfb > 120) sem_sts.0 = 1 ... ; I disable data validation _if (disableValidationData) sem_sts.0 = 0 |