Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Fast Writing using DAQmx on USB 6212 - LabVIEW 2024

Solved!
Go to solution

Im not saying AO writting time changes, im saying all the reading, if "stabilization time" = 0, is shifted (delayed). I think the image that i have attached shows it really well. 

 

Unfortunately, there doesn't seem to be a way to write fast with an on-demand configuration. The VI that i attached earlier doesnt work, it still gives the error (which makes sense). 

 

Thank you for your time,

Greetings,

Alejandro Pérez

0 Kudos
Message 11 of 13
(73 Views)

I re-read the thread and tried to dig into the code a little more.  I still don't think I understand what you *want* out of this.  Here's what it looks like to me.  In one scenario you take single readings from an external instrument and see a step change in a response.   In another scenario you average 10 readings from that instrument across the step change, don't like that the resulting *average* doesn't also show a step change, and are hoping to fix things by writing AO output faster.

 

It isn't adding up for me.  I'm beginning to suspect that you're struggling with a time delay that's part of your system behavior.  You update an AO value, it takes time for that to become a stable laser current and then it takes more time for the gas to respond to the laser and then it takes even more time for your power measuring instrument to capture the end result.  Then when you average across multiple readings, sometimes a step change occurs in the midst of those readings and your average doesn't match either the "before" or the "after" power level -- it's something in between.

 

Your DAQmx tasks aren't going to change that.  You would instead need to come up with a method of data collection and analysis that can account for and compensate for those delays.  That probably means keeping *every* individual instrument reading and then doing post-processing to identify and pay attention to the portions of the response you care about.

 

 

A whole other thing you might consider is to set up AO and DO as buffered tasks that "borrow" the AI sample clock for their own sample timing.  There'd be some data processing work to do to take the data from your "Get Data" file and make it follow the output timing you want, but it should be possible in principle.  If the data segments ("State L1 Data", "State L2 Data", ...) represent discrete stages of operation, you can probably make AO and DO be finite sampling tasks that contain one state worth of data at a time.

    But I don't really think this is the main thing to focus on first.  It seems like your system response delays, instrument interactions, and instrument data retention probably are.  At least that's how it looks from here, albeit hazily.

 

 

-Kevin P

 

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 12 of 13
(62 Views)

All you said is true. "I'm beginning to suspect that you're struggling with a time delay that's part of your system behavior", the thing with this time delay is that i CAN make it smaller improving the data flow of the software (we have been able to change it from 200ms to 25ms, i have made quite a few upgrades yesterday), and the smaller it gets, the bigger the SNR will be.

This will probably will be the next thing to do and it is actually the purpose of the post: "A whole other thing you might consider is to set up AO and DO as buffered tasks that "borrow" the AI sample clock for their own sample timing". I didnt think about using the same AI sample clock. I thought there was a way to write buffered values without a defined sample rate, but it seems this doesnt exist.

 

"It seems like your system response delays, instrument interactions, and instrument data retention probably are": I really think this themes have been alredy studied (for at least a year), but there might be still some things that we are not taking into account. We will have to see. 

 

From this last reply, i think you have a pretty good idea of what i want to do.

 

Thank you for your time!!

Greetings,

Alejandro Pérez

0 Kudos
Message 13 of 13
(57 Views)