LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -1073807330 and -1073807331 in RS-485 Transceiver Control.vi (CFW-11 Inverter Communication Issue)

Hello NI Community,

I’m facing an issue with RS-485 communication using a USB-RS-485 converter to communicate with a CFW-11 inverter through LabVIEW. I've been struggling with Error -1073807330 and Error -1073807331 when configuring the transceiver control in RS-485 Half-Duplex mode.

Here are the details:

System Setup:

  • Device: CFW-11 Inverter (RS-485 2-wire communication)
  • LabVIEW: Version 21
  • Driver: NI-VISA, communicating through a USB-RS-485 converter
  • Protocol: Modbus-RTU
  • Goal: Establish communication to control the inverter and send commands like start/stop, speed reference, etc.

Issue Description:

I’m consistently encountering the following errors:

  • Error -1073807330: VISA (Hex 0xBFFF001E) - "The specified state of the attribute is not valid, or is not supported as defined by the resource."
  • Error -1073807331: VISA (Hex 0xBFFF001D) - "The specified attribute is not defined or supported by the referenced resource."

What I’ve Tried So Far:

  1. RS-485 Mode Selection:

    • Tested all available modes: Wire4, Wire2-EchoDTR, Wire2-CtrlDTR, and Wire2-Auto. Based on the inverter’s configuration, Wire2-Auto should be the correct one, as it is a half-duplex 2-wire communication without the need for DTR control.
  2. VISA Settings:

    • Configured the baud rate, parity, stop bits, and data bits as specified in the CFW-11 manual.
    • Flow Control: Set to none, as the inverter doesn’t require RTS/CTS or DTR/DSR control signals.
    • Termination Character: Disabled, since Modbus-RTU uses time intervals to mark the end of messages, rather than characters like \r\n.
  3. Drivers:

    • Verified that the USB-RS-485 driver and NI-VISA are up to date.
  4. Error Location:

    • The error occurs at the VISA Property Node in the RS-485 Transceiver Control.vi, specifically when setting the RS-485 mode and transceiver control attributes.

Questions:

  • Is there a specific configuration or workaround to resolve these errors when using RS-485 Half-Duplex in LabVIEW?
  • Could this be related to the USB-RS-485 converter driver, or is there a deeper VISA issue with attribute handling?
  • Has anyone successfully established communication with the CFW-11 or similar inverters using Modbus-RTU via RS-485 in LabVIEW? Any specific configuration tips would be greatly appreciated!

Additional Info:

  • I've already disabled attributes like DTR/RTS control and tested with a range of configurations, but no luck so far.
  • The converter seems to function correctly in other basic serial applications, so I’m leaning towards a specific configuration issue in LabVIEW.

I gonna add the manual 

Thank you in advance for your help!

0 Kudos
Message 1 of 12
(496 Views)

Are you using NI USB-485?

If you are using non-NI third-party USB adapter, you won't be able to set the transceiver mode as the NI-VISA driver does not have access to that property.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 2 of 12
(462 Views)

Are you sure? I was able to make it work perfectly in another application just by setting the right command in the VISA Write, and the indicator returned the data correctly, even though the adapter wasn’t from NI.

0 Kudos
Message 3 of 12
(451 Views)

You can still use VISA Write and VISA Read with a non-NI adapter, but certain VISA property like Transceiver Mode only applies to NI adapter.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 4 of 12
(421 Views)

Thanks for the feedback earlier.

I've now adjusted the command and I'm currently sending the following for testing:

01 01 00 10 00 01 CRC

  • 01: Device address
  • 01: Function code (indicating coil read)
  • 00 10: Starting address (in this case, 16 in decimal)
  • 00 01: Number of coils to read
  • CRC: Checksum for integrity

Could you confirm if this looks right for a Modbus-RTU command? I'm still troubleshooting to figure out if the issue is with the command format or something else.

What I get...

MarcusP_0-1729174439217.png

 

0 Kudos
Message 5 of 12
(411 Views)

Why don't you use NI Modbus Library Toolkit for LabVIEW?

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 6 of 12
(378 Views)

... Thanks for the advice, but how do I use this ? 

0 Kudos
Message 7 of 12
(370 Views)

@MarcusP. wrote:

... Thanks for the advice, but how do I use this ? 


  1. Open VI Package Manager.
  2. Search and install the NI Modbus Library.
  3. Open LabVIEW VI. Explore API and examples under Data Communication >> Modbus Library palette.
-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
Message 8 of 12
(343 Views)

Well, thanks for the guide! I was literally lost trying to figure out what I was supposed to do with the name, but now I feel more confident to try it on my own. However, is there any kind of guide or at least a functional example that I could reference? It would really help me understand better

0 Kudos
Message 9 of 12
(316 Views)

I just discovered that it needs to have an Ethernet connection, which unfortunately my device doesn't have. So now I’ll need to continue with my original plan of using VISA to connect. However, I'm still struggling to figure out the correct write value that works with my device. Any suggestions or guidance on how to approach this would be really helpful!

0 Kudos
Message 10 of 12
(300 Views)