LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rs232 read and write from pressure transducer with command.

New to LabVIEW and have my first task. I have connected to a Setra pressure transducer via rs232 in Com port 4. I'm trying to track and log pressure over a given period of time. A command of "P" must be sent to the transducer for it to return a pressure reading. By searching, so far I have VISA open, close, read and write on my block diagram. I tried to create a constant from the VISA read resource name and connect it to COM4, but that did not work. Not sure how to accomplish my goal or how to wire everything up correctly. Any help for a beginner is appreciated.

0 Kudos
Message 1 of 11
(3,535 Views)

Use the example finder (Help->Find Examples...) and search for something along the lines of "simple serial communication".  There is a good example in there.


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 11
(3,534 Views)

I get Error -1073807246 at the VISA configure serial port. It tells me the resource is valid, but the VISA cannot currently access it. Is this because I have not sent a "P" command to the device?

0 Kudos
Message 3 of 11
(3,532 Views)
0 Kudos
Message 4 of 11
(3,530 Views)

That error is due to some process already having exclusive rights to the port.  Do you have Hyperterminal or something else the could be using the COM port open?  Did you not close out the VISA reference during previous runs?


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
Message 5 of 11
(3,527 Views)

You were correct! I had forgotten to close digiquartz, which I used to test my connection. Now I can communicate with the transducer, just trying to get it to give me a pressure reading. I'll be back!

0 Kudos
Message 6 of 11
(3,512 Views)