From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example demonstrates how you can create a single DAQmx Task that combine different kinds of acquisition, whilst allowing you to modify properties which could be unsupported in some of the channels.
Description
In this example, we'll be performing two different kinds of acquisition; Analog Voltage Input via a NI-9221 and Analog Current Input via a NI-9219. The NI-9219 supports the modification of its ADCTimingMode property (In this instance we will be setting it to High Speed), however the Analog Voltage channels do not. As these channels are part of the same task, depending on the order of execution of the property modification, errors can be thrown if we're not careful.
The snippet below allows us to see the following:
I've attached the VI shown in the VI Snippet for you to play around with. You'll probably need to simulate the appropriate modules from the Measurement and Automation Explorer (MAX) in order to derive the appropriate functionality from this code.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Would not the property in the True case overwrite the High Speed setting of the current inputs since the current inputs task has already initialised?!
Assuming that both devices support the ADCTimingMode property, I want to be able to set the Current Input device to 'High Speed mode' and the Voltage Inputs device to 'High Precision' mode, or vice versa. Will the code shown above do it?
I found the following instruction in the link below. Would this be the solution?
"When setting AI Convert instances of the DAQmx Timing attribute/property, you must use the ActiveDev attribute/property to specify the device to which you are referring."
http://zone.ni.com/reference/en-XX/help/370466AC-01/mxdevconsid/cdaqtimingconsiderations/