Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading from sensor to LabView via rs232 or subVI problem

Solved!
Go to solution

I'm quite new to LabView and not too experienced with instrument control so I was wondering if someone could help me solve my problem?

 

Currently, I'm using 2011 LabView and am trying to read pressures from Pfeiffer's DualGauge pressure sensor (TPG 262) and display the two pressure readings on LabView.  However, when I run my program, the pressure readings are not displayed-- all that is displayed are the default 0.00mBar pressure reading even though the DualGauge sensor's screen displays a reading.  To connect the sensor, I'm using a RS232 cable and have been successful in finding the device on my Device Manager, so I don't think the connection is the problem (I've also seen the port show up in Device Manager when I connected the sensor via RS232 and USB into my computer).  I'm also using Pfeiffer's subVI's in my code, and I suspect that the problem may be in there. 

 

 

Attached is my code and here are the links to the DualGauge manual and LabView software driver from Pfeiffer

 

Dual Gauge Manual-- Pg. 23 and 68 are probably the only things related to the RS232 connection. 

http://www.idealvac.com/files/brochures/Pfeiffer_TPG262_Operating_Instructions.pdf

 

Pfeiffer's DualGauge LabView driver-- Software Dual Gauge LabView Driver 2009

http://www.pfeiffer-vacuum.com/products/measurement/activeline/measurement-equipment/onlinecatalog.a...

 

 

Any help is great appreciated!

-Candice

0 Kudos
Message 1 of 7
(10,045 Views)

Wow.  Those are some horrible looking drivers you go there.  But in general, we can probably assume that they actually work.

 

So my first thought is that you should only call the Initialize and the Close once.  Move the Initialize to run before the loop and the Close after the loop.  The constant opening and closing could be causing all kinds of fun issues with your serial port.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(10,033 Views)

Hi crossrulz,

 

I tried moving the Initialize and Close outisde the loop still nothing.  I've also tried using the Example codes to try and display something but it's still 0,000E+0.

I'm stuck and I don't know what else to test now! 

0 Kudos
Message 3 of 7
(10,005 Views)
Solution
Accepted by topic author candicei
You haven't really tested anything. The device manager and MAX will only show the com port that you have added to the pc. It does nothing to verify that an instrument is actually connected. You could have the wrong com settings or the wrong type of serial cable (null modem is required). I would suggest you start with s program such as hyperterminal, putty, or MAX and try something simple. It seems that you will get an ack returned from the instrument when a correct command is received. Verify that this simple step is happening.
0 Kudos
Message 4 of 7
(9,995 Views)

Hi Dennis_Knutson,

 

Yeah, I just checked and I've gotten the wrong serial cable.  Silly me. Thanks for the tip!

0 Kudos
Message 5 of 7
(9,992 Views)

Hi Candice,

 

where did you get those sub-VI's?

 

I'm looking for a LabView code to readout a Pfeiffer TPG 261. According to the manuals it's the same procedure for 261 and 262.

 

I started from LabView's 'Serial Read and Write' Template. But I only get an error.

 

I'm a complete novice to LabView. So if anyone could help me out in anyway that would be awesome!

0 Kudos
Message 6 of 7
(9,641 Views)

Hi, 

I'm trying to do the same thing as you, however I can't find the driver for the TPG 262, and when I follow your link I'm redirected to somewhere else.

Do you have the driver's file by any chance? 

Thanks,

Diana 

0 Kudos
Message 7 of 7
(7,833 Views)