07-09-2007 01:37 PM - edited 07-09-2007 01:37 PM
Message Edited by ClaudeWang on 07-09-2007 08:39 PM
Solved! Go to Solution.
07-12-2007 02:18 AM
Hi Claudewang,
The datas for analog output have to be transferred from lv's ram to the board itself, through several "layers" and this will take some time and this time depends on the system you're using. You're running the application on windows and general purpose os's aren't deterministic, so you can't guarantee the times involved in your applications too.
You can try to optimize your code in lv to have the shortest delay for ao updates. Especially if you're using Express VI's there could be some potential to speed up your appl.
Other ways to get a better performance would be a faster machine, or changing to real time os or implementing the code in FPGA....
Please let us know, how you've created your application perhaps there are ways in the sw to get the desired behaviour.
With Best Regards,
Evrem
07-12-2007 12:12 PM - edited 07-12-2007 12:12 PM
Message Edited by ClaudeWang on 07-12-2007 07:19 PM
07-13-2007 02:06 AM
Hi ClaudeWang,
It looks like you are familiar with the DAQmx driver :-).
The only suggestion I have for your app is to use the DAQmx Control task.vi for the pulse generation task.
The task should be in the committed state, before you start the task, so the start task.vi can just change from the commited state to the running state in the loop. Place a DAQmx Control Task.vi with the "commit"-action before the loop.
I hope this will decrease significantly the delay in generating a pulse. If not, then you may think about using hw, which I have mentioned in my first post.
With Best Regards,
Evrem
07-13-2007 12:05 PM
07-16-2007 10:46 AM
Hi Claude,
Wow, 1ms is really a significant reduction!
Anyway, your "5%" will be harder to solve, because the boards are limited to one Task for each subsystem.
That means the analog trigger circuitry can only be used once (for one task) and only one task per subsystem can be used per board.
If you have already reserved the ai subsystem with a task, you cannot run another ai task on the same board.
But you can on another board, that means if you have a second board you can run two ai tasks in parallel in the same application...
Thats the only way I see.
I hope it helps.
With Best Regards,
Evrem
07-16-2007 10:58 AM
Dear Evrem,
Yes, I know I can only use one AI task on the same board. That's why I ask whether it's possible not to use AI or AO task to have the Analog Comparison Event signal. For example, is it possible to use a "Counter" task and wire it with a Start Trigger (Analog Trigger type, source APFI0)? I tried it, but it doesn't work. It only works for setting the Start Trigger as Digital Trigger mode in a Counter task. Is it true? or did I miss something important? Thanks.
Claude.
07-17-2007 01:51 AM
Hi Claude,
Yes, it's true , you can only use digital triggering for counter tasks. The only way, to get an analog trigger involved in a counter task, is to use the anlog trigger circuitry of the ai subsystem and route the analog comparison event signal to the counter task. It's not possible to seperate an ai task from the analog trigger circuitry and run both in parallel.
With Best Regards,
Evrem
07-17-2007 02:58 AM
Dear Evrem:
OK! Thanks for your help. Now I can sleep well. This case can be closed. 🙂
Best,
Claude.