03-10-2007 11:46 AM
03-10-2007 02:26 PM
I can't look at your VI, but Modbus has some limit which I can't remember at the moment which means you can't read a large number of registers using a single read.
The timeout settings should help, but if I remember correctly, the NI read VI has a loop which reads a single byte at a time and includes a 10 ms wait, which might make your comm take too long if you have a large packet. You should look inside the VIs to see how they implement the communication and change it or use other Modbus VIs, which can also be found on the web.
03-10-2007 02:52 PM
03-10-2007 03:12 PM
03-10-2007 06:58 PM
03-12-2007 09:38 AM
Thank you very much tst and uncle bump for your help.
Now I know why I could just get 110 Modbus registers in one read. Also I made some tests and I've realize that if the number of modbus registers to be read, increases, I have to increase the timeout in the MB Serial Master Query.vi (approximatedly 2 sec with 110 registers to read if I don't want to get the 6101 error).
However, in according with your comments I think it depends on the Modbus device, because I also got data from another Modbus device, but I could just read 40 modbus registers in one read.
A last question is if timeout errors (such as 6101 error) depend on the speed and security of a network (WAN) if I am using virtual ports? The problem that I have is the Modbus program works in some networks but in other ones there are a lot of 6101 errors and the data aren't right in most of the reads.
By the way, the program is in LabVIEW 8.2 and I can't change the version.
Thanks again, and I hope you can help me.
Juan Carlos.
03-12-2007 10:16 AM
03-12-2007 02:31 PM
03-14-2007 06:55 PM
Hi everyone,
I solved my problem requesting three times the data to my Modbus equipment. Before I requested 110 data at the first time and 20 in the second. Now I request 48 at the first time, 64 at the second time and 10 at the third time and the program almost doesn't have 6101 timeout errors. I attached a picture of this.
Thanks everyone for your help.
Juan Carlos