LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Entering in rate (samples/sec) for DAQmx Read.vi

To give you some background about the setup, i have 3 pressure transducers and 2 thermocouples feeding into an SC2345 signal conditioner. I want the thermocouples to output to one graph and each pressure transducer to output to its own graph. I want the data acquisition to last 10 seconds, and i can't figure out how to make it last 10 seconds.
As of now i have created 5 different channels and each channel is output its own DAQmx Read.vi. These are all within a While loop. Each channel can output to its own graph, but I can't get the two thermocouples on the same graph (but that isn't necessary for this project).
With the DAQmx Read.vi you can specify how many samples you want to take but you can't specify the rate at which it collects samples.
 
I tried the "Timed Loop" but that really didn't work out at all.
 
Any ideas anyone? Sorry I'm a LABVIEW newb but this is my first time ever using the software and we need it for this experiment we are doing....
0 Kudos
Message 1 of 4
(2,808 Views)
 

You would have to perform continuous acquisition

Look at example vi's shipped with LabVIEW and you will understand how to use 'DAQmx timing' function, to set scan rate and perform continuous acquisition

Find Examples>> Hardware input and output>> DAQmx>>Analog Measurement>>Voltage folder will have the relevant examples

Also read this link to understand DAQmx functions

or you could start off using DAQ assistant for continuous acquisition

0 Kudos
Message 2 of 4
(2,797 Views)

I am now getting the following errors and I don't understand why I am getting them:

Error 1:
Possible reason(s):

Some or all of the samples requested have not yet been acquired.

To wait for the samples to become available use a longer read timeout or read later in your program. To make the samples available sooner, increase the sample rate. If your task uses a start trigger,  make sure that your start trigger is configured correctly. It is also possible that you configured the task for external timing, and no clock was supplied. If this is the case, supply an external clock.

Property: RelativeTo
Corresponding Value: Current Read Position

Property: Offset
Corresponding Value:


Task Name: _unnamedTask<6>

Error 2: (Only Sometimes I get this one)
The specified resource is reserved error....

 

0 Kudos
Message 3 of 4
(2,780 Views)

for Error 1: which vi are you using?? what is the values that you have set for 'scan rate' and 'number of samples to read' ??

Regarding error 2, This error is the result of a resource conflict when two DAQmx tasks are attempting to perform the same type of operation. With multiplexed data acquisition boards, only one analog input and one analog output task can be run at the same time. This is the case because all analog input channels require use of the same channel multiplexer and sample clock. Thus, in order to perform multiple channel acquisition, all channels must be included in the same task.

read this link

Message Edited by devchander on 04-17-2007 01:11 AM

0 Kudos
Message 4 of 4
(2,773 Views)