LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV Modbus library 1.2.1 - Error code 6101 (timeout)

This seems to be a common problem but did not found a clear solution. Timeout (error code 6101) appears randomly during register(s) read in Windows and Real-Time environment and with various computers. No matter which RS232-RS485 converter or short/log cable is used. Does anybody know what is the main reason for this error?

0 Kudos
Message 1 of 19
(4,889 Views)

Since you describe replacing everything except the equipment you're actually talking to, my guess would be that the fault is in that equipment, which maybe fails to reply. That, or your timeout is simply too short.

 

In any case, you should generally treat comm timeouts as a normal condition. While they shouldn't necessarily occur, systems generally don't have 100% reliability and ignoring the occasional timeout error can be healthy. You could keep a running counter to see if the error is actually real and only relate to it if you get N consecutive errors.


___________________
Try to take over the world!
0 Kudos
Message 2 of 19
(4,873 Views)

Thanks for reply, actually the problem appears quite often and with different slave devices too so I thought there might be something with the drivers. Default timeout should be enough for reading.

0 Kudos
Message 3 of 19
(4,856 Views)

Hi, 

 

Are you sure that there is data available to read from the serial port? Even if the timeout is long enough for the actual reading you will run into a timeout error if there is no data available to be read. 

 

/Anton

0 Kudos
Message 4 of 19
(4,818 Views)

Hi,

 

have not verified the serial port but there should be constant values available to read in the registers. Communication between host and device is 2-wire and timeouts appears with RS232-RS485 and USB-RS485 converters, no matter if read one or multiple regs. This seems to be a known issue and there áre many discussions about it.

 

Could it be the same situation with echo as here:

http://forums.ni.com/t5/LabVIEW/need-help-on-modbus-RTU-don-t-know-the-meaning-of-other-output/td-p/...

 

 

 

0 Kudos
Message 5 of 19
(4,812 Views)
As tst said (to paraphrase) stuff happens.This is why I use a rule of 3: An error really isn't an error until it happens 3 times in a row.

Are you using rs232 or rs485? How long are the cables? How long are the timeouts? How fast is the data rate? What sort of environment does the cable run thorough? What are the devices that you are talking with?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 19
(4,807 Views)

Yes, it's always possible to ignore 6101 and retry until register is successfully read but lengthy reading delays are not allowed in this application.

 

A normal desktop PC's with RS232-RS485 or USB-RS85 converter attached and compact field points with RS232-RS485 converter attached. Serial port settings are set according to slave device (controllers, freq converters etc) requirements and VI timeout is default 5000 ms. Cabling is short ~2m and noisy free office environment.

0 Kudos
Message 7 of 19
(4,794 Views)
So the devices are compact FP? Why are you mucking around with Modbus? What modules do you have?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 19
(4,790 Views)

@mbr wrote:

...but lengthy reading delays are not allowed in this application.


I would suggest considering shortening the timeout. 5000 is a long time for something like this. It depends on the amount of data and the actual equipment, but generally, if you don't get a response within ~1000 ms, it's a timeout. Depending on the system, you can often set it to be much lower too (50-500 ms).


___________________
Try to take over the world!
0 Kudos
Message 9 of 19
(4,783 Views)

That's true, 500ms should be enough when there are no timeout problems.

 

Mike, host devices are PCs or cFPs, slave devices are controllers, freq converters etc and RS232-RS485 converters are connected between hosts serial port and slave devices rs485 ports.

0 Kudos
Message 10 of 19
(4,775 Views)