LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate continuous digital output

Solved!
Go to solution

Hello Everyone,

 

I'd like to generate continuous digital output using a NI USB-6002 through P0.0 - P0.3. The output will be 0001 -->0010 --> 0100 --> 1000 --> 0001 --> 0010 --> 0100 --> 1000 --> ...... Can anyone help to implement it in LabVIEW?

 

Thank you,

 

John

0 Kudos
Message 1 of 9
(1,247 Views)

You can refer to shipping examples at Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Digital Output

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 2 of 9
(1,217 Views)

@john_84112 wrote:

Hello Everyone,

 

I'd like to generate continuous digital output using a NI USB-6002 through P0.0 - P0.3. The output will be 0001 -->0010 --> 0100 --> 1000 --> 0001 --> 0010 --> 0100 --> 1000 --> ...... Can anyone help to implement it in LabVIEW?

 

Thank you,

 

John


Hello John,

That sounds like a homework assignment so, we only give tips and answer questions about what you have attached from your attempts.  

 

TIP: an array of four elements could be used as an input to Rotate Array.  See what ideas that might start you looking at.


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 9
(1,178 Views)
Solution
Accepted by topic author john_84112

Certainly, John. You can create this sequence in LabVIEW using arrays and a loop. Start with a 4-element array [0001, 0010, 0100, 1000] and use a loop to continuously output these values through your NI USB-6002 on P0.0 - P0.3. If you face any issues, feel free to ask for help. Good luck!




Good Luck
Paybyplatema
.
0 Kudos
Message 4 of 9
(1,142 Views)

Hi Kevin,

 

Thank you for your advice. What I need is to generate digital outputs in P0.0, P0.1, P0.2, and P0.3 to control a 4x1 switch. When the outputs in these four terminals are 0001 (Low Low Low High), the switch will be connected to Ch1; When the outputs in these four terminals are 0010 (Low Low High Low), the switch will be connected to Ch2; When the outputs in these four terminals are 0100 (Low High Low), the switch will be connected to Ch3; When the outputs in these four terminals are 1000 (High Low Low Low), the switch will be connected to Ch4. The control will repeat the process until being stopped by pressing the STOP button. I can set a delay time in the loop to control the switching time. I wonder if you have any idea to implement this using logic gates in the loop with initial inputs of FFFT (i.e. 0001) in the loop?

 

Best,

 

John

0 Kudos
Message 5 of 9
(1,126 Views)

Thank you Jay. I have updated the requirements.

 

Best,

 

John

0 Kudos
Message 6 of 9
(1,124 Views)

Please look at the attached diagram to see what I need.

0 Kudos
Message 7 of 9
(1,114 Views)

Thank you everyone. The problem has been solved.

 

0 Kudos
Message 8 of 9
(1,106 Views)

Hi John,

 


@john_84112 wrote:

Thank you everyone. The problem has been solved.


How did you solve the problem? It's a forum of volunteers living from solutions…

 

On your image from message #7: You need only one DAQmx task and only one shift register holding an array of booleans!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 9
(1,071 Views)