LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Assistant Acquisition mode 1 sample

Solved!
Go to solution

Hi all,

 

I am trying to read one sample per loop in LabView. I used the DAQ Assistant and USB-6009. However, I had a problem. In the "Acquisition Mode" after double-click on the DAQ Assistant, if I used N samples mode and set "Samples to read" to 1, this error occurred:

 

Error -200077 occurred at DAQ Assistant
Possible Reason(s):

Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.

Property: SampQuant.SampPerChan
Requested Value: 1
Valid Values Begin with: 2
Valid Values End with: 8589934590

 

And if I used the 1 sample (On demand), another error occurred when I started to run the program after successfully building vi:

 

Possible reason(s):

An attempt has been made to configure a trigger without configuring the appropriate sample clock properties or when Sample Timing Type was set to On Demand.

Configure the sample clock type to something other than On Demand to use a trigger.

Property: Start.TrigType
Corresponding Value: Digital Edge

Property: SampTimingType
Corresponding Value: On Demand


Task Name: _unnamedTask<2E06>

 

 

 

0 Kudos
Message 1 of 11
(4,449 Views)

Is there a reason you are setting up digital triggering?

 

Set yourself for N samples.  Then go to the Trigger tab and set it for none.  Then go back to the Configuration tab and set it for 1 sample on demand.

0 Kudos
Message 2 of 11
(4,436 Views)

Hi, Thanks for reply.

 

I want that trigger actually. I want to read 1 sample once triggered in every loop. The closest solution is to set the acquisition mode to "N sample mode -- 2 samples to be read". I tried your way before, the result is quite different compared to the "N sample mode -- 2 samples to be read" setting.

0 Kudos
Message 3 of 11
(4,432 Views)

Then I would set it for 2 samples, and discard the 2nd.

0 Kudos
Message 4 of 11
(4,427 Views)

Thanks,

 

Is it easy to do that before showing the dots in the XY Graph?

0 Kudos
Message 5 of 11
(4,419 Views)

It is easier to do that with arrays or waveforms.  Harder to do with the dynamic data type "blue" wire, because it hides so many details of the data that is in it.  You might need to convert from the DDT to be able to manipulate it.  I just can't take the time now to work it out.

0 Kudos
Message 6 of 11
(4,410 Views)

Well, I just wrote a code for that. I used the array subset to keep the first data and discard the second one. It seems to be right. However, I don't know much details in LabView. Could you have a look at that. Is that right?

0 Kudos
Message 7 of 11
(4,407 Views)

It looks good that you are using the regular DAQmx functions rather than the DAQ Assistant Express VI.  However, I don't see anywhere in there that you are using Array Subset.

 

If you want just the first sample of all channels, then use Index Array to get either the first row, or the first column.

0 Kudos
Message 8 of 11
(4,390 Views)
Solution
Accepted by topic author SuperCosmos

Sorry, wrong file. See the new one.

0 Kudos
Message 9 of 11
(4,381 Views)

I'd still use Index Array rather than Array Subset.  I believe it is a more efficient function.  It certainly uses less constants.

 

I would also make your loop condition be stop when true rather than continue if true.  Then you can use the much more normal OR function rather than NOR heading into that terminal.  And since you have 3, you can use a Compound Arithmetic node set to OR to make the comparison in one node rather than a pair of OR's.

0 Kudos
Message 10 of 11
(4,375 Views)