09-19-2005 04:15 PM
09-19-2005 05:26 PM
09-19-2005 06:12 PM
jasonv,
Thank you for your reply. When you say that DAQmx Set Power Up States VI applies settings to my board to set the inital state of the digital lines, do you mean that it sets the line configurations to input or output. If so, then can I use it to set my port lines to inputs and outpts as I need them? If not, I don't really understand what it does. Can you explain it to me.
I've looked at Read Dig Chan VI and Write Dig Chan VI. They don't configure the channels as input or output. Or at least it's not obvious that it's doing so. They create an input channel (for Read) and output channel (for Write). Does the sub VI that creates the channel, also configure it? Since all the lines on the ports on my particular M series DAQ board are configured as inputs, I suppose I don't have to do anything for my input lines. Although for clarity, I'd like to explicitly set them to inputs in my init code. But for my output lines, I guess I can do what the Write Dig Chan VI does and set my output lines to whatever state I want. Is that right? Thanx.
Fataneh
09-19-2005 06:57 PM
09-19-2005 07:29 PM
jasonv,
I will read the tutorial on DAQmx Set Power Up States VI. But to answer your question, I am configuring my input and output lines once at the beginning of my code. Once set, this configuration does not change. I will however write different values to my output lines, of course, during the code execution, depending what the user wants to do. But all the input lines stay as input and all the output lines stay as output. In fact, each time the code runs, the input and output line designation remains the same. After reading the tutorial, if this VI does the job, I guess I'll use that.
Actually, after posting my question, I realized that with the Traditional DAQ VIs (DIO Port Config, DIO Config, Write to Digital Port) I have to specify a device number and my board being a DAQmx compatible, there is no device number assigned to it in MAX. So does this mean that the traditional DAQ VIs don't work for DAQmx compatible hardware? Thanx.
Fataneh
09-19-2005 07:41 PM
09-19-2005 07:53 PM
I guess my best option right now is to do the way it's done in Read Dig Chan and Write Dig Chan VIs.
Which VIs are the Traditional NI-DAQ Compatibility VIs? Thanx for all your help.
Fataneh
09-19-2005 07:56 PM
09-20-2005 08:41 AM
Hi All-
The Traditional NI-DAQ Compatibility VIs are absolutely not your best option- they are not intended for new designs but rather for use with existing VIs that you would like to avoid rewriting, and (as jasonv mentioned) you lose out on the increased performance and ease of use that NI-DAQmx provides.
The examples Read/Write Dig Chan and Read/Write Dig Port from the NI Example Finder in LabVIEW (browse to Hardware Input and Output>>DAQmx>>Digital Generation and Hardware Input and Output>>DAQmx>>Digital Measurements) configure the lines for input or output based on the type of virtual channel or task created. These settings will persist until you either clear the task or reset the card using the DAQmx Reset Device VI.
These should provide exactly the performance you're looking for. Please let us know if you have any additional questions.
09-20-2005 11:30 AM
Jason,
Thank you so much for all your help. I'm doing it the way it's done in Read Dig Chan and Write Dig Chan VIs and it's working. Again, thanx for the help.
Fataneh