LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Locks up when hardware is off. VI encolsed.

What I want to do here is: 1) Read the voltage at a pin terminal on a generic D/A board and 2) If the hardware is off, tell the user. The VI reads voltage just fine. However, if the hardware is off, something locks up, and I think it's the Read Serial Port.vi.
Ultimately, this piece of code will go into my larger program and warn the user when the hardware has been turned off.

I'm not using VISA simply because the older vi's have worked fine for me, and I don't have the time right now to "learn" the VISA stuff.

Note: Wherever the program makes reference to an "ADR" board - that's the acqisition board, made by Ontrack. I just send strings to it via serial port and it turns on relays, TTL's, scales voltages, etc.
Richard






0 Kudos
Message 1 of 2
(2,030 Views)
Hi Broken Arrow,

"Bytes at Serial Port.vi" (located in the same .llb as your other serail VI's) will tell you how many bytes are waiting at the port. Use that VI to control how many bytes should be read by the read bytes at port VI.

The way you have your code structured, the code will wait forever to read what you specify (device present or not).

I hope this helps,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 2
(2,030 Views)