LabVIEW is primarily a data acquisition software that allows collection, analysis, storage and retrieval of massive amounts of data. LabVIEW supports function blocks that are specifically developed to work with data acquisition cards that are developed by National Instruments. Measurement and Automation Explorer (MAX) is a software distributed along with LabVIEW that allows users to configure the data acquisition hardware to easily read signals in LabVIEW programs.
Instructions
Setting up a Global Virtual Channel to Read Signal in MAX Software
Instructions
Setting up a Global Virtual Channel to Read Signal in MAX Software
1. Launch the MAX software. In the "Configuration" pane, click on "Devices and Interfaces," "NI-DAQmx Devices" to display a list of all the data acquisition cards that are installed on the computer. For example, if PCI-6122 is installed, the list will show "NI PCI-6122: Dev1" in the list. The "Dev1" is a reference that is used in the LabVIEW VI program to access the input channel of the card to read signal values.
2. Click on "Data Neighbourhood" in the configuration pane to display "NI-DAQmx Global Virtual Channels." Right-click on "NI-DAQmx Global Virtual Channels" and click on "Create New NI-DAQmx channel."
3. Click on "Acquire Signal/Analog Input/Voltage" in the "Create New NI-DAQmx Global Virtual Channel" window to list all the physical channels on "Dev1" board that can be accessed to read input signals. Click on "port1/ai0" to choose "ai0" as the input channel. Click "Next" and enter the name "myInput." Click "Finish." MAX software will display a window showing "Dev1/port0/line0" as the configured global virtual channel for an analog input on board PCI-6122. The global virtual channel is called "myInput" and will be used in LabVIEW to read signals.
Using a Global Virtual Channel in a LabVIEW Program
3. Click on "Acquire Signal/Analog Input/Voltage" in the "Create New NI-DAQmx Global Virtual Channel" window to list all the physical channels on "Dev1" board that can be accessed to read input signals. Click on "port1/ai0" to choose "ai0" as the input channel. Click "Next" and enter the name "myInput." Click "Finish." MAX software will display a window showing "Dev1/port0/line0" as the configured global virtual channel for an analog input on board PCI-6122. The global virtual channel is called "myInput" and will be used in LabVIEW to read signals.
Using a Global Virtual Channel in a LabVIEW Program
4. Launch LabVIEW and click on "New VI" in the resulting splash screen to create a new LabVIEW VI program. Every LabVIEW VI has two windows: the front panel window and the diagram window.
5. Drag and drop the "DAQmx Global Virtual Channel" control and "Numeric" indicator from the "Controls" pallet in the front panel window. All components dropped on the front panel will also show up in diagram window of the VI. In the diagram window, drag and drop the "DAQmx read" component from the "Functions" pallet.
6. Connect the output "DAQmx Global Virtual Channel" control to the "Virtual Channel In" input of the "DAQmx Read" component. Connect the output of the "DAQmx Read" component to the input of the "Numeric" component.
7. Choose "myInput" on the "DAQmx Global Virtual Channel" control in the front panel window. Click "Continuous Run VI" button on the "menu" bar on the top of the front panel. Any change to the signal connected to the data acquisition card on channel "ai0" will be continuously displayed in the "Numeric" indicator.
No comments:
Post a Comment