PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

samples available becomes 0 or 1

Dear all,
 
in the following vi attached it has to perform the following function:
 
1.The first while loop( read the pressure as analog voltage and regulate the presure regulator thro PWM pulses) will read the data and release the semaphore after the stabilisation time is over (but the loop will not stop at this  moment) once the semaphore is released in the first lop it has to run the second loop once ( in the second loop the relay has to be switched on the specified ON time setting and the relay current has to be measured)
2.The problem what ia m facing is the DAQmx read in the second loop, when i increase the ON time the samples available becomes zero and also when the samples o read in the first loop is increased,the samples available in the second loop decreased
 
pls suggest me something tp get over this problem
 
i use a task for both the analog input read with continous samples mode
 
Thanks in advance
Sekar
0 Kudos
Message 1 of 2
(2,890 Views)
Sekar,

How are you finding the available samples?  If you are using the property node (available Samples Per Channel), that just refers to the number of samples available in the buffer memory.  The board acquires samples and puts them on the buffer and when ever LabVIEW gets a chance it goes and acquires those samples.  If the buffer fills up then an error will occur.  Are you talking about this "samples available"?  If not, could you please elaborate a little on what exactly you mean by available samples.  If you are talking about the number of samples per channel that is being output by the DAQmx read, that should be a constant value every iteration of your while loop.

Also, how is this becoming an issue for you?  Are you getting some kind of error that occurs in your code? 

Thank you,
Raajit L
National Instruments
0 Kudos
Message 2 of 2
(2,866 Views)