LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble reading from serial instrument and DAq simultaneously.

Solved!
Go to solution

Greetings,

I am having some trouble getting my VI to read from my DAq and a serial instrument at the same time.  If I run the subVI's simultaneously (i.e. subANG is running in one window and subVEL is running in a second window) both return the proper values and behave as I would expect.  However, if I call the subVI's into a parent VI and try to run them both in the same loop structure subANG gets stuck and will not resond with a change in signal.

 

I have also tried to use a stacked or flat sequence to separate out the execution of subVEL and subANG, but I still get the no response from subANG.

 

The most confusing thing is that if I run Parent.VI in one window and then create a copy of subANG (call it '....-copy' or whatever) and run it in a second window, Parent.VI behaves properly and will refresh the readings as they appear in '...-copy'.

 

I have attached 3 files.

(1) subANG.VI     -This reads an RS232 signal from an inclinometer.  The signal is refreshed every 10ms or so.

(2) subVEL.VI      -This reads raw voltage from one channel on the DAq, calculates the mean then converts that into a pressure differential and finally a velocity based on the pressure and temperature inputs. 

(3) ParentVI.VI     -This simply calls and displays the subVI's

 

My guess is that it is a buffer issue, but I am stumped.  Does anybody out there in Labview land know why this might be happening?  All suggestions welcom.

 

 

0 Kudos
Message 1 of 5
(2,190 Views)

Forgot the attachments.  Sorry!

0 Kudos
Message 2 of 5
(2,185 Views)

Oops again.  Uploaded the wrong files.  Please use these for your reference.

0 Kudos
Message 3 of 5
(2,184 Views)

I am noticing it is not an NI DAQ card.  How are you communicating with the DAQ? If it is using a serial port, that could be your problem.

 

I also highly recommend using the VISA drivers for serial communications instead of the serial.llb VIs.


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 4 of 5
(2,176 Views)
Solution
Accepted by topic author BrownBrown

It's not a serial instrument.  It is a UEI PowerDAq with their typical A/D and cable.

 

I did find away to make it work by placing subANG and subVEL into different while loops side by side in ParentVI.

0 Kudos
Message 5 of 5
(2,156 Views)