Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

NI USB 6501 output state

I'm using a USB 6501 and cannot figure out how to read the state of the outputs.  It's possible that my application controlling the outputs can shutdown, leaving the outputs in all different states.  When I restart the application, I want to know what the current state is for each output, before I write the output array to the task. 

 

At the start of my application, I start two tasks and keep them running, one for reading inputs and one for writing outputs.  I I try to read an IO declared as an output, all of the states on that channel reset.

 

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

Hey

Check the user manual, page 14 and 16 explains the power ON state, this might answer your question.

 

Cheers

 

Lab

0 Kudos
Message 2 of 6
(4,280 Views)

Hi Bjoles,

 

To read the lines of the 6501, you can just use a DAQmx Read at the beginning of your program.   You will have to place the read after the create task and the start task anywhere in your program.  I have attached a VI that will show you how to read the current states of your lines.

Regards,
Jim Schwartz
0 Kudos
Message 3 of 6
(4,275 Views)

Hi,

 

I am interested in viewing the attached VI file, but unfortunately I only have LabVIEW 8.5.  Can you please convert the vi to 8.5?  Thanks.

 

- Peter 

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

Hi Peter, 

 

I would gladly do that. Could you please attach the Vi? There was no file attached to your message. 


Regards, 

Jackie

DAQ Product Marketing Engineer
National Instruments
0 Kudos
Message 5 of 6
(3,708 Views)

I Peter, 

 

I apologize. I just realized you were talking about the Write Dig ChanWithRead.vi. Here it is! Saved for your version of LabVIEW. 

 

Good Luck!


Regards,

Jackie

DAQ Product Marketing Engineer
National Instruments
0 Kudos
Message 6 of 6
(3,706 Views)