LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing with an RS-485 instrument

Hi All,

 

Having completed my first project in Labview I have another but I'm not sure where to start.  I have a mass flow controller which has an RS-485 communications protocol.  In the past I have used some old propietry software and a  RS-485/USB converter to control the controller and read it's output.  However, the software no longer works on the new platforms and I would like to use Labview to interface with the controllers.  The problem is, I am new to the world of instrument communications and don't know where to start.

 

My initial questions are:

 

  • Can I use the USB converter to plug into the computer and then use the VISA USB functions to access the data?
  • Or, should I be using the VISA Serial vi's?

I have a couple of good books and of course the vast resources of the internet but it would be great to get some pointers in the correct direction.

 

I look forward to some responses.

0 Kudos
Message 1 of 6
(3,425 Views)

Hi doljam,

 

after installing this USB-RS485 stick you should have an additional COM port available. From LabVIEW you use the VISA Serial functions to communicate over COM ports…

 

I am new to the world of instrument communications and don't know where to start.

To start communication with your device you should read it's manual. THere you will find all information needed (commands, expected responses)!

 

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,421 Views)

Hi and thanks for the response.

 

By checking my device, would you mean the USB-485 device or the device that this is going to be connected to.

 

Many thanks

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

Hi doljam,

 

I mean the "device that this is going to be connected to."

Your USB-RS485 stick should appear as COM port in your Windows device manager and in your VISA resource control…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(3,382 Views)

Hi,

I have just checked the manual for the instrument and unfortunately there is nothing in it which tells me anything about commands etc.  Apparently it can operate on a ProfiBus network if that would be of any help,

 

If I was to use the serial write and read commands in Labview to try and communicate with the instrument, would there be special commands to establish communications with the instrument and would I have to use the Serial Write command to do this.  Alternatively, would there be a generic command to "wake up" the instrument.

 

And lastly, could I just use the serial write command without specifying anything in the data to send?

 

Sorry for all the questions.

0 Kudos
Message 5 of 6
(3,327 Views)
Hi, You can look for the serial commands for your instrument(mass flow meter) in its manual. If it is not in the manual, you can directly contact the vendor/manufacturer of the instrument and ask for programming manual. Once you have got that, use the VISA serial functions to establish connection to the instrument and acquire data. By the way which make is your instrument? you can search for the manual/support on their website as well.
-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


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