extoan Posted May 15, 2009 Share Posted May 15, 2009 I have some panel meters / batchers working with Modbus RTU and I would like to control it with DaqFactory. I was able to create separate channels for reading and writing to same register: LoC - Read Holding S16(3) W_LoC - Set Register S16(6) Reading is working fine but I have some problem with writing. When I use "Button Component" and "Increment" action, it is working fine and correct value is written. The same thing is if I use action "Set to Advanced". In both cases W_LoC Action channel is selected. The problem is when using Button Component "Set To" - whatever I write I get value 1 written to register. Similar problem I get with Edit Box Component. In this case whatever value is written in edit box value 0 is sent. When I try using Combo box for this I didn't even get any write frame (looking at the Modbus monitor). Can you help? I would really like to use just channels and not device functions if possible. Link to comment Share on other sites More sharing options...
AzeoTech Posted May 15, 2009 Share Posted May 15, 2009 Can you post an example that does this? Also, FYI: with RTU, you can create a single Holding channel for both read and write. Just write to your read channel. That said, its often helpful to use two. Link to comment Share on other sites More sharing options...
extoan Posted May 16, 2009 Author Share Posted May 16, 2009 Here is an example attached. I have removed all except problem. Please let me know what am I doing wrong. Please can you post some working project example or read/write RTU with single holding register. Please put in it different ways how value can be transmitted (using button, edit box, drop down selection etc.). Thanks. SIMEX_SWE_73_test.ctl Link to comment Share on other sites More sharing options...
AzeoTech Posted May 18, 2009 Share Posted May 18, 2009 Your sample worked perfectly for me. What release of DAQFactory are you running? Try deleting the file pmodbusrtu.dll from your DAQFactory directory and then reinstalling DAQFactory on top of your existing installation. Link to comment Share on other sites More sharing options...
extoan Posted May 20, 2009 Author Share Posted May 20, 2009 I did exactly what you said reinstalling and now everything works fine. Thanks Link to comment Share on other sites More sharing options...
AzeoTech Posted May 20, 2009 Share Posted May 20, 2009 Great. I think maybe you had an old modbusrtu protocol driver lingering around. By removing that file and running the installer again, it ensures that the latest was installed. Glad its working for you. Link to comment Share on other sites More sharing options...
extoan Posted May 20, 2009 Author Share Posted May 20, 2009 You mentioned it is good to have separate read and write channels for same register. When would this be better than having only one for both R&W? Link to comment Share on other sites More sharing options...
AzeoTech Posted May 21, 2009 Share Posted May 21, 2009 Having separate ones gives you clear separation between the setting of the value and the readback. Using just one channel, you will get the output variable and the readback in the same channel. This can be confusing sometimes, especially if the value is being changed internally to the PLC. For example, if you had the channel tied to a knob, the knob would move on its own as the PLC changed the value. If the PLC was changing it rapidly, while you were trying to adjust it manually with the knob, you would end up fighting it, never being able to actually move the knob all to your desired setting. Again, this might be what you want, but as I said, often it is not. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.