08-12-2009 09:43 AM
I have a PCI6515 and a PCI6513 and I'd like to be able to read the states of the output lines. The reason for this is sometimes my .NET application might get closed down, and after restarting I'd like to know what the output lines are so that the controls on the form can reflect the current state of the outputs.
Tim
08-13-2009 03:53 PM
Hello Tim,
I was looking through the 651x User Manual and there is a section which talks about programming the power-up state of the device. Here is what I found:
"At power-up, the output drives on the NI 651x device is disabled. All output
lines are user-configurable for an on or off state. User-configurable
power-up states are useful for ensuring that the NI 651x device powers up
in a known state.
To use MAX (recommended) to program the power-up states, select the
device and click the Properties button. Refer to the software
documentation for information about how to program the power-up states
using NI-DAQ with LabVIEW or other National Instruments application
development environments (ADEs). "
With this you will be able to configure your power-up state to whatever you choose, and that way your program would know what to expect. Please let me know if you have any further questions.
Regards,
08-13-2009 04:11 PM
Hello Tim,
Although the message I just posted would work for you, I realized I didn't answer your original question, so if you would like to be able to read the outputs from your digital lines I would suggest looking at some of the DAQmx .NET examples. They can be found by going to Start>>Programs>>National Instruments>>NI-DAQ>>Text-Based Code Support. There should be a folder in there for .NET examples. The folder contains analog and digital examples (one in particular for reading digital ports). The exact function depends on whether you are using C# or VB. I hope this answers your question.
Regards,