06-12-2007 01:25 PM
06-13-2007 01:41 PM - edited 06-13-2007 01:41 PM
Hi Eric,
There is a VI that will set the Power Up States for the digital lines programmatically. Here is a great tutorial that explains the process of setting these values in LabVIEW. Once the power up states have been set, these values will be stored on the board and the board will retain those values until they are programmatically set to another value.
Message Edited by Robert F on 06-13-2007 01:42 PM
06-22-2007 10:53 AM
Rob,
Thanks for your response. For my application, I need to set the output state in NI-MAX. If the output state is set when the application is loaded, the EEPROM in the DAQ will be written every time the application is loaded. I have no problem with setting the output state. My question was actually how to get the output state programmatically. Is there any way to do it?
Thanks
Eric
06-25-2007 03:07 PM
Hi Eric,
You can set the power up states for your PXI-6514 programmatically, but you can not read those states programmatically. The best way to decide if those states need to be changed is through MAX. It is suggested that you only write to the FLASH memory when your power up sates change. It is not recommended to programmatically change your power up states every time you run your application.
The DAQmx help (NI-DAQmx Help >> NI-DAQmx Device Considerations >> Multidevice Tasks >> Power-Up States) cautions that you can only write to the FLASH memory a limited number of times. This caution will not effect you unless you change these settings every time that you run your application. This functionality should be able to support thousands of writes.
06-27-2007 01:11 PM
Rob,
If NIDAQmx provides DAQmxSetDigitalPowerUpStates, it would be good to have something like DAQmxGetDigitalPowerUpStates. Anyway, I found a way to get around it.
1. When the application is loaded, I call DAQmxResetDevice to put all channel to the defined power up state
2. Read all ports (including digital outputs) with DAQmxReadDigitalU32 to found out the power up state
According to the doc, DAQmxReadDigitalU32 is to read the state of digital input. It seems to be working for digital output, too.
Thanks
Eric
06-15-2009 05:05 PM
As power up states are not exported with MAX configuration files (.nce) I also tried to find a way to distribute (read out on one system -> write on the other system) my power up states.
With DAQmx 8.7.2 (my current version) it was possible:
I modified the VI "DAQmx Set Power Up States (Digital).vi" by selecting the DLL-function "DAQGetPowerUpStatesDigital" instead of "DAQSetPowerUpStatesDigital"
It seems to work without changing the prototype.
Have fun,
Martin