Hello,
I have an issue with the analog alarm configuration. I think I kind of found a solution, but I'm still wondering if there's a better way to do it.
Here's the situation... Before I had been using two separate tags: 1 motor_status tag(I/O Integer) and 1 alarm trigger tag (Memory Discrete). If motor_status is equal to 8 OR 18, I set the alarm trigger.
But it was just an awful waste of Intouch tags... So, I decided to redo it with just 1 motor_status tag(I/O Integer). The problem is that I need to set the alarm from 2 values: 8 and 18. I have to use High and HiHi Intouch alarm values, but then it will trigger an alarm if motor_status value is higher than 7..
I've changed that little piece of code:
Now, everything seems to be OK, but still it doesn't look like the best solution to my issue. I'd like to set the alarm properly without having to disable the alarm manually in the script. Also, I don't want to change motor_status logic.
Maybe someone already had similar issue and found a different solution. Any recommendations or tips are valuable .
Regards,
Giedrius K.
I have an issue with the analog alarm configuration. I think I kind of found a solution, but I'm still wondering if there's a better way to do it.
Here's the situation... Before I had been using two separate tags: 1 motor_status tag(I/O Integer) and 1 alarm trigger tag (Memory Discrete). If motor_status is equal to 8 OR 18, I set the alarm trigger.
Code:
IF M1_status == 8 OR M1_status == 18 THEN { M1 fault }
Alarm_Motor1 = 1;
ELSE
Alarm_Motor1 = 0;
ENDIF;
I've changed that little piece of code:
Code:
IF M1_status == 8 OR M1_status == 18 THEN { M1 fault }
{ Alarm_Motor1 = 1;}
M1_status.AlarmDisabled = 0;
ELSE
{ Alarm_Motor1 = 0;}
M1_status.AlarmDisabled = 1;
ENDIF;
Maybe someone already had similar issue and found a different solution. Any recommendations or tips are valuable .
Regards,
Giedrius K.