Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6501 DIGITAL OUTPUT

Solved!
Go to solution

Hello all,   I have a brand new NI USB-6501, and I'm looking for some help with operation. I want to use 6501 as a 8:1 multiplexer controller.  This table below are the signals that I want to generate. 

 

Step     P0.0     P0.1     P0.2     P0.3

  1           0           0           0           1

  2           0           0           1           1

  3           0           1           0           1

  4           0           1           1           1

  5           1           0           0           1

  6           1           0           1           1

So there are 6 steps, 4 lines generate signal at the same time. I want to set the step time as 10 second. I am just not too familiar with LabView.  Please help!

0 Kudos
Message 1 of 6
(4,062 Views)

1. Write to the port, not the individual lines.  This will make things a little simpler.

2. There is a nice function called Elapsed Time that should help you along.

 

Otherwise, there is not much I can recommend without seeing what you currently have written.


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 2 of 6
(4,039 Views)
Solution
Accepted by topic author EnzoWU

You can use the following snippet to generate those signals as a Digital Waveform, and output them using DAQmx

Example_VI_BD.png

 

Here, the sample rate is 0.1 to give 10 seconds, and the samples are 1, 3, 5, ... as you wanted. Alternate patterns could be generated by slightly modifying the For loop, and the rate could be changed to alter the wait times.

 

Example_VI_BD.png

In this case, I used the U32 1 Channel NSample mode for Digital Write, because I couldn't use Buffered mode on ports 1 and 2, and 0 has 32 bits. You can adjust as needed for the hardware port you choose.


GCentral
0 Kudos
Message 3 of 6
(4,017 Views)

Thank you, it really helps a lot!

0 Kudos
Message 4 of 6
(3,953 Views)

Thank you for your help~!

0 Kudos
Message 5 of 6
(3,951 Views)

It seems that the function "DAQmx timing" is not supported in NI USB-6501. I want to generate a 10 Hz TTL digital pulse by this function but that can not work. I think hardware-timed is not supported in this borad.  

0 Kudos
Message 6 of 6
(1,392 Views)