LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analag/Digital Output with Delay/timed loop

Hi all, 

 

I am trying to execute the following sequence (in the attached picture). 

 

I am using 3 digitat output ports and 2 analog output ports. 

 

My first question is, how mayI use an array to alternate between the digital channels, in the appropriate order? 

 

also, how can I make an execution last for a certain amount of time, before stoping, then continuing to the next objective int he process ? 

 

Lastly, I have trouble introductin gboth analog and digital output into the same execution. 

 

Any help is realyl helpful, 

 

Thank you ! 

0 Kudos
Message 1 of 5
(2,344 Views)

Hi BT778,

 

What DAQ Hardware you used? Could you attach your code?

What do you mean by an array to alternate between digital channels?

For your second question, you can use state machine design pattern. To make the execution last for an amount of time you can use wait vi.

0 Kudos
Message 2 of 5
(2,334 Views)

Hi taov, 

 

i am using a daq6009, and the picture i uploaded shows the pins that I want to output signal from and the duration fo time i would like it to last. 

 

as of now I have been practiving by powering just one digital port, to turn on for a a few seconds then turn off at the end. Though my Vi does not turn off the digital channel at the end of the duration I specify. And I'm not including the analog output in my code. 

 

 

0 Kudos
Message 3 of 5
(2,330 Views)

BT778,

 

Your vi does not turn off the digital channel at the end of duration because you didn't write off signal at the end. Try to put write digital signal with false value before stopping the daqmx task.

 

The easiest way to create sequential system is using flat sequence structure. I attached example for you.

0 Kudos
Message 4 of 5
(2,317 Views)

Ah this is very nice,thank you. 

 

To incorporate the DIO daqmx function and such, can I just replace the variables with the functions and initialize them? 

0 Kudos
Message 5 of 5
(2,305 Views)