- This topic has 0 replies, 1 voice, and was last updated 7 years, 10 months ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
About PHYS 318 › Forums › Discussion › Digital Output Channel for Assignment A02
Seth asked the question below that I’d like to answer for everyone:
I made a bunch of changes to my Thermistor code. I couldn’t figure out how to find the Channel for Digital output so I just used the VI you gave us for project 1. I am assuming this isn’t the proper way to do it. How do you find the proper output channel?
Yes, I would like you all to use the fundamental DAQmx routines in this assignment so that you can learn to write your own subVIs to encapsulate the data acquisition tasks in future assignments. In other words, in the future you will write subVIs like the ones that I provided for the first assignment.
For this assignment, the DAQmx code for both the Analog Input (thermistor) and Digital Output (LED) will be exposed at the top level in your main VI. You should have two rows of DAQmx routines in your main VI one for AI and one for DO. In each you will need to create the channels and start the task outside of your main while loop, perform the read (AI) or write (DO) inside the loop, and then stop and clear the tasks outside the loop after it completes.
To answer your question, you will need to use the DAQmx Create Virtual Channel VI to create the digital output channel and add it to the task. If you change the polymorphic VI selector at the bottom of this VI to Digital Output first and then create a control for the physical channel then this control will automatically be set up to browse for digital output channels. However, if you create the physical channel control while this selector is set for something else (such as AI Voltage, as often happens) then the control will not show Digital Output channels. In this case you can right click on the control on the front panel and select I/O Name Filtering. From the dialog that appears you can set it up to browse for Digital Output channels.
See the screenshot to see what I’m talking about.