11-04-2023 03:26 PM
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
Solved! Go to Solution.
11-04-2023 05:47 PM
You can refer to shipping examples at Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Digital Output
11-04-2023 10:32 PM
@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.
11-05-2023 10:58 AM
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!
11-05-2023 12:44 PM
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
11-05-2023 12:48 PM
Thank you Jay. I have updated the requirements.
Best,
John
11-05-2023 01:18 PM - edited 11-05-2023 01:20 PM
Please look at the attached diagram to see what I need.
11-05-2023 01:53 PM
Thank you everyone. The problem has been solved.
11-06-2023 01:50 AM
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!