Wonderware Intouch time delay script

Sake_no_oni

Member
Join Date
Jan 2013
Location
Dnipropetrovsk
Posts
18
Dear Sirs,
I’m writing a script for Intouch 10 that would generate the alarm in case PLC goes into STOP. Alarm is supposed to set when some value stops changing and stands still. For example, we have acquired a measured value for the first time, then we wait, then we measure this value again and then we compare these two values. The problem is that I don’t understand how to arrange a time delay (since I’m quite a noob yet:)). Could you give me some advice please?
Best regards
 
Last edited:
Dear Sirs,
I’m writing a script for Intouch 10 that would generate the alarm in case PLC goes into STOP. Alarm is supposed to set when some value stops changing and stands still. For example, we have acquired a measured value for the first time, then we wait, then we measure this value again and then we compare these two values. The problem is that I don’t understand how to arrange a time delay (since I’m quite a noob yet:)). Could you give me some advice please?
Best regards


What plc are you using?it's easier to change rslogix code using timer (or plc code) and just energize a bit for the intouch to use in visibility animation.
 
What plc are you using?it's easier to change rslogix code using timer (or plc code) and just energize a bit for the intouch to use in visibility animation.


That wouldn't help for testing comms.


I use a 5 Second On/5 Second Off set of flasher timers in the PLC to create a PLC Heartbeat Pulse.

In InTouch, under "Application Scripts" in the "While Running" state I execute this every 500 Msec:

{ Establish a Start-up Delay for Monitoring Communication Faults }
IF Start_Delay < 20 THEN
Start_Delay = Start_Delay + 1;
ENDIF;

This establishes a 10 Second start-up delay to prevent false alarms upon starting the HMI application.

{ Test for Communication Faults }
IF Start_Delay == 20 AND NOT PLC1_Status THEN
PLC1_COM_FLT_TMR = PLC1_COM_FLT_TMR + 1;
ELSE PLC1_COM_FLT_TMR = 0;
ENDIF;
IF PLC1_COM_FLT_TMR >= 20 THEN
PLC1_COM_FLT = 1;
ENDIF;

This creates a "Timer" for testing the status of the heartbeat pulse and trips the alarm if the heartbeat pulse fails to change states for 10 Seconds.

{ Unconditionally Reset Status Bits for Monitoring Communication Faults }
{ PLC Status Bits are Set by PLC Heartbeat Bits in Data Change Scripts }
PLC1_Status = 0;

This Resets the status bit after it is examined, so that it must subsequently be Set by the "Data Change" script, which is triggered by a state change in the PLC Heartbeat Bit.




The "Data Change" script:

Trigger Tagname: PLC1_Heartbeat

PLC1_Status = 1;
PLC1_COM_FLT = 0;



PLC1_Heartbeat is a Discrete I/O Tag addressed to the 5 Second Flash Timer bit (5 Seconds On/5 Seconds Off) in the PLC. All other tags are Memory Tags.

Hope that helps. ;)
 
Last edited:
I want wonderware script/logic for this below condition.
logic is for plc fault mode after timer start.
I'm having two bit B1 & B2.(timer start and timer off)
B1 will goes true (B1= 1),B2 will come true after 30 minute.If B1 goes false before B2 true for two/three minute. one alarm /one bit has to come..if time started ,plc went fault mode before timer off alarm has to home from scada.please help i'm new to wondareware
 

Similar Topics

Hi guys, I have experience with PLC to Excel etc...just starting on using intouch scada screens. I have an Excel sheet that uses mainly...
Replies
1
Views
142
Hola chicos. Tengo un problema con el driver de comucicacion dasabcip 5, y un plc controllogix v34, ya realice la comunicacion pero en ciertos...
Replies
2
Views
156
Hi, I am upgrading a Wonderware SCADA form version 9.5 to version 23. I am able to migrate all the graphic, but when to activate the runtime this...
Replies
8
Views
409
Hi all, I am using OI.GATEWAY.2 to communicate to the PLC using an OPC UA. I can see the tags using an OPC explorer connecting to the...
Replies
0
Views
183
For a while, I have been working with InTouch 10.1. The problem I am currently facing is the need to implement certain functions that do not...
Replies
0
Views
480
Back
Top Bottom