LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I/O error during VISA Read, Modbus

Hi,

I've got a problem with Modbus read using VISA:

I'm writing to target a 8 characters' command with the address and read length. Then I'm waiting for the target to process the command. Then during the read an I/O error occurs The funny thing is that VISA Read reads 17 bytes on the bus instead of expected 9. Any ideas why?

Download All
0 Kudos
Message 1 of 7
(3,590 Views)

That error message usually means there is something wrong with the serial port or its drivers.

 

What kind of serial port are you using?  RS-232 or RS-485?  Built into PC, or add-on USB connector?  Brand name? Chipset:  FTDI or Prolific?

0 Kudos
Message 2 of 7
(3,576 Views)

hi, We are connected to Climate Chamber (Binder) using FTDI based USB-RS422 adapter, it's set to no echo and no term.

Do you suggest to start with the USB-RS422 adapter?

I've tried to use 3rd party packages like Plasmionique Modbus Master but they return errors. May it also indicate cable?

0 Kudos
Message 3 of 7
(3,561 Views)

My experience is that the FTDI chipsets are better than Prolific.  There may be some people who think the opposite.

 

I'd start off small.  RS-422 is usually a 4-wire configuration with a pair for transmit and a pair for receive.  Try connecting the receive pair to the transmit pair to create a simple loopback.    Then create a simple VI that writes a string then reads it back.  See if you can get that to run without an error.

 

I don't think it is the cable.  You do seem to be getting valid data, or at least within some other stuff.  The error message you posted I would associate more with the driver side of the port, or something the firmware in the port is reporting back to the driver, not something external to the port such as cabling.

0 Kudos
Message 4 of 7
(3,544 Views)

after shorting TXD with RXD I read the buffer without errors.

Should I just ignore this error and excess data in my software?

0 Kudos
Message 5 of 7
(3,535 Views)

That was just a way to prove if the port and the driver were working okay.

 

Are you sure you are using an RS-422 adapter?  RS-422 is unusual nowadays.  Most Modbus devices are more likely to be RS-485.  Then the question is whether it is 2-wire RS-485 or 4-wire RS-485.  (Though honestly, I have yet to hear any good explanation as to what the difference is between 4-wire RS-485 and RS-422.)

 

I'd say double check the specs for the device and what which wiring protocol it uses.  Check to make sure the adapter is configured to work with that and wired accordingly.  I know there are serial ports that require the transmit and receive pins to be connected for them to work.  And it may require in programming that the original message bytes that were echoed back be ignored.  But I don't think that would cause the error message you see or mysterious bytes to appear.

0 Kudos
Message 6 of 7
(3,521 Views)

After 6 weeks of waiting and €550+tax I've got my hands on the RS-422 adapter from Binder.

That was a bad news, the good one is that everything works fine with Binder's adapter.

Apparently they are using RS-422-binder ....

PS buy climate chamber with LAN 😉

PPS driver from binder is poorly written, make your own for robust communication.

0 Kudos
Message 7 of 7
(3,452 Views)