Detecting a Channel Timeout and stoping it


Andreschrosa

Recommended Posts

It would be very useful to be able to do it!

I'm having a problem here: we have several equipments connected in a ethernet-rs485 conversor, if one of then is disconnected from the network or malfunctions, the channels associated with it keep trying to read and time out lagging the other equipment's data flow...

Link to comment
Share on other sites

You can do this on your own. We try not to do too much on our own because there are so many different ways DF is used that what may work for one person may not be appropriate for another.

There are several ways you could do it. Probably the easiest is to make a little sequence that loops around and compares the timestamp on one of the channels on each of the devices and if its greater than some threshold, it cycles through those channels and sets their timing to 0. Truthfully, if you want this much control, you'd probably find it easier to actually do the querying from a sequence, but that is your choice.

Link to comment
Share on other sites

Yes, that much I've been thinking, but I dont wanna restructure all that part as of yet.

The problem is how to know if the equipment has been reconnected/restarted and begin reading it's channels again automaticaly... probably it's not so critical beacause the user will have an alert fire telling him of the devices timing out.

Link to comment
Share on other sites

Yup, that is the trick. You probably want to simply slow down the polling, and only poll one channel or block from the device when you sense a disconnect. Then, when it reconnects (again using time to tell), you can reset the timings back to the original settings.

Link to comment
Share on other sites

Still not working. In the sequence where I send the data to MySQL database I had some code to look at the time of the channel, and if it was delayed for more than X, it would fill all the data with zeros and send. In this same IF statement I put on a execute function to set the channel timing to double the actual value each time the zeros are send to the database. However this didnt prevent the other equipments in the same conversor to begin timing out until they stop reading.

Maybe this is got to do with the number of channels timing out.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.