Discussion:
Reading controller data into LabVIEW through serial connections to controllers?
(too old to reply)
davey31415
2008-08-15 17:40:32 UTC
Permalink
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  
Dennis Knutson
2008-08-15 18:10:06 UTC
Permalink
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.
davey31415
2008-08-15 18:40:06 UTC
Permalink
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 
unclebump
2008-08-15 18:40:07 UTC
Permalink
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.
Dennis Knutson
2008-08-15 19:10:06 UTC
Permalink
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.
davey31415
2008-08-15 19:10:07 UTC
Permalink
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 1read setpoint 1read pv 2read 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
Loading...