Andreschrosa Posted August 18, 2009 Share Posted August 18, 2009 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 More sharing options...
AzeoTech Posted August 19, 2009 Share Posted August 19, 2009 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 More sharing options...
Andreschrosa Posted August 19, 2009 Author Share Posted August 19, 2009 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 More sharing options...
AzeoTech Posted August 19, 2009 Share Posted August 19, 2009 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 More sharing options...
Andreschrosa Posted August 20, 2009 Author Share Posted August 20, 2009 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 More sharing options...
AzeoTech Posted August 20, 2009 Share Posted August 20, 2009 Did you remember to do: channel.restart() Until you do this, any changes to a channel's Timing through script will not take affect. Link to comment Share on other sites More sharing options...
Andreschrosa Posted August 20, 2009 Author Share Posted August 20, 2009 Yes I did channel.restart(). Think it must be the big number of channels that is linked to each equipment, when they timeout they lag the conversor, probably, I have about 130 channels reading stuff from each equipment. So it's 130 channels timing out continuously. Link to comment Share on other sites More sharing options...
AzeoTech Posted August 20, 2009 Share Posted August 20, 2009 Yes, that is why I said you should set the timing of all but one channel to 0 when it goes into fault, that way you only get one timeout as you are testing for reconnect. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.