Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Using BNC-2120 to blink LEDs

Hey,

 

I have the BNC 2120 connected to slot two of a NI PXIe-6361. Trying to use the BNC to blink two LED at a frequency of 10 Hz but I am not sure where to connect the wire (In P0.0 and P0.1 of the Digital I/0 section or in P2.0 and P2.1 of the Timing I/0 section.)

 

When I connect it in the Digital I/0 section I get the error: Selected lines do not support buffered operations.

 

Not sure why I am getting this error.

 

0 Kudos
Message 1 of 4
(2,119 Views)

The ultimate goal of this project is to have the two LEDs blinking at 10Hz alternatively. Meaning while one is on the other is off.

0 Kudos
Message 2 of 4
(2,116 Views)

Hi Ucon20,

 

The LEDs on your BNC-2120 board are connected to port 0 on your NI PXIe-6361 card. Therefore, to make those lights blink, you need to 

send a boolean value to any of the 8 lines on port 0. For example, to light up the LED at the bottom of your BNC-2120 you need to send a "1" to

P0.0. To do this, you can use the following LabVIEW shipping example:

[LabVIEW] -> Help -> Find Examples -> Hardware Input and Output -> DAQmx ->Digital Generation -> Write Dig Chan.vi

And alternative version of this example can be found here.

After running the aboved mentionned example, are you able to turn on/off the LEDs on your BNC board with controls in LabVIEW?

Now, I am not sure exactly how you are trying to activate those DIO lines (posting you code here might be helpful), but one of the reasons that you are getting "Selected lines do not support buffered operations" might be because you are trying to do a clocked DIO Waveform output operation on that line.

 

Also, here is helpful video to get you started with using counters and DIO lines:

Using Counters and Digital I/O

 

 

Mikhail
RF Toolkits, Product Support Engineer
National Instruments
0 Kudos
Message 3 of 4
(2,091 Views)

On a PXIe-6361 (and all other X Series devices), digital port 0 is the only port that can do buffered operations (timed digital). Ports 1 and 2 (which are shared with PFI lines) can only be used for static digital.

 

You should not need to connect any wires to use the LEDs on the BNC-2120 as outputs. (If you wanted to connect another device, such a sensor, and do digital input or output to it, then you would use the terminal connectors.)

 

For a demonstration, disconnect all wires from the 'Digital I/O' section, then open the MAX Test Panels for the PXIe-6361, go to the 'Digital I/O' section, set port0/line0:7 to outputs, then start the task and play with the 'Select State' switches.

——
Brandon Streiff
ni.com/compactdaq · ni.com/daq
0 Kudos
Message 4 of 4
(2,081 Views)