09-22-2007 02:07 PM
09-24-2007 06:10 PM - edited 09-24-2007 06:10 PM
Hi CUImsch,
The DAQmxSetDigitalPowerUpStates function takes four arguments: deviceName,
channelNames, state, and "...". The "..." indicates
that you can include additional channelNames and state arguments. The final
channelNames and state pair must be followed by a NULL argument. For example,
to set port0 to a default low state use:
DAQmxSetDigitalPowerUpStates("Dev3",
"Dev3/port0/line0:7", DAQmx_Val_Low, NULL)
If you want to set multiple ports with the same function call, include their
channelNames and state arguments after the first port's arguments and follow it
with NULL to indicate that you're done listing channels.
DAQmxSetDigitalPowerUpStates("Dev3",
"Dev3/port0/line0:7", DAQmx_Val_Low, "Dev3/port1/line0:7",
DAQmx_Val_Low, NULL)
The NI-DAQmx C Reference Help contains more information on this function.
Specifically under the Help Contents: NI-DAQmx C Functions » System
Configuration » DAQmxSetDigitalPowerUpStates.
I hope this helps! Let me know if there is anything else I can help with or
clarify. Have a great day!
Message Edited by ryan_d on 09-24-2007 06:10 PM
09-25-2007 07:57 AM
I think I finally got the syntax correct but I got an error message that said the USB6501 did not support the command. Is that correct
If so how can I set the power on port values.
Charley
09-25-2007 08:00 AM
DAQmxSetDigitalPowerUpStates("Dev3", "Dev3/port0/line0:7", DAQmx_Val_Low, 1)
I was unable to use NULL since this gave me an error illegal use of comand
09-25-2007 01:13 PM
Hi Charley,
Upon further investigation, it appears that the USB-6501 does not support programmable power-up states. The power-up state options can be found on page 8 under the title Power-On States of the USB-6501 user manual. This option is also mentioned a little more explicitly on the product page and is listed as Programmable Power-Up States under the Specifications Summary. Unfortunately this means that there is no way to programmably set the power-up state. It will always default all lines to be high-impedance inputs. The best alternative is to immediately configure your DIO tasks at the beginning of your application.
Let me know if there's anything else I can do for you. I'm here to help!
10-01-2007 11:16 AM
10-02-2007 06:55 PM - edited 10-02-2007 06:55 PM
Message Edited by ryan_d on 10-02-2007 06:55 PM
09-15-2011 10:41 AM
@ryan_d wrote:
Hi John,
The power-on state for the USB-6501 will always default to high-impedance input. However, DAQmx devices make use of lazy line transitions. What this means is that once a task-based route has been created and released, it will remain in its current state. So as long as you don’t turn off or reset your 6501, its lines will remain in their most recent state. This means that you could disconnect your system from the 6501, run a task that sets all of the lines to high-level outputs, reconnect your system, and run your application.Message Edited by ryan_d on 10-02-2007 06:55 PM
Ryan,
The two statements seem to be in conflict. Once you disconnect the 6501 it turns off. Can you please clarify?
Thanks,
Paul