Hello,
My situation is the following.
I have an Beijer Touchpanel with a visualisation configured with the ix developer.
My PLC is a Wago to which I communicate via Modbus TCP.
I need to know on my PLC if the touchpanel is still alive or not.
In most cases this is not time sensitive for example it is ok for me to get an alarm after 90seconds.
So I made a funktion with the scheduler that every minute a bool tag is set and reset and these changes are transfered to the plc.
In the PLC I check for a bit change and if this change doesnt occur in 90 seconds, I know that the touchpanel is not running any more.
Now I have the situation that i need to recognize immediately (max 5 seconds) that if the touchpanel isnt working any longer.
Is there a way to create a script that changes a boolean bit every second because with the scheduler the shortest interval is one minute.
Greetings from germany
Bastian
Time functions
Re: Time functions
Using code from the attached example workspace, you can modify the Timout1 function like this.
You may need to change the tags (Tag1) settings to be "Always Active".
Code: Select all
private static void TimeOut1(Object myObject, EventArgs myEventArgs)
{
if (Globals.Tags.Tag1.Value.Int == 0) {
Globals.Tags.Tag1.Value = 1;
}
else {
Globals.Tags.Tag1.Value = 0;
}
}
- Attachments
-
- SimpleFormTimer.zip
- (30.56 KiB) Downloaded 870 times
Best Regards,
Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer
Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer
-
- Posts: 7
- Joined: Wed Mar 27, 2013 1:55 pm
Re: Time functions
Sorry my question didn't come through.Ron L. wrote:Using code from the attached example workspace, you can modify the Timout1 function like this.
You may need to change the tags (Tag1) settings to be "Always Active".Code: Select all
private static void TimeOut1(Object myObject, EventArgs myEventArgs) { if (Globals.Tags.Tag1.Value.Int == 0) { Globals.Tags.Tag1.Value = 1; } else { Globals.Tags.Tag1.Value = 0; } }
I am wondering where within an iX project would you place a function like TimeOut1 as described above to be executed repeatedly ?
Thanks
Jan