05-24-2013 03:16 AM
Hi Jhen-Si,
For microsecond accuracy you'd need to be going in the direction of Real Time.
05-24-2013 09:39 AM
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
05-24-2013 01:03 PM
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
05-28-2013 04:50 AM
Hi Jhen-Si,
I think this seems reasonable. Did you mean to attach some code/images regarding the tests?
05-28-2013 06:48 AM
Hi:
seems I forgot uploading. I upload them here.
05-29-2013 07:57 AM - edited 05-29-2013 07:58 AM
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.
05-29-2013 09:49 AM
05-29-2013 05:16 PM
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