Ampm Posted January 17, 2013 Share Posted January 17, 2013 Hi We use Daq Factory to set heating times etc in several buildings on site if a PLC in a building looses power due to a power outage even for a few seconds Daq Factory times out and the just Ignores that PLC until Daq Factory is restarted how do I get Daq Factory to check that PLC again and not just ignore it? Link to comment Share on other sites More sharing options...
AzeoTech Posted January 17, 2013 Share Posted January 17, 2013 I'm assuming the connection is over Ethernet. That's because the socket gets held open, so DAQFactory doesn't know the device shut down, it just thinks its not responding. To get around that, you can create a little watchdog sequence and reinit the port. Lets say you have a channel called "myChannel" on a PLC, and its on the DAQFactory device called "MyPLC" that is Ethernet (works for serial too). Create a sequence that looks something like this: while(1) if (systime() - myChannel.time[0] > 60) device.myPLC.initComm() delay(30) endif delay(30)endwhile[/CODE]You can adjust the times to suit. This will cause the port to reinit if no data arrives for 60 seconds. Link to comment Share on other sites More sharing options...
SteveMyres Posted January 18, 2013 Share Posted January 18, 2013 Also, being turned off and on won't hurt the PLC per se, but if the power quality is such that you have frequent glitches that shut it down, the power quality even while present may not be great. Poor voltage regulation, harmonics, and so on. You may want to add power filters and/or UPS's to your PLCs, just for the sake of better power quality, and then there may also be some software advantages to having the PLC up during an outage or the first portion of it. Link to comment Share on other sites More sharing options...
Ampm Posted January 19, 2013 Author Share Posted January 19, 2013 Thank you very much I assume i'll need to do that for each device, will that cause any problems the software reads and writes to 20 different devices roughly 400 channels in total? Thanks again Link to comment Share on other sites More sharing options...
AzeoTech Posted January 20, 2013 Share Posted January 20, 2013 No, but it means you'll probably need to create 20 different sequences or figure some algorithm so you don't call initComm() more than once a minute. If serial, you can do it faster, but with TCP the timeout determined by windows is quite long. Link to comment Share on other sites More sharing options...
Ampm Posted January 20, 2013 Author Share Posted January 20, 2013 Ok thank you I'll do 20 scripts I think anything else is beyond me thanks for your help again. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.