To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example VI shows how to change the values of a DAQmx task that is currently running without implementing the changes that exact moment.
Description
You can change DAQmx task values during the VI running. The VI is accomplished through the use of conditional statements such as Case Structures and the First Call function.
Requirements
Steps to Implement or Execute Code
1.Download the attached VI's and save them to a single location.
2.Open Connection Example.VI and enter the required connection parameters on the front panel.
3.Run the VI to connect to the database sever.
4.If no errors are generated the connection was successful.
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.
It should be noted that the above probably won't work on a 64 bit machine. You'll get one of these errors:
The correct connection information string starts with something like DRIVER={MySQL ODBC 5.2w Driver}. You may have to download the 32 bit connection tool to make that work: http://dev.mysql.com/downloads/connector/odbc/
The string inside the braces {MySQL ODBC 5.2w Driver} should reflect the name you see in the "Create New Data Source" prompt when you try and create a new DSN from the 32 bit version of ODBC Data Source Administrator (not the version in the control panel, the version in C:\Windows\SysWOW64) If someone knows how to programmatically generate a list of those driver names, that might be handy.