Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

task daqmx problem

HI!
 
I made two versions of my program. In the first version, the "Start Task.vi, Clear Task.vi,..." are in the inside of the while loop. In the second version, the "start task vi" and the "clear task vi" are in the outside of the while loop. When i start the two versions, i get two separate dates!
I think there is something wrong, but i didn*t find the failure!
 
Could somebody help me??
 
Best regards,
 
Peter
Labview 7.1 on Windows 2000
0 Kudos
Message 1 of 9
(3,216 Views)
sorry i forgot the second picture!
Labview 7.1 on Windows 2000
0 Kudos
Message 2 of 9
(3,214 Views)
Please answer the following questions:
What are you measuring? Are these static DC signals?
Which measured values do you think are correct?
What board type are you using?
Which NI-DAQmx driver version are you using?

As a general rule you should avoid running Start Task and Clear Task within a loop.

Best regards,

Jochen
0 Kudos
Message 3 of 9
(3,190 Views)
I measure two analog signals.
I think both values are correct, but the second program measures only a little range of the data.
I get a analog voltage signal from my distance laser and i measure the distance to a object. If my object is in the outside of the range from the laser, the analog voltage is around ~0,010mV. In the neutral position my laser sends around 10mV to the Multifunction Card and when he measures the object, the output signal is about 5V.
The problem is, when i want to measure with my laser, the while - loop will only run for a little time. The loop runs in that time, which the object is out of the range. So because of that i don*t get all the data which i need, only the data from the neutral position. In the first program ( the task are running inside of the loop) i get all my data, but the computer needs some time for starting the task every loop-cycle, so i my datarange is not so big! 
 
I have installed a M-6250 Card in my Computer and the driver version is 3.1
 
Best regards,
 
Peter
 
 
 
Labview 7.1 on Windows 2000
0 Kudos
Message 4 of 9
(3,187 Views)
As I can't see how your task is configured in MAX I can only do some assumptions but I assume that you have configured not a continuous task but a task that acquires only a certain amount of scans. You should configure your task to run continuously. Thus you won't have to restart it all the time.
Please have a look at the DAQmx AI examples that ship with LabVIEW (e. g. the Cont Acq&Graph Voltage-Int Clk.vi.
By the way: 3.1 is probably the version of NI-MAX and not the NI-DAQmx version.

Jochen
0 Kudos
Message 5 of 9
(3,183 Views)
The task configuration i think is not the problem, because the acquisition mode is continous. I studied some examples, but i didnt*t find the right solution for my program.
 
DAQMX 7.3
 
Best regards,
 
Peter
Labview 7.1 on Windows 2000
0 Kudos
Message 6 of 9
(3,182 Views)
In this case your operations probably stop with an error message, do  they? Your read operation only reads one sample per channel at each iteration. If your acquisition is running with several kS/s your read buffer will overflow after some time as the while loop can't run at this speed. You will probably need to read multiple samples at each iteration of your loop.
Again these are only assumptions as the information you have provided is not sufficient for a better analysis of the problem.

Jochen
0 Kudos
Message 7 of 9
(3,179 Views)

HI!

 

I have checked my program and no error occurs. How can i program my data-acquisition to read multiple samples, do you know an example?? Your assumptiona are right, i am sure! Because my loop iteration runs, but the acquistion is to slow!

TNKS

Peter

 

 

Labview 7.1 on Windows 2000
0 Kudos
Message 8 of 9
(3,163 Views)
Please have a look at the examples in this folder: \LabVIEW 7.1\examples\DAQmx\Analog In\Measure Voltage.llb.
As already mentioned the Cont Acq&Graph Voltage-Int Clk.vi. could come close to your needs.

Jochen
0 Kudos
Message 9 of 9
(3,158 Views)