03-12-2014 08:49 AM
What im trying to do seems so simple, but... the timing is not operating as intended
I am Trying to control 3 digital outputs. Total Time 4 seconds @ 1K Hz
I created a boolean array for each channel for the on-off time. 4000 points
The waveform graphs are accurate, but as you can see the total time to execute is roughly 5 seconds.
I tried to add daqmx timing, but i recieve an error.
HELP!!
03-12-2014 08:52 AM
03-12-2014 08:54 AM - edited 03-12-2014 09:13 AM
scroll to the right bro
using cdaq-9172 with module 9403
03-12-2014 09:14 AM
Write the data to the digital output before starting the task.
03-12-2014 09:37 AM
tried that, but still takes 4.6 seconds.
03-12-2014 10:07 AM
@teslaaaa wrote:
tried that, but still takes 4.6 seconds.
What exactly is the 4.6 seconds? The time to run the task? The time of the full waveform that is outputted?
03-12-2014 10:15 AM - edited 03-12-2014 10:15 AM
The time to run the task.
The digital outputs should take a total of 4 seconds to turn on/off.
But its taking 4.6 Seconds. I know the problem is related to the timing. but when i include the timeing DAQmx.vi i have an error.
I guess the 9403 does not have DO clock.
How can i software time?
03-12-2014 11:15 AM
http://sine.ni.com/nips/cds/view/p/lang/en/nid/208811 says that you have hardware timing.
Are you sure it is taking that long? Have you verified by looking at an O-scope trace?
Build your waveform and wire that through the first flat sequence structure where you start the timing. Maybe the Express VI is still working on creating the waveform at the point of time you start timing. Express VI's are known for their lack of efficiency. Wiring it through the first structure will make sure the data is completely built up before you initiate the timing sequence.
03-12-2014 12:36 PM
Yes it was verified.
As shown in the second attachment, when i use the DAQmx timming vi, i get an error. I have not been able to use the hardware timing, and not recieve an error.
Thats where im stuck.
i could use a timed while loop, but that just seems silly.
03-12-2014 12:53 PM - edited 03-12-2014 12:55 PM
As I said, you have to write the waveform before you start the task.
What if you don't use your actual hardware, but simulate a piece of hardware through MAX?