LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

daqmx digital output help

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!!

Download All
0 Kudos
Message 1 of 14
(2,858 Views)
Just showing a couple of front panel does not provide enough information. Include the block diagram and what DAQ device you are using.
0 Kudos
Message 2 of 14
(2,850 Views)

scroll to the right bro

 

using cdaq-9172  with module 9403

0 Kudos
Message 3 of 14
(2,843 Views)

Write the data to the digital output before starting the task.

0 Kudos
Message 4 of 14
(2,824 Views)

tried that, but still takes 4.6 seconds.

0 Kudos
Message 5 of 14
(2,815 Views)

@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?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 14
(2,800 Views)

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?

 

0 Kudos
Message 7 of 14
(2,796 Views)

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.

0 Kudos
Message 8 of 14
(2,783 Views)

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.

0 Kudos
Message 9 of 14
(2,775 Views)

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?

0 Kudos
Message 10 of 14
(2,767 Views)