Hi all,
System details:
KUKA KR 70 R2100
KR C5 controller
KSS 8.7.x (don't know specific subversion yet, as I'm currently working offline in KUKA.sim)
KUKA.sim 4.1 and WV 6.0
I want to compare a SIGNAL to a REAL as the trigger of an interrupt. I cannot use:
INTERRUPT DECL 11 WHEN BoxTypeSensor <> BOX_SENSOR_LATCH DO FreeOfNextBox_ISR()
As I need a tolerance between the two values of 0.1 at least to trigger the interrupt, since the SIGNAL is oscillating a bit.
I have tried:
INTERRUPT DECL 11 WHEN ABS(BoxTypeSensor - BOX_SENSOR_LATCH) > 0.1 DO FreeOfNextBox_ISR()
But I'm prompted that the ABS statement is not allowed in an interrupt.
Then I tried with a cyclical flag, but my BOX_SENSOR_LATCH value is not initialized before later in the execution, so the interpreter complains that it hasn't been initialized upon creating/declaring the cyclical flag:
$CYCFLAG[1] = ABS(BoxTypeSensor - BOX_SENSOR_LATCH) > 0.1
Any suggestions on comparing two values including a tolerance in an interrupt declaration?