LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading controller data into LabVIEW through serial connections to controllers?

I'd like to read data from environmental chamber controllers (System Plus) into LabVIEW through RS232 connections.  Has anyone done something similar?

 

I see interfacing with the serial controllers as the biggest obstacle and although not directly related to LabVIEW programming, I'm hoping someone here can give me some advice or resources on how best to do so now days.

 

My first thought is to write a program with VB or C++ to act as a terminal and write the data to a text file for LabVIEW to poll.  Aside from using Telix decades ago to work with BBSes, my only other serial experience consists of interfacing with a Kiethly multimeter using a C++ program. 

 

I would rather not use multiple PCs but I have never worked with more than one serial port on a computer before in the past.  Perhaps LabVIEW itself already provides for multiple serial card communications (wouldn't that be perfect)?

 

Any info would be great.

 

Regards,

 

Dave

 

 

0 Kudos
Message 1 of 7
(3,314 Views)
LabVIEW has had support for serial communication for as long as I've used it and may have been part of version 1. It also supports multiple serial ports - built-in and USB->RS232. There are even a couple of shipping examples. I've not used this particular chamber but I've used several with serial connections. It's a matter of getting the programming manual and working through it if a driver does not already exist. Check with the vendor and see if they have a LabVIEW driver.
0 Kudos
Message 2 of 7
(3,313 Views)

Thanks Dennis.

 

I spoke with Envirotronics and they do not provide the driver for the System Plus controller any longer since there were issues with changing hardware and software.  Their IT department may be able to put something together for me.

 

Using USB->RS232 connections would be nice given the abundant number of USB ports available on modern PCs.

 

Without a driver I see parsing the serial text as a challenge in LabVIEW.  I know how to approach this with a traditional programming language but are there any examples around here of how this is done with LV (most recent version is fine)?

 

Dave

 

0 Kudos
Message 3 of 7
(3,304 Views)
You will need access to a manual that explains the protocol used for the serial communication. Do the units continually send the data without you asking for it?? Or do you have to ask for the data to be sent?? Are you going to read the same data repeatedly?? If you have a sample program that can talk to the units, you can use portmon to reverse engineer the data stream and the results. Labview makes it really easy to parse text data into meaningful info. You will learn a great deal of labview tricks with this project.
0 Kudos
Message 4 of 7
(3,297 Views)
Also, there thousands of existing instrument drivers and a large number of them involve parsing strings. There are even some existing drivers for other brands of chambers. You could also use the Instrument I/O Assistant. There is an automatic parsing mode with that.
0 Kudos
Message 5 of 7
(3,291 Views)

Hi Unclebump,

 

I do have the manual explaining the protocol.

 

The controllers do not send the data continuously.  I will be reading four different data points.  The commands will be as follow:

 

read pv 1

read setpoint 1

read pv 2

read setpoint 2

 

I do not have the format of the results with me but I'm guessing I could edit an example.  I haven't looked for examples in the LabVIEW help yet, I'll start by checking there.

 

Are there any specific VIs/functions that you recommend I look into?

 

Thanks,

 

Dave

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

LabView uses VISA as its interface with serial. There are several shipping examples that explain how to configure and inplement this communication. They are located in LabVIEW >> Example Finder >> Hardware Input and Output >> Serial >> Basic Serial Write and Read. All you need to do is input your commands into the "String to Write" command box.

 

Thanks,

Ryan

 

 

 

 

National Instruments
Applications Engineer
0 Kudos
Message 7 of 7
(3,229 Views)