Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Using RS-485 in LabVIEW

I am attempting to use RS-485 to communicate with a temperature controller in LabVIEW. Based on the example program for RS-485 communication, I am using a property node to set the wire mode to RS485/Wire2-Auto. However, when I do this, I get the error "Error -1073807330 occurred at Property Node, The specified state of the attribute is not valid, or is not supported as defined by the resource."

 

The LabVIEW help for the wire mode property says that for RS485 hardware, the property is only valid with the RS485 serial driver developed by National Instruments. I assume that's the problem, and that I don't have that. However, I have been unable to figure out where to find a download for this driver, and can find no other reference to its existence apart from this note in the help reference.

 

Does anyone know what this driver is, and how to download/use it? Any help would be appreciated.

Thank you very much.

0 Kudos
Message 1 of 6
(6,499 Views)

See if this helps https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MvLSAU

 

https://en.wikipedia.org/wiki/RS-485

RS-485, also known as TIA-485(-A), EIA-485, is a standard defining the electrical characteristics of drivers and receivers for use in serial communications systems.

 

You are going to have to figure out what protocol you want to use with your RS-485 port to write your program.  You can also see if the manufacturer of the temp controller has LabVIEW drivers on their web site.

0 Kudos
Message 2 of 6
(6,458 Views)

Thank you, but I have already read both of those articles. I know the protocol I'm using (Modbus RTU), and I'm using a driver by the manufacturer already. However, I am still having this problem with the Property Node specifically.

 

The original driver was using RS232, which I confirmed by using the read wire mode function of the property node. As far as I can tell, the only change I need to make is changing the wire mode to RS485. However, when I try to do that, I get the aforementioned error. I get the same error if I try to use LabVIEW's example code for RS485 communication, so the problem is definitely with the wire mode property and not with the rest of the program.

0 Kudos
Message 3 of 6
(6,448 Views)

No problem.

 

When I mentioned manufacturer LabVIEW drivers, I meant that some companies like Watlow will supply actual LabVIEW VI's or executable programs that you can use to test communication for troubleshooting.

 

You have not mentioned what hardware you were using for 232 communication and what you are using now for 485 communication.  There might be a setting you need to set with the new hardware?  (dip switch or program?)  You get the message saying the setting is not supported, so try a different setting?

 

If that setting only works with NI hardware and you are not using NI hardware, that could be a problem.  But like I said, I have no idea what hardware you are using.

 

Bryan

 

Did you see this? https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9E8SAK  

Message 4 of 6
(6,435 Views)

Hardware: the device I'm working with is a Eurotherm 2216 temperature controller. I'm using a LabVIEW driver with full VIs that was designed for their 24xx and 22xx products. It is when running these VIs that I get the above error. I'm using a Silicon Labs CP2102 USB to RS485 converter. Windows device manager says that the correct drivers are installed for this device and that it's working properly.

 

Thanks for the link - I hadn't seen that article. However, when I tried to follow its advice, there was no transceiver mode drop-down menu in the advanced settings. This is the same thing I encountered in MAX - another tutorial said there should be a tab for advanced settings which didn't exist on my screen.

 

If I haven't mentioned, I'm using LabVIEW 2016 on a Windows 7 operating system.

0 Kudos
Message 5 of 6
(6,425 Views)

From what you describe the property node throwing the error is designed to work with NI hardware.  You are not using NI hardware, so do not use that property node.  What happens if you take that part of the code out?

 


@AdrianGibson wrote:
The original driver was using RS232, which I confirmed by using the read wire mode function of the property node.

Did you actually read from the controller using RS232 and this program and everything worked fine?

 

 

You can also search the forums for Eurotherm or Eurotherm 2216 and see if anything helps.

0 Kudos
Message 6 of 6
(6,412 Views)