Validity: Rule, Task
This variable identifies the servo alarm enable mask.
Syntax |
I32 sam |
---|---|
Attributes |
Bit-accessible |
If enabled, RTE run-time checks the following error with the threshold value giving alarm (11#nn Following Error (Servo system)) if the error exceeds the threshold itself.
The error calculation is done as follows:
•The axis position error is calculated as ip(calculated sa_ip_idx previous sampling) - cp
•The alarm threshold is calculated by reading the contents of the ser_thr and ser_gai variables as follows:
ser_cthr = ser_thr + (iv(calculated sa_iv_idx previous sampling)/ser_gai)
•The values are compared
•If the threshold is exceeded, RTE generates the servo alarm in the alarms stack[11 Following Error(Servo system)]
•The alarm will then be handled by RTE according to the definition of the relevant power set
NOTE: By acting on the predefined variable sys_cfg bit 11 it is possible to force the computation of the threshold calculation itself even if sam is disabled.
Example
; we enable the servo alarm for the 1 axis sam.0 = 1 ; we enable the servo alarm for all 32 axes sam = 0xFFFFFF ; if bit 16 of the variable sam is equal to 1 ; then in sr(1) will be stored the string ; "axis 17 servo alarm enabled" _if(sam.16) sr(1) = "axis 17 servo alarm enabled" |