I am trying to figure out where I should place a series of triggered stops. I have a set of conditions that when met, will stop the machine from the gateway side. As of right now, our operators can ignore the ignition components and clear their counters on the machine side. For very obvious reasons, I want to make sure that they are unable to do this. I have a good idea on how to handle the PLC side, but I am leaning towards a gateway script for this?
Here are the very rough outlines of how I plan to create my conditional stops.
#Unique processes to stop gages
if WIP_ID_HEAT =/= LAST WIP_ID_HEAT #HAPPENS ON WIP SCAN
MES.HOLD = True #TIED TO THE E-STOP FUNCTION TO HALT THE MACHINE
AGR_FULL = True
SKID_FULL = True
OPEN 'Pop' SHORT_TOTE_PRINT
OPEN 'Pop' SHORT_SKID_PRINT
if WIP_ID_PART_NUMBER =/= LAST WIP_ID_PART_NUMBER #HAPPENS ON WIP SCAN
MES.HOLD = True
AGR_FULL = True
SKID_FULL = True
where SHORT_TOTE_PRINTED = True #HAPPENS ON SHORT TOTE PRINT
SKID_FULL = True
#Common processes to stop gages ALL PREDICATED ON TAG VALUE SCHANGE
where BATCH_FULL = True
MES.HOLD = True
where SKID_FULL = True
MES.HOLD = True
where AGR_FULL = True
MES.HOLD = True
All tags except for the MES.HOLD tag are pointing to created ignition tags.
Iām thinking the best way might be through a UDT tag pointed at a bit to toggle on the machineās PLC. Use an expression to check the state of a few other tags to toggle the stop on or off. Anyone have any advice from some time they did something similar at their workplace?
I see āscriptingā mentioned in the original post. It also questions āwhereā to put triggered stops. If you have existing views that are aware of the āmachine countsā, perhaps you could put your (āprogram stopā logic) in a viewās script-event, like valueChanged, and check for conditions like . . .
Machine control must not depend on a view or window being open in a client. Unless thereās a heartbeat to stop the machine if the client isnāt on that view/page or window. Any control-like operations should be in gateway scripts/SFCs, or better, in the PLC itself. User interfaces should only provide events to command the process (start/stop/setpoint/recipes) which can then carry on with just the gateway (or just the PLC).
The OP mentions that āoperators can ignore the ignition components and clear their counters on the machine sideā. That statement sort of implies that these ācountsā already exist in a viewās UI. Being somewhat new to Ignition, I thought maybe it would be easiest to have script(s) (nestled in with and close the actual counting logic on the view) that send the āmachine stopsā. Anyway, you make a good point. Iām mainly trying to get a clearer definition or more direct question from the OP
Machine control from HMI is most of the time a bad idea (at least in my experiences). Aside from the points @pturmel suggested, itās also harder to troubleshoot. Let the PLC do what it does best. If the PLC needs input from the HMI, then use a state machine and handshakes.
The plan was to have the machine be unable to resume running until they press a button on a display unique to each group of machines. The reason I was going that direction was to guarantee that as a batch is done, they press the button the collects the batch data and prints a tracking label.
I am starting to think that it would be easier to have the triggers I need them to press be sent from the machine, rather than require the operators to go through two separate processes. Functionally speaking, it should be easier for everyone involved. Is the way I would go about this would be to have a gateway script? I was thinking that an expression tied to the status of a tag (true/false, etc.) would be a pretty solid way to go about it.
Ok, so the process is ārun until completeā, presumably where Ignition can see some status in the PLC that indicates ācompleteā. Use that to enable the batch data capture/print buttons. Include in the print button a write to the PLC that signals to reset the ācompleteā status to allow the next run. Donāt allow anything else to reset that status.
Exactly, but I have 27 identical machines that I would need to change the HMI program for to remove their complete button. Is there any reason I couldnāt tie my logic to the operation of the machineās button?
I donāt see how you can satisfy your desire that the machine not be able to cycle again without printing from Ignition if you donāt change the PLC and/or HMI code. Sorry.
Our end solution was to utilize gateway scripting and an external data source (we used a server side database to keep hands away from our counts), it receives the input from the OPC tags, conducts a machine āstateā evaluation. Using this method allows for unique instancing, weāve also started to tie these into other functionality. Thanks to @pturmel, you had me pointed the right direction from the start.