Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

6541 initial condition

When I first run my LabVIEW 7.1 GUI, how do I know what the PCI-6541 is going to be driving on its outputs?
 
It seems like even after closing the GUI, the board holds the last values I told it to write out.  Is there a way I can initialize those outputs when I initialize my dynamic generation session?  I want to keep the board from outputting unknown values at startup.
 
Many thanks,
Michelle
0 Kudos
Message 1 of 4
(3,283 Views)
The easiest way is to simply pass a "TRUE" into the reset paramater of niHSDIO_Initiailize.  It's the same as if you called the niHSDIO Reset function.  It tristates all data and PFI lines.  You can also call it at the end of each session right before you call close, so that you return the board to its default state.  The reason we don't do it for you automatically at close is that some customers want to be able to open and close sessions without having glitches on the lines.  By leaving the lines driving, it allows the customer to have the option via reset.
 
One note about reset - it's affects the entire device.  if you have an acquisition session open to the same device, it will stomp on it as well.  Check out the user documentation for more details on this function if you need, but if you generally just have one session open at a time it shouldn't cause any side-effects.
 
Hope this helps,
Chris
Message 2 of 4
(3,276 Views)

Chris,

Thanks for your reply.  I am running concurrent generation and acquisitions, and when I run the GUI I would like the board to always start with a specific initial value driving out on the lines.

It sounds like it would be best to drive my default values out either on startup or reset. 

  • If the 6541 is driving values on the lines, is it okay to disconnect and reconnect my hardware? 
  • Will the 6541 keep driving the last value assigned to each channel if I exit LabVIEW and then start up LabVIEW later.

Thanks for helping me figure out the best way to use the PCI-6541!

 

Regards,

Michelle  Robot Happy

0 Kudos
Message 3 of 4
(3,264 Views)
Michelle ,

Another feature I would recommend looking at are what's called the Initial and Idle State Vectors.  The help file explains them in detail but basically these settings control the outputs of the device when a generation task has not yet started (initial) or when it is stopped or paused (idle).  You can set these on a per channel basis and can be set to either 1, 0, X (hold last value), or Z (tristated).
0 Kudos
Message 4 of 4
(3,248 Views)