LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delay Digital Outputs on single NI 9472

Hi,

 

I have a VI (attached) that runs a user defined sequence of Digital outputs based on time inputs.

 

The VI shows 1 loop for 1 NI 9472. I have 2 other 9472 modules which i run on a similar VI, and can delay the start of with 'Time delay' function.

 

I want to do something similar but on the single module.

I.e. i need:

 

cDAQ1Mod1/port0/line0

cDAQ1Mod1/port0/line1

cDAQ1Mod1/port0/line2

to start when i run the VI,

 

and i need:

cDAQ1Mod1/port0/line3

cDAQ1Mod1/port0/line4

cDAQ1Mod1/port0/line5

to start with a user inputted time delay.

 

I tried to duplicate the loop in the VI and have one loop  run Lines 0-2, and the other loop run Lines 3-5, but i got no output (no LEDs powered up on the module).

 

Any ideas on the best way to achieve this?

 

My Setup:

Series of valves controlled by digital output signals from:

3 x NI 9472 modules connected via NI cDAQ-9174 (USB).

0 Kudos
Message 1 of 2
(2,592 Views)

Hi Ucbeoha,

 

I have had a brief look at your code, and it seems that you are not checking for errors (infact, I think you are clearing errors upon exit). Try placing a "Simple Error Handler" VI at the end of your code (to display any errors you encounter). When you duplicate the loop, I expect that the error handler would show errors when you try to access lines on a card/resource that you have already reserved from the other loop.

 

Capture.JPG

 

Ofcourse, this would only work if you removed the "clear errors.vi" from the loops.

 

You may have to combine all relevent lines into a single task/single loop, and code to logic to only set lines high upon your user-specified delays.

 

Thanks,

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/
0 Kudos
Message 2 of 2
(2,498 Views)