07-21-2009 06:53 AM
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
07-21-2009 09:19 AM
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.
07-21-2009 09:19 AM
07-21-2009 10:20 AM
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
07-21-2009 10:25 AM
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.
07-21-2009 11:02 AM
Could you please give me more information about Hyperterminal. How do I use it? Where do I get it from?
Nevica
07-21-2009 11:12 AM
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
09-22-2009 04:17 PM
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
09-22-2009 10:42 PM
important note - 628 transducer will not work with 274 or 670