peterlink Posted December 8, 2008 Share Posted December 8, 2008 I have some modbus device on rs-485 bus, some time when one of them power lose or can't work fine, I can see alerts in window,but have not device address,I want to know which one is error. pls tell me how can I do. Tks. Link to comment Share on other sites More sharing options...
AzeoTech Posted December 8, 2008 Share Posted December 8, 2008 Two ways: 1) you could put the channels for each device on a different offset. The problem is that you'll probably get lock port errors if one times out and the offsets are too close, so this probably isn't the best solution 2) do your queries from script, then you can catch the timeout for each query and act however you want. Use the mychannel.addvalue() function to stuff the data into your channels. This is talked about in the help under modbus. Link to comment Share on other sites More sharing options...
peterlink Posted December 8, 2008 Author Share Posted December 8, 2008 thank you very much! I decide to use the 2nd way. Link to comment Share on other sites More sharing options...
peterlink Posted December 8, 2008 Author Share Posted December 8, 2008 ok,could you give me CODE exanples to catch the time out? Link to comment Share on other sites More sharing options...
AzeoTech Posted December 8, 2008 Share Posted December 8, 2008 Just surround your queries with a try / catch block: try device.mydevice.readholding.... catch() // error, probably timeout, do something endcatch Link to comment Share on other sites More sharing options...
peterlink Posted December 9, 2008 Author Share Posted December 9, 2008 Thank you very much. Link to comment Share on other sites More sharing options...
thuatnguyenbk Posted August 18, 2015 Share Posted August 18, 2015 Hi admin, i continue this thread. I have 2-3.. devices with modbus rs485 protocol. I used 1 rs485 to ethernet converter to connect these device. On DAQ i create 1 device with ip is ip of converter, and some group of channels, and this is my script: while(1) device.mydevicename.readGroup("myGroupName1") //device1 device.mydevicename.readGroup("myGroupName2") //device2 device.mydevicename.readGroup("myGroupName3") //device3 ... delay(5) endwhile DAQ Work fine when all devices are online. but when one of them is off (power off), i have some issues with this: data so slow, not correct,... . the timeout error is also appear but this ok. please help me on this problem. why data not correct?... and when the off device is turn on again, i must restart daqfactory . Thanks so much. Link to comment Share on other sites More sharing options...
AzeoTech Posted August 20, 2015 Share Posted August 20, 2015 It is hard to say. What happens if you comment out the readGroup for a device and then turn that device off. Do you still see wrong data and slowness? Link to comment Share on other sites More sharing options...
thuatnguyenbk Posted August 21, 2015 Share Posted August 21, 2015 hi admin, thanks for reply. when comment out the readGroup for a off device, everything is ok. Data is very correct, fast. That error is only appear when i readGroup a off device. And today, i have more a problem, i develop daq in win 7 32bit pro, but when i delivery this daq into winserver 2012 64bit standard, as a runtime license. DAQ so slow to display...., DAQ only 3-4%cpu and 10%Ram. what happen with daq or windowserver ? Thanks so much. Link to comment Share on other sites More sharing options...
AzeoTech Posted August 21, 2015 Share Posted August 21, 2015 Post or email us your .ctl doc. Link to comment Share on other sites More sharing options...
thuatnguyenbk Posted August 22, 2015 Share Posted August 22, 2015 Hi admin, please see attached file Thanks so much. pms.zip Link to comment Share on other sites More sharing options...
AzeoTech Posted August 26, 2015 Share Posted August 26, 2015 Sorry, the zip file is corrupted. Please try 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.