Crimson 3 - complex script for momentary button press

gbeaker

Member
Join Date
Sep 2012
Location
earth
Posts
148
How do I write a complex script for a momentary button press? The reference manual says sleep() isn't recommended for button presses. I am trying to program a button to acknowledge alarms as well as send a fault reset bit to the PLC.

Thanks
 
Sounds like you are making it to complex. Why not just use the action function of your object to turn a tag on associated to your PLC. If you use a Momentary push button action you can put a dwell on the action so it gives the PLC time to see the action.
 
I also need the button to clear/ack the alarms in the HMI. This is my code:

AlarmAcceptAll();
TagsPLC1.FAULT_CLEAR=1;

Right now Im using the plc to bring the fault_clear but back low, but I'd like the HMI to only have it come on momentary.
 
I also need the button to clear/ack the alarms in the HMI. This is my code:

AlarmAcceptAll();
TagsPLC1.FAULT_CLEAR=1;

Right now Im using the plc to bring the fault_clear but back low, but I'd like the HMI to only have it come on momentary.

The only option would be to have a trigger on the FAULT_CLEAR tag set for Active high that sets itself low after a delay.

Thanks
Jeremy
 
I actually prefer to do "momentary" control of HMI functions by having the HMI perform a value write (like the TagsPLC1.FAULT_CLEAR = 1 shown above), and have the PLC logic reset the value to zero after it has done the logical tasks required of it.

I just don't like relying on the HMI to write both a 1 and a 0 in a limited period of time. I've seen too many systems where the HMI was struggling with a lousy network installation and the operators reported "we pushed the button a bunch of times and it got stuck on". (n)
 

Similar Topics

Yes it's very legacy.. but sometimes it's necessary to use old stuff for fun.. and because it's so much cheaper. Crimson 3.0 had the ability to...
Replies
4
Views
1,606
Hello all, I am fairly new to programming HMI's and am working with Crimson 3.1 for the first time. I am trying to recreate an annunciator of...
Replies
12
Views
6,353
I have this complex code tag that returns as a string variable. For some reason it returns the two strings with a ?? between them -- not the...
Replies
2
Views
3,500
I have my L5K file imported into my project, and the tags I need in the "available addresses". Is there a way to access my PLC tags in a complex...
Replies
2
Views
2,943
Hello, I have 6 RTUs all with the same program load. I am trying to setup my HMI with one set of data tags and one set of screens and use a...
Replies
7
Views
5,865
Back
Top Bottom