What are the differences between the VB 6 and C API DAQmx Enum?Primary Software: Measurement Studio>>Visual Basic SupportPrimary Software Version: 1.0 Primary Software Fixed Version: N/A Secondary Software: Driver Software>>NI-DAQmx
Problem: What are the differences between the VB 6 and C API DAQmx Enum? Solution: The VB 6 API for DAQmx is based on the C API for DAQmx, but there are some differences in the enumeration constants. For example, the DAQmxCreateAIVoltageChan function takes a terminalConfig parameter as an enum. The valid values for this parameter in C are DAQmx_Val_RSE, DAQmx_Val_NRSE, DAQmx_Val_Diff, etc. For VB 6, these enums will give a “Variable Not Defined” error. In VB 6, you need to use the following enums for the termincalConfig parameter: DAQmx_Val_InputTermCfg_RSE, DAQmx_Val_InputTermCfg_NRSE, DAQmx_Val_InputTermCfg_Diff, etc. respectively. If you ever run into a problem where the VB 6 enumeration definitions are different from the C enumeration definition, you can use the Object Browser to view all of the valid VB 6 enumeration definitions for the DAQmx API. In VB 6, open a DAQmx example and then select View » Objet Browser. After that, you can select NIDAQmxCAPI from the available libraries in the top left. Once NIDAQmxCAPI is selected you can select any object from the left pane such as DAmxInputTermCfg, and all of the available enumeration definitions are listed in the main pane. See the screen shot below for an example. ![]() Related Links: Knowledge Base 41P6PDLA: NI-DAQmx Examples for Visual Basic 6.0 Knowledge Base 39BF3M1E: NI-DAQmx Support in Visual Basic 6.0 Attachments:
Report Date: 07/02/2008 Last Updated: 07/08/2008 Document ID: 4N1CTIQX |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

