LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vi to Control Baratron Pressure Sensor not working

Hello,

 

I have a VI which has been written to control an MKS baratron pressure sensor. The set-up I have is as follows:

 

MKS Baratron Type 628B Pressure Transducer   --->   MKS Baratron Type 274 Multiplexer  ->  MKS Type 670B Signal Conditioner

 

I have connected the 670 unit to laptop via NI card and 15 pin D type connector (serial).

 

The VI I am running does not work unfortunately and I am seeking advice as to what could be wrong with it.

 

I should be able to change channels on the 670B to read either 1 of 3 selectable channels but this I cannot do. I should see a light change on fron of the unit indicating that a different channel has been selected. Also, It does read some sort of value from the unit but not the correct value. I select the correct port as COM3 with the input stage of the VI.

 

I have attached the VI I am using.

 

Nevica

 

 

0 Kudos
Message 1 of 9
(5,391 Views)

1) You do not have any shift registers, so you will only read one point, then overwrite it each iteration. The only reason it is graphing correctly is because you are using a waveform 'chart' which has data history.

 

2) I would not use sequence structures if i were you, much less stacked sequence structures.

 

3) Why do you think you would be able to select different channels? You dont have any code that would let you select different channels. Instead of using the Instrument I/O Assistant, you could use VISA funtions. This would allow the user to change channels.

Cory K
0 Kudos
Message 2 of 9
(5,378 Views)
Have you tested the communication with Hyperterminal? You should do something like this before writing a single piece of LabVIEW code. Are you sure that the commands do not need a termination character? What NI card are you using? A 15 pin serial cable is odd. Are you sure the cable is wired correctly?
0 Kudos
Message 3 of 9
(5,377 Views)

Hello,

 

In the input/output command of the VI I send the following commands to the unit.

 

com3 - indicates the port on which I read (via a NI PCMCIA card)

write '@0002' - selects channel 3

Query and Parse '@0002'

write '@0100' - pressure mode

Query and Parse '@0100'

write '@020?' request pressure reading

Query and Parse '@020?'

 

 

Unfortunately it does not read the pressure so could be a problem with teh hardware set-up. I will try a different set-up and see if it works!

 

nevica 

 

0 Kudos
Message 4 of 9
(5,365 Views)

You really don't know if it'w writing correctly either. You could have a problem with the cable, the com settings, or the command you are sending.

 

As I said, trying to do anything in LabVIEW is pretty much a waste of time if you can't get it to work with Hyperterminal.

0 Kudos
Message 5 of 9
(5,363 Views)

Could you please give me more information about Hyperterminal. How do I use it? Where do I get it from?

 

Nevica

0 Kudos
Message 6 of 9
(5,354 Views)

IF you are running the Microsoft Windoze Operating System (ie: XP), it should be located from the Start Menu:

 All Programs > Accessories > Communications > HyperTerminal

 

Start HyperTerminal

 

It will ask you to setup a new connection.  Give it a name such as MyCom1 and select any of the icon (the red phone is fine so just click OK).

Select the COMM port in the connect using (example COM1). Click OK

 

Then configure your COM port based on the settings that are recommenced by the manufacturer of the pressure sensor.

It is often but not always 9600, 8, None, 1, None...  but not always... Check what they recommend and use the serial cable that should have been provided with the sensor.

 

 Click OK.

 

Then try sending some commands or at least a carriage return (ENTER) so see if there are any responses from the sensor.

 

R

 

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

Heres a simple program i did for our service dept for testing mks equipment with 232 or 485 ports.

Used for making burn in programs as well as recording data long term.  Got a help menu

Problems communicating almost always the cable. Most of time, cable should be straight thru.

This vi done with 7.0 but doesn't use visa

0 Kudos
Message 8 of 9
(5,191 Views)

important note - 628 transducer will not work with 274 or 670

0 Kudos
Message 9 of 9
(5,161 Views)