01-23-2008 05:04 AM
01-23-2008 07:23 AM
Charlie,
Outputing a numeric value is the way to do it.
The most likely reason that your vi is running slow is the fact that you are using the DAQ Assistant. Each time the inner FOR loop executes the DAQ Assistant ( X2 ) is repeating several steps that really only need to be done once outside your loop. These just happen to be the steps that take the most time in DAQmx.
Suggest that you not use the DAQ Assistant and instead use the DAQmx vi's instead. If you right click on the DAQ Assistant in your vi you have the option to Generate DAQmx Code. This will give you an idea of what the assistant is really doing. There are also many good example DAQmx vi's that ship with LV. One in particular, Gen Mult Volt Updates-SW Timed.vi covers the general concept of what you are trying to do. Also suggest you read the section in the DAQmx docs on the Task State Model.
To get the best overall performance you will need to create a single analog output task that contains your 2 output channels. Do this outside the loops. Then you can use a single DAQmx write inside your loop to write both outputs at the same time. You just need to make sure that your vi clears the task after the loops are done running.
What version of LV are you running? If I get some time I'll try and put together an example for your application.
01-23-2008 07:53 AM
01-23-2008 09:13 AM
01-23-2008 09:43 AM
01-23-2008 11:12 PM
01-24-2008 06:44 AM
01-24-2008 07:15 AM
01-24-2008 07:49 AM
Charlie,
Your DAQ device should have a couple of counters. You may want to investigate using one of the counters to create a trigger that controls the timing of your DAQ writes and reads.
01-24-2008 09:19 AM