LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ task necessary time for starting

Hi Jhen-Si,

 

For microsecond accuracy you'd need to be going in the direction of Real Time. 


ShalimarA | CLA
0 Kudos
Message 11 of 18
(845 Views)

Hi Shalimar:

Could you give me more information? like some examples.

I just checked the real time module on the NI page,
And it seems windows is not ideal for RT module, isnt it? (I am using windows)

USB has its delay, but I thought its delay should be a constant everytime it was called.

Also, the first trigger for 1st s/n (which is the continual s/n) and the 2nd s/n (which is a finite one, and will be retriggered again accroding to the 1st s/n) does match their sync within the accuracy of 50 micro seconds.
But the re-triggered 2nd s/n later starts having some +/-2 ms non-sync.

I think if the first trigger can be that accurate, the following triggers should can, so I was wondering which part I should look at.
Many thanks
Regards, Jhensi



0 Kudos
Message 12 of 18
(830 Views)

Hi

Now I am thinking to use the digital output/input to be the trigger, with the currect digital input, I dont need to process the number, so I can get rid of math node, also I can trigger my second finite task without using event structure.

I hope this will not just shorten the delay, but also make the delay as a constant. (not sure if it can work.)

But I met some problem when I use digital I/O, it seems to be a easy question, but I cannot see the error.

Here are two easy tests:
1st is just a simple digital control / result showing.
2nd one, the input is a boolean array, but the result doesnt show as it should be, I probably made some mistake. Any advice?

Many thanks
Regards,Jhensi

0 Kudos
Message 13 of 18
(821 Views)

Hi Jhen-Si,

 

I think this seems reasonable. Did you mean to attach some code/images regarding the tests?


ShalimarA | CLA
0 Kudos
Message 14 of 18
(798 Views)

Hi:
seems I forgot uploading. I upload them here.

Download All
0 Kudos
Message 15 of 18
(793 Views)

Hi Jhen-Si,

 

The first one will not run as quickly as it would if you were using low level DAQ functions. I recommend using them, if possible, for maximum efficiency rather than Express VI's. 

 

In the second one, you are writing multiple samples to a digital output but you are doing this outside of a loop. Further to that, you have a DAQmx Write before the DAQmx Start Task, this should be the other way around with the DAQmx Write within the loop. 

 

You are using a combination of low level and high level DAQ functions. Why have you chosen to do this? I think you should consider using first the digital output, with the DAQmx Write within the loop, and seeing if that works. If it does, then you can add the extra layer of functionality with the digital input, preferably also using low level DAQ functions/both using DAQ Assistant. 


ShalimarA | CLA
0 Kudos
Message 16 of 18
(778 Views)
Dear friends, sorry for stealing this topic, but I haave a very similar question. I'm trying to implement an I2C protocol with an USB-6341 device to drive and read the line signals. I whis this communication would run at least at 20kbits/second, but each time I need to write/read data there is a 10 to 25 ms delay. I'm thinking this would be an usb latency problem, once it seems that my hardware uses usb bulk transfer mode, instead of an isochoronos pipe. I triead to attach my code and a pictire of the signal but something went wrong, so I hosted it at a dropbox folder: https://www.dropbox.com/sh/0nm3vhp19myjz9z/bPXkggTeau I'd really appreciate if some one could give me a hit in reducing this time between consecutive daq read/write actions. Thanks in advance, Leo
0 Kudos
Message 17 of 18
(772 Views)

Hi:

Yep, I mixed the low level and high level DAQ. (simply because of laziness)

I was testing if the loop can work, once it can work, I will replace all to the low level one and to drive it as quick as possible.

I will try what you just suggested: I put the write and the start in the wrong order.
(I rememebered I thought some examples doing that, so I did the same. Seems like a mistake.)

Will see if it can work (especially with the contant delay for the whole loop.)

Many thanks
Regards, Jhensi

0 Kudos
Message 18 of 18
(760 Views)