User’s Manual Model MX190 API for the MX100/DARWIN IM MX190-01E Yokogawa Electric Corporation 3rd Edition
Foreword Notes • The contents of this manual are subject to change without prior notice as a result of continuing improvements to the instrument’s performance and functions. • Every effort has been made in the preparation of this manual to ensure the accuracy of its contents. However, should you have any questions or find any errors, please contact your nearest YOKOGAWA representative, dealer, or sales office.
Terms and Conditions of the Software License NOTICE - PLEASE READ CAREFULLY BEFORE USE Thank you very much for purchasing this medium containing a software program and related documentation provided by Yokogawa Electric Corporation (hereinafter called “Yokogawa”), and the program contained, embedded, inserted or used in the medium (hereinafter called the “Yokogawa Software Program”).
Terms and Conditions of the Software License 4.3 When Yokogawa decides in its own judgement that it is necessary, Yokogawa may from time to time provide the Licensee with Revision upgrades and Version upgrades separately specified by Yokogawa (hereinafter called “Updates”). 4.4 Notwithstanding the preceding Paragraph 4.3, in no event shall Yokogawa provide Updates where the Licensee or any third party conducted renovation or improvement of the Licensed Software. 4.
Checking the Contents of the Package Unpack the box and check the contents before operating the software. If some of the contents are not correct, or if any items are missing or damaged, contact the dealer from whom you purchased them.
Handling Precautions of the CD-ROM Overview of Functions Make sure to observe the precautions below. WARNING • Do not use or store the CD-ROM in a place with excessive dirt or dust. • Do not touch the non-printed side of the CD-ROM. Oil and sweat from the fingertips sticking to the surface can cause malfunctions. Do not write on the CD-ROM. • Lead from pencils and residue from erasers sticking to the surface can also cause malfunction. • Do not bend or scratch the CD-ROM.
How to Use This Manual Structure of this Manual This user’s manual consists of the following twenty-six chapters, appendix, and index. ChTitle Description 1 Before Using the Software Gives an overview of the API for the MX100/DARWIN. Describes the PC requirements needed to run the software, the installation procedures, and other information. 2 API for MX100 - Visual C++ - Describes how to apply the API to the MX100 using Visual C++.
How to Use This Manual Description 18 MX100 Constants and Types Extended API - Visual Basic - Describes the details of the constants and types for the for MX100 that can be used by Visual C++, Visual C, Visual Basic, and Visual Basic.NET/C#. 19 DARWIN for Extended API - Visual C++ - Describes how to apply the extended API to DARWIN using Visual C++. Describes the functions and program examples. 20 DARWIN for Extended API - Visual C - Describes how to apply the extended API to DARWIN using Visual C.
Sample Programs • This manual contains sample programs for each programming language. • The sample programs can be downloaded from the Web site below. http://www.yokogawa.com/ns/daq/mx100/daq-mx100_01.htm * * viii You can access the Web site by clicking the Up-to-Date Information button on the startup screen of the user's manual CD-ROM and then moving on to MX100 PC-Based Data Acquisition Unit. URL is subject to change.
Format Used in This Manual The functions are explained using the following format. This format is also applied to the description of the function members of the classes. The name of the function. Syntax for Visual C++ or Visual C. autoFIFOMX Declaration statement int autoFIFOMX(DAQMX daqmx, int bAuto); for Visual Basic. Declaration Syntax Public Declare Function autoFIFOMX Lib "DAQMX" (ByVal daqmx As Long, ByVal bAuto As Long) As Long Parameters daqmx bAuto Specify the device descriptor.
Format Used in This Manual Reference A function consists of multiple, simpler functions. The Reference section lists the functions that make up a given function. This information can be used to understand the action of the function and/or troubleshoot errors. Functions for Visual C and Visual Basic are executed by calling the Visual C++ class instance. Therefore, the Reference section lists the class name and the member function name and/or the function name. The names are listed in alphabetical order.
CONTENTS Foreword ......................................................................................................................................... i Terms and Conditions of the Software License ............................................................................... ii Checking the Contents of the Package .......................................................................................... iv Handling Precautions of the CD-ROM ............................................................
Contents Chapter 8 DARWIN - Visual C 8.1 8.2 Functions and Their Functionalities - DARWIN/Visual C - ............................................... 8-1 Programming - DARWIN/Visual C - ................................................................................. 8-4 Chapter 9 DARWIN - Visual Basic 9.1 9.2 Functions and Their Functionalities - DARWIN/Visual Basic - ......................................... 9-1 Programming - DARWIN/Visual Basic - .......................................................
Contents Chapter 18 MX100 Constants and Types for Extended API - Visual Basic 18.1 18.2 18.3 18.4 Overview of the MX100 Constants ................................................................................ 18-1 MX100 Constants .......................................................................................................... 18-3 MX100 Setting Item Numbers ...................................................................................... 18-19 MX100 Types ..................................
Contents Chapter 24 DARWIN for Extended API - Visual C/Visual Basic/Visual Basic.NET/C# 24.1 24.2 24.3 24.4 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions ......................................................................................... 24-1 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions ....................................................................................................
Chapter 1 Before Using the API 1.1 1 Introduction to Functions This software provides the API (Application Programming Interface) that supports the MX100 and DARWIN, and the extension API that makes the main API easier to use. MX100: All models DARWIN: All models (DA, DC, and DR). However, the Ethernet communication function (Ethernet module) is required.
1.1 Introduction to Functions • Retrieval of transmission output data Data that indicates the AO/PWM channel transmission status. When data is retrieved, it indicates the status of the current transmission output. When data is sent, it is the specification that controls the start and stop of the transmission output.
1.1 Introduction to Functions 1 Before Using the API • Retrieval of setup data Retrieves the setup data of the operation mode, basic setting mode, and A/D calibration mode. • Retrieval of channel information data (channel number, etc.
1.2 Software Components and Features Software Components The software consists of the API and an extension API. The software provides Visual C++ classes. The classes are Common Class, MX100 class, and DARWIN class. The MX100 Class and DARWIN Class are derived from the Common Class. Functions used by Visual C, Visual Basic, Visual Basic.NET, and C# are provided. Functions for the MX100 and functions for DARWIN are also available. These functions are executed by calling the Visual C++ class instance.
1.2 Software Components and Features 1 Files Included Type Executable module Include file Library file Standard module for Visual Basic API viewer text file Standard module for Visual Basic.NET Standard module for C# IM MX190-01E Extension Description .dll Executable files. .h Include file for Visual C and Visual C++. .lib Files linked in Visual C and Visual C++. .bas Files containing definitions for Visual Basic. .txt Files containing functions, types, and constants for Visual Basic in text format.
1.3 Operating Environment PC (Personal Computer) The software can be used by installing the API on a PC that meets the conditions below. Note • No limitation is placed on the CPU, memory, and hard disk. However, the performance of the software depends on them. • At least 10 MB of free space on the hard disk is required for installing the API. Operating System One of the following operating systems must be running. • Windows NT 4.
1.3 Operating Environment 1 MX100 Before Using the API No limitations in particular. DARWIN DA100, DC100, DR130, DR230, or DR240 The Ethernet communication function (Ethernet module) is required.
1.4 Installation Procedure 1. Turn ON the PC and allow the operating system to start. Note Close memory resident programs such as virus protection programs before installation. 2. Insert the CD-ROM containing the software into the CD-ROM drive. 3. After a few moments, the DAQMASTER DARWIN MXAPI window and the Install Shield Wizard window appear. Next, the following screen appears. Follow the instructions on the screen. If the DAQMASTER DARWIN MXAPI window does not appear, carry out the procedure below.
Chapter 2 MX100 - Visual C++ - 2.1 MX100 Class The API consists of the MX100/DARWIN Common Class and the class dedicated to 2 the MX100 (see the figure below).
2.1 MX100 Class CDAQMXAOPWMData Class for storing the AO/PWM data on the MX100. It is a wrapper class of the MXAOPWMData structure. CDAQMXBalanceData Class for storing the initial balance data on the MX100. It is a wrapper class of the MXBalanceData structure. CDAQMXBalanceResult Class for storing the initial balance results on the MX100. It is a wrapper class of the MXBalanceResult structure. CDAQMXChConfig Class Class derived from the CDAQMXChID class. Class for storing the channel setup data.
2.1 MX100 Class CDAQMXDOData Class Class for storing the DO data. It is a wrapper class of the MXDOData structure. 2 CDAQMXNetInfo Class CDAQMXOutputData Class for storing the output channel data of the MX100. It is a wrapper class of the MXOutputData structure. CDAQMXSegment Class Class for storing the display pattern of the 7-segment LED. It is a wrapper class of the MXSegment structure. CDAQMXStatus Class Class for storing the MX100 status data. It is a wrapper class of the MXStatus structure.
2.2 Correspondence between the Functions and Class/Member Functions - MX100 This section indicates the correspondence between the functions that the software supports and the class. Communication Functions Function Connect to the MX100. Disconnect from the MX100. Set the communication timeout.
2.
2.2 Correspondence between the Functions and Class/Member Functions - MX100 Setup Changes Function Range setting SKIP (not used) DC voltage input Thermocouple input RTD input Digital input (DI) Difference computation between channels Remote RJC Resistance Strain AO PWM Pulse Communication Set the unit name of the channel. Set the channel tag. Set a comment for the channel. Set the alarm. Set the RJC used on the channel. Set the filter on the channel. Set the burnout detection action.
2.2 Correspondence between the Functions and Class/Member Functions - MX100 Note • To change the settings, use CDAQMX::getConfig to retrieve the setup data, use the setup change function member to modify the settings, and use CDAQMX::setConfig to set the data to the MX100 collectively. • For AO/PWM data, after modifying the contents of CDAQMXAOPWMData with the setup change function member, use CDAQMX::setAOPWMData to set the data on the MX100 collectively.
2.2 Correspondence between the Functions and Class/Member Functions - MX100 Retrieval of Measured Data (FIFO Designation) Function Get the most-recent data range of the specified FIFO no. Declare the retrieval of the measured data of the specified FIFO number. Declare the retrieval of the instantaneous values of the specified FIFO number. Get the time information of the specified FIFO number for each data number. Get the measured data of the specified FIFO number.
2.3 Programming - MX100/Visual C++ - Adding the Path of the Include File 2 include file varies depending on the environment used. Declaration in the Source File Write the declaration in the source file. #include "DAQMX.h" Note The include file of the common section (DAQHandler.h) is referenced from the include file described above. Thus, declaration for it is not necessary. Library Designation Add the library (DAQMX.lib, DAQ Handler.lib) to the project.
2.3 Programming - MX100/Visual C++ - Retrieval of the Measured Data Program Example 1 This program retrieves measured data. ////////////////////////////////////////////////////////////// // MX100 sample for measurement #include #include "DAQMX.
2.3 Programming - MX100/Visual C++ - Flow of the Process The flow chart shown below omits the declaration section.
2.3 Programming - MX100/Visual C++ - Retrieval of Data Range getFIFODataNo(0, &startNo, &endNo) Retrieves the range from the next data following the data retrieved last to the most recent data of the specified FIFO number using data numbers. Talker talkFIFOData(0, startNo, endNo) Specifies the data range and declares the retrieval of the FIFO data (measured data retrieval declaration).
2.3 Programming - MX100/Visual C++ - Retrieval of Setup Data and Configuration Program Example 2 This program executes the following three items. This program contains all three items, but each item can be written and executed separately. 2 • Setting a DC voltage range for the channels ////////////////////////////////////////////////////////////// // MX100 sample for configuration #include #include "DAQMX.
2.3 Programming - MX100/Visual C++ Note The setup data can also be retrieved using the talkConfig member function and the getChConfig member function. The talkConfig function is used to declare the retrieval of the setup data and retrieve the system configuration data, status, and network information data. Then, the getChConfig function is used to retrieve channel setup data in units of channels.
2.4 Details of the MX100/DARWIN Common Class 2 The classes are listed in alphabetical order by the class name. This class is a base class of the channel information data. If necessary, you can override member data manipulation with an inheritance class. A function is provided that checks whether the instance has inherited this class. You can override with an inheritance class. Public Members Construct/Destruct CDAQChInfo ~CDAQChInfo Constructs an object. Destructs an object.
2.4 Details of the MX100/DARWIN Common Class Private Members None. Member Functions (Alphabetical Order) CDAQChInfo::CDAQChInfo Syntax CDAQChInfo(int chType = 0, int chNo = 0, int point= 0); virtual ~CDAQChInfo(void); Parameters chType Specify the channel type. chNo point Specify the channel number. Specify the decimal point position. Description Constructs or destructs an object. When constructing, the data member is set to the specified value.
2.4 Details of the MX100/DARWIN Common Class CDAQChInfo::getPoint Syntax virtual int getPoint(void); 2 MX100 -Visual C++ Description Gets the value of the decimal point position field of the data member. Return value Returns the decimal point position. CDAQChInfo::initialize Syntax virtual void initialize(void); Description Initializes the data member. The default value is 0.
2.4 Details of the MX100/DARWIN Common Class CDAQChInfo::setChNo Syntax virtual void setChNo(int chNo); Parameters chNo Specify the channel number. Description Stores the specified value in the channel number field of the data member. CDAQChInfo::setChType Syntax virtual void setChType(int chType); Parameters chType Specify the channel type. Description Stores the specified value in the channel type field of the data member.
2.4 Details of the MX100/DARWIN Common Class CDAQDataInfo Class data. If necessary, you can override member data manipulation with an inheritance class. A function is provided that checks whether the instance has inherited this class. You can override with an inheritance class. Public Members Construct/Destruct CDAQDataInfo Constructs an object. ~CDAQDataInfo Destructs an object. Member Data Manipulation initialize Initializes the data member. getValue setValue Gets the data value.
2.4 Details of the MX100/DARWIN Common Class Member Functions (Alphabetical Order) CDAQDataInfo::CDAQDataInfo Syntax CDAQDataInfo(int value = 0, CDAQChInfo * pcChInfo = NULL); virtual ~CDAQDataInfo(void); Parameters value Specify the data value. pcChInfo Specify the association with the channel information data. Description Constructs or destructs an object. When constructing, the data member is set to the specified value. When destructing, the associated channel information data is not deleted.
2.4 Details of the MX100/DARWIN Common Class CDAQDataInfo::getStringValue Syntax 2 int getStringValue(char * strValue, int lenValue); strValue lenValue Specify the field where the string is to be stored. Specify the byte size of the field where the string is to be stored. Description Generates the measured value from the data value of the data member and the decimal point position associated with the channel information data.
2.4 Details of the MX100/DARWIN Common Class CDAQDataInfo::isObject Syntax virtual int isObject(const char * classname = "CDAQDataInfo"); Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited. If parameters are omitted, checks whether it is this class. Classes that inherit this class must be overriden in order to check their own classes. Returns true (valid) if the class was inherited. Otherwise, returns false (invalid).
2.4 Details of the MX100/DARWIN Common Class CDAQDataInfo::setValue Syntax 2 virtual void setValue(int value); value MX100 -Visual C++ Parameters Specify the data value. Description Stores the specified value in the data value field of the data member. CDAQDataInfo::toDoubleValue Syntax static double toDoubleValue(int value, int point); Parameters value Specify the data value. point Specify the decimal point position.
2.4 Details of the MX100/DARWIN Common Class CDAQDateTime Class This class is a base class of time information data. Numbers of seconds and milliseconds are passed to the data member. If necessary, you can override member data manipulation with an inheritance class. A function is provided that checks whether the instance has inherited this class. You can override with an inheritance class. Public Members Construct/Destruct CDAQDateTime Constructs an object. ~CDAQDateTime Destructs an object.
2.4 Details of the MX100/DARWIN Common Class Member Functions (Alphabetical Order) 2 CDAQDateTime::CDAQDateTime MX100 -Visual C++ Syntax CDAQDateTime(time_t time = 0, int millisecond = 0); virtual ~CDAQDateTime(void); Parameters time Specify seconds. milliSecond Specify milliseconds. Description Constructs or destructs an object. When constructing, the data member is set to the specified value.
2.4 Details of the MX100/DARWIN Common Class CDAQDateTime::isObject Syntax virtual int isObject(const char * classname = "CDAQDateTime"); Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited. If parameters are omitted, checks whether it is this class. Classes that inherit this class must be overriden in order to check their own classes. Returns true (valid) if the class was inherited. Otherwise, returns false (invalid).
2.4 Details of the MX100/DARWIN Common Class CDAQDateTime::setTime Syntax 2 virtual void setTime(time_t time); time MX100 -Visual C++ Parameters Specify seconds. Description Stores the specified value in the seconds field of the data member.
2.4 Details of the MX100/DARWIN Common Class CDAQHandler Class This class is a base class of the handler. It provides communication functions. The communication format is TCP/IP. The communication is controlled using the communication descriptor. The communication descriptor is stored in the communication descriptor field of the data member using a pointer to the general type. The communication descriptor is constructed when the connection is made and destructed when the connection is dropped.
2.4 Details of the MX100/DARWIN Common Class Protected Members Data Members m_comm 2 Field for storing the communication descriptor. MX100 -Visual C++ m_nRemainSize Field for storing the remaining size of the received data. Communication Functions send Sends the data. receive Receives the data. Utilities receiveRemain Receives the remaining bytes and discards them. getVersionDLL getRevisionDLL Gets the version number of the DLL. Gets the revision number of the DLL.
2.4 Details of the MX100/DARWIN Common Class CDAQHandler::close Syntax virtual int close(void); Description Drops the connection. Destructs the communication descriptor. Return value Returns an error number. Error: Not connected Not connected. Communication error An error was detected in communications. CDAQHandler::getChannel Syntax virtual int getChannel(int chType, int chNo, CDAQChInfo & cChInfo); Parameters chType Specify the channel type. chNo cChInfo returned. Specify the channel number.
2.4 Details of the MX100/DARWIN Common Class CDAQHandler::getData Syntax 2 virtual int getData(int chType, int chNo, CDAQDateTime & cDateTime, CDAQDataInfo & cDataInfo); MX100 -Visual C++ Parameters chType chNo Specify the channel type. Specify the channel number. cDateTime Specify the destination where the time information data is to be returned. cDataInfo Specify the destination where the measured data is to be returned.
2.4 Details of the MX100/DARWIN Common Class CDAQHandler::getMaxLenErrorMessage Syntax static const int getMaxLenErrorMessage(void); Description Gets the maximum length of the error message string. The value is the number of bytes. The return value does not include the terminator. Return value Returns the length of the string. CDAQHandler::getRevisionAPI Syntax static const int getRevisionAPI(void); Description Gets the revision number of this API. Return value Returns the revision number.
2.4 Details of the MX100/DARWIN Common Class CDAQHandler::getVersionDLL Syntax 2 static const int getVersionDLL(void); MX100 -Visual C++ Description Gets the version number of the DLL. Return value Returns the version number. CDAQHandler::isObject Syntax virtual int isObject(const char * classname = "CDAQHandler"); Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited.
2.4 Details of the MX100/DARWIN Common Class CDAQHandler::receive Syntax virtual int receive(unsigned char * bufData, int maxData, int * lenData); Parameters bufData Specify the field where the received data is to be stored using a byte array. maxData lenData Specify the byte size of the received data. Specify the destination where the byte size of the actual data received is returned. Description Stores the received data in the field specified by the parameter up to the specified byte size.
2.4 Details of the MX100/DARWIN Common Class CDAQHandler::receiveRemain Syntax 2 int receiveRemain(void); If the remaining size field is greater than 0, the amount of data that is equal to the remaining size is received and discarded. The remaining size field is set to 0. If the remaining size field is 0 or less, the operation concludes successfully. Return value Returns an error number.
2.4 Details of the MX100/DARWIN Common Class CDAQHandler::sendLine Syntax virtual int sendLine(const char * strLine); Parameters strLine Specify the string to be sent. Description Sends the specified string. The line feed is added to the string before it is sent. Specify the string excluding the line feed. Return value Returns an error number. Error: Not connected Communication error Not connected. An error was detected in communications.
2.5 Details of the MX100 Class 2 The classes are listed in alphabetical order by the class name. MX100 -Visual C++ CDAQMX Class CDAQHandler CDAQMX This class is derived from the CDAQHandler class. This class provides functions for the MX100. The communication is in binary, therefore do not use primitive communication functions of the base class. Information necessary for communications is stored internally.
2.5 Details of the MX100 Class Setup Functions Collective Setup setConfig Sets the setup data. setMXConfig setOutput Sets the basic settings. Sets the basic setting output channel data. setBalance runBalance Sets initial balance data. Executes initial balancing. resetBalance Initializes the initial balance value. Data Retrieval Functions Retrieval of System Status Data and System Configuration Data getStatusData getSystemConfig Gets the status. Gets the system configuration data.
2.5 Details of the MX100 Class • Overridden Members Communication Functions open Establishes connection. 2 Data Retrieval Functions Gets the measured data. getChannel Gets the channel information data. MX100 -Visual C++ getData Utilities isObject Checks an object. • Inherited Members See CDAQHandler.
2.5 Details of the MX100 Class m_nDataNum m_nChNum Field for storing the data number. Field for storing the number of channels. m_nTimeNum Field for storing the remaining number of time information data of the measured data. m_packetVer m_nItemError Field for storing the communication packet version. Field for storing the setting item number. m_bTalkConfig m_bTalkChInfo Declaration flag for retrieval of the setup data. Declaration flag for retrieval of the channel information data.
2.5 Details of the MX100 Class Private Members None. 2 MX100 -Visual C++ Member Functions (Alphabetical Order) CDAQMX::autoFIFO Syntax int autoFIFO(int bAuto); Parameters bAuto Specify auto control using a Boolean value. Description Sets auto control. Stores the specified value in the automatic control field of the data member. When enabled, the FIFO is started. Return value Returns an error number.
2.5 Details of the MX100 Class CDAQMX::clearAttr Syntax void clearAttr(void); Description Initializes all the data members. The default value as a general rule is 0. Reference clearData CDAQMX::clearData Syntax void clearData(int sessionNo = 0); Parameters sessionNo Specify the session number. Description Initializes the data member to start the retrieval of the measured data. Stores the specified value in the session number field of the data member.
2.5 Details of the MX100 Class CDAQMX::formatCF Syntax virtual int formatCF(void); 2 MX100 -Visual C++ Description Formats the CF card. The FIFO stops. If auto control is enabled, the FIFO starts after the function completes successfully. Return value Returns an error number.
2.5 Details of the MX100 Class CDAQMX::getBalance Syntax int getBalance(CDAQMXBalanceData & cMXBalanceData); Parameters cMXBalanceData Specify the destination where the initial balance data is to be returned. Description Gets initial balance data. Gets the setup data, and stores the initial balance data portion in the specified return destination. Return value Returns an error number.
2.5 Details of the MX100 Class CDAQMX::getChConfig Syntax int getChConfig(CDAQMXChConfig & cMXChConfig, int * pFlag = NULL); 2 MX100 -Visual C++ Parameters cMXChConfig Specify the destination where the channel setup data is to be pFlag returned. Specify the destination where the flag is to be returned. Description Gets the channel information data that was declared to be retrieved using the talkConfig function in units of channels. Analyzes information and stores the data in the return destination.
2.5 Details of the MX100 Class CDAQMX::getChData Syntax int getChData(MXDataNo * dataNo, CDAQMXDataInfo & cMXDataInfo, int * pFlag = NULL); Parameters dataNo cMXDataInfo Specify the destination where the data number is to be returned. Specify the destination where the measured data is to be returned. pFlag Specify the destination where the flag is to be returned. Description Gets the measured data that was declared to be retrieved using the talkChData and talkFIFOData functions in units of channels.
2.5 Details of the MX100 Class CDAQMX::getChInfo Syntax int getChInfo(CDAQMXChInfo & cMXChInfo, int * pFlag = NULL); cMXChInfo Specify the destination where the channel information data is to be returned. pFlag Specify the destination where the flag is to be returned. Description Gets the channel information data that was declared to be retrieved using the talkChInfo function in units of channels. Analyzes information and stores the data in the return destination.
2.5 Details of the MX100 Class CDAQMX::getData Syntax virtual int getData(int chType, int chNo, CDAQDateTime & cDateTime, CDAQDataInfo & cDataInfo); Parameters chType chNo cDateTime cDataInfo Specify the channel type. Specify the channel number. Specify the destination where the time information data is to be returned. Specify the destination where the measured data is to be returned. Description This function gets the instantaneous values in units of channels.
2.5 Details of the MX100 Class CDAQMX::getDOData Syntax int getDOData(CDAQMXDOData & cMXDoData); 2 cMXDoData MX100 -Visual C++ Parameters Specify the destination where the DO data is to be returned. Description Gets the DO data. Gets the data of all the channels collectively. Return value Returns an error number.
2.5 Details of the MX100 Class CDAQMX::getLastError Syntax int getLastError(void); Description Gets the value in the MX100-specific error field from the data member. Return value Returns the MX100-specific error. CDAQMX::getMXConfig Syntax int getMXConfig(CDAQMXConfig & cMXConfig); Parameters cMXConfig Specify the destination where the setup data is to be returned. Description Gets the basic settings. Packets differ with the style number of the MX100. Return value Returns an error number.
2.5 Details of the MX100 Class CDAQMX::getOutput Syntax int getOutput(CDAQMXOutputData & cMXOutputData); 2 MX100 -Visual C++ Parameters cMXOutputData Specify the destination where the output channel data is to be returned. Description Gets the basic output channel data. Gets the setup data, and stores the output channel data portion in the specified return destination. Return value Returns an error number.
2.5 Details of the MX100 Class CDAQMX::getStatusData Syntax int getStatusData(CDAQMXStatus & cMXStatus); Parameters cMXStatus Specify the destination where the status data is to be returned. Description Gets the status data. Packets differ with the style number of the MX100. Return value Returns an error number. Error: Not support Unsupported version.
2.5 Details of the MX100 Class CDAQMX::getTimeData Syntax int getTimeData(MXDataNo * dataNo, CDAQMXDateTime & cMXDateTime, MXUserTime * pUserTime = NULL, int * pFlag =NULL); dataNo cMXDateTime pUserTime pFlag Specify the destination where the data number is to be returned. Specify the destination where the time information data is to be returned. Specify the destination where the user count is to be returned. Specify the destination where the flag is to be returned.
2.5 Details of the MX100 Class CDAQMX::incCurDataNo Syntax MXDataNo incCurDataNo(void); Description Gets the value in the current data number field from the data member. Increments the current data number. When the end data number is exceeded, the number is reset to the start data number. Return value Returns the current data number. CDAQMX::incCurFIFOIdx Syntax int incCurFIFOIdx(void); Description Gets the value in the channel sequence number field in the current FIFO from the data member.
2.5 Details of the MX100 Class CDAQMX::isObject Syntax virtual int isObject(const char * classname = "CDAQMX"); 2 classname MX100 -Visual C++ Parameters Specify the class name using a string. Description Checks whether the specified class name was inherited. If parameters are omitted, checks whether it is this class. Classes that inherit this class must be overridden in order to check their own classes. Returns true (valid) if the class was inherited. Otherwise, returns false (invalid).
2.5 Details of the MX100 Class CDAQMX::open Syntax virtual int open(const char * strAddress, unsigned int uiPort = DAQMX_COMMPORT); Parameters strAddress Specify the IP address as a string. uiPort Specify the port number. Description Connects to the device with the IP address and port number specified by the parameters. The port number can be omitted. If omitted, it is set to the MX100 communication port number. Initializes the data member. Executes the registry command.
2.5 Details of the MX100 Class CDAQMX::receiveBuffer Syntax int receiveBuffer(unsigned char * pBuf, int lenBuf, int * realLen, int * sizeBuf = NULL) 2 pBuf lenBuf realLen sizeBuf Specify the field where the data is to be stored using a byte array. Specify the number of bytes of the data field. Specify the destination where the byte size of the actual data received is returned. Specify the destination where the size information is to be returned.
2.5 Details of the MX100 Class CDAQMX::registry Syntax int registry(void); Description Executes a command. This command notifies the MX100 main unit of the PC information (host name and address). Stores the communication packet version in the communication packet version field of the data member. Return value Returns an error number.
2.5 Details of the MX100 Class CDAQMX::runBalance Syntax int runBalance(CDAQMXBalanceResult & cMXBalanceResult); 2 cMXBalanceResult Specify the destination where the initial balance result is to be returned. Description Executes initial balancing. Stores the execution result, initial balance result, and initial balance value in the specified return destination. Execution takes place only on channels specified as valid. The FIFO stops.
2.5 Details of the MX100 Class CDAQMX::runPacket Syntax virtual int runPacket(unsigned char * reqBuf, int lenReq, unsigned char * ackBuf, int lenAck); Parameters reqBuf Specify the request packet using a byte array. lenReq ackBuf Specify the byte size of the request packet. Specify the field where the response packet is to be stored using lenAck a byte array. Specify the byte size of the response packet. Description Sends the specified request packet and receives the response packet.
2.5 Details of the MX100 Class CDAQMX::sendPacket Syntax virtual int sendPacket(unsigned char * reqBuf, int lenReq); 2 reqBuf Specify the request packet using a byte array. lenReq Specify the byte size of the request packet. MX100 -Visual C++ Parameters Description Encodes the specified packet and sends it. Return value Returns an error number. Reference send CDAQMX::setAOPWMData Syntax int setAOPWMData(CDAQMXAOPWMData & cMXAOPWMData); Parameters cMXAOPWMData Specify the AO/PWM data.
2.5 Details of the MX100 Class CDAQMX::setBalance Syntax int setBalance(CDAQMXBalanceData & cMXBalanceData); Parameters cMXBalanceData Specify initial balance data. Description Sets initial balance data. Gets the setup data, updates it according to the specified initial balance data, and sends the setup data. Only channels specified as valid are updated. Return value Returns an error number.
2.5 Details of the MX100 Class CDAQMX::setBalance Syntax int setBalance(CDAQMXBalanceData & cMXBalanceData); 2 cMXBalanceData Specifies initial balance data. Description Sets initial balance data. Gets the setup data, updates it according to the specified initial balance data, and sends the setup data. Only channels specified as valid are updated. Return value Returns an error number.
2.5 Details of the MX100 Class CDAQMX::setDateTime Syntax virtual int setDateTime(CDAQMXDateTime * pcMXDateTime = NULL); Parameters pcMXDateTime Specify the time information data. Description Sets time information data on the device. If the parameter’s time information data is omitted, the current date/time of the PC is used. Milliseconds are discarded. The FIFO stops. If auto control is enabled, the FIFO starts after the function completes successfully.
2.5 Details of the MX100 Class CDAQMX::setMXConfig Syntax int setMXConfig(CDAQMXConfig & cMXConfig); 2 cMXConfig MX100 -Visual C++ Parameters Specify the setup data. Description Sets basic settings on the device. The input data is validated before it is sent. The FIFO stops. If auto control is enabled, the FIFO starts after the function completes successfully. Packets differ with the style number of the main unit.
2.5 Details of the MX100 Class CDAQMX::setSegment Syntax int setSegment(int dispType, int dispTime, CDAQMXSegment & cNewMXSegment, CDAQMXSegment & cOldMXSegment); Parameters dispType Specify the display format. dispTime cNewMXSegment Specify the display time. Specify the display pattern. cOldMXSegment Specify the destination where the previous display pattern is to be returned. Description Sets the display of the 7-segment LED.
2.5 Details of the MX100 Class CDAQMX::setUserTime Syntax void setUserTime(MXUserTime userTime); 2 userTime MX100 -Visual C++ Parameters Specify the user count. Description Stores the specified value in the user count field of the data member. CDAQMX::startFIFO Syntax int startFIFO(void); Description Starts the FIFO. Gets the channel information data and sets necessary information in the data member related to the retrieval of the measured data. Return value Returns an error number.
2.5 Details of the MX100 Class CDAQMX::talkChData Syntax int talkChData(int chNo, MXDataNo startDataNo = DAQMX_INSTANTANEOUS, MXDataNo endDataNo = DAQMX_INSTANTANEOUS); Parameters chNo Specify the channel number. startDataNo endDataNo Specify the start data number. Specify the end data number. Description Declares the retrieval of the measured data. Gets the measured data in the specified data number range. The range that is actually retrieved is not necessarily equal to the specified range.
2.5 Details of the MX100 Class CDAQMX::talkConfig Syntax int talkConfig(CDAQMXSysInfo & cMXSysInfo, CDAQMXStatus & cMXStatus, CDAQMXNetInfo & cMXNetInfo); 2 cMXSysInfo Specify the destination where the system configuration data is to cMXStatus be returned. Specify the destination where the status data is to be returned. cMXNetInfo Specify the destination where the network information data is to be returned. Description Declares the retrieval of the setup data.
2.5 Details of the MX100 Class CDAQMXAOPWMData Class This class stores the AO/PWM data of the MX100. It is a wrapper class of the MXAOPWMData structure. It is a group of AO/PWM data from all the channels. Each data can be accessed by PWM data number or AO data number. This class can be used as an interface for setting and retrieving AO/PWM data. This class supports the utility that converts the specified output data values and actual output values.
2.5 Details of the MX100 Class Private Members None. 2 MX100 -Visual C++ Member Functions CDAQMXAOPWMData::CDAQMXAOPWMData Syntax CDAQMXAOPWMData(MXAOPWMData * pMXAOPWMData = NULL); virtual ~CDAQMXAOPWMData(void); Parameters pMXAOPWMData Specify AO/PWM data. Description Constructs or destructs an object. When constructing, the data member is set to the specified value. If not specified, the data member is initialized.
2.5 Details of the MX100 Class CDAQMXAOPWMData::getAOPWMValue Syntax int getAOPWMValue(int aopwmNo); Parameters aopwmNo Specify the AO/PWM data number. Description Gets the output data value of the specified data number from the data member. Returns 0 if it does not exist. Return value Returns the output data value. Reference getMXAOPWM CDAQMXAOPWMData::getMXAOPWM Syntax MXAOPWM * getMXAOPWM(int aopwmNo); Parameters aopwmNo Specify the AO/PWM data number.
2.5 Details of the MX100 Class CDAQMXAOPWMData::initMXAOPWMData Syntax static void initMXAOPWMData(MXAOPWMData * pMXAOPWMData); 2 pMXAOPWMData MX100 -Visual C++ Parameters Specify AO/PWM data field. Description Initializes the specified field. The default value as a general rule is 0. CDAQMXAOPWMData::isObject Syntax virtual int isObject(const char * classname = "CDAQMXAOPWMData"); Parameters classname Specify the class name using a string.
2.5 Details of the MX100 Class CDAQMXAOPWMData::setAOPWM Syntax void setAOPWM(int aopwmNo, int bValid, int iAOPWMValue); Parameters aopwmNo Specify the AO/PWM data number. bValid iAOPWMValue Specify the Boolean value. Specify the output data value. Description Stores the specified value in the field indicated by the specified data number of the data member. If the data number is set to the constant for “Specify All AO/PWM data numbers,” the same value is stored to all data.
2.5 Details of the MX100 Class CDAQMXAOPWMData::toRealValue Syntax static double toRealValue(int iAOPWMValue, int iRangeAOPWM); iAOPWMValue Specify the output data value. iRangeAOPWM Specify the range type of the AO or PWM range. Description Converts the output data values to output values according to the specified range type. Returns 0 if the range type is invalid. Return value Returns the output value.
2.5 Details of the MX100 Class CDAQMXBalanceData Class This class stores the initial balance data of the MX100. It is a wrapper class of the MXBalanceData structure. It is a group of initial balance data of all the channels. Each data can be accessed by initial balance data number. The initial balance number is the number of the strain channel. This class can be used as an interface for setting and retrieving initial balance data. Public Members Construct/Destruct CDAQMXBalanceData Constructs an object.
2.5 Details of the MX100 Class Private Members None. 2 MX100 -Visual C++ Member Functions CDAQMXBalanceData::CDAQMXBalanceData Syntax CDAQMXBalanceData(MXBalanceData * pMXBalanceData = NULL); virtual ~CDAQMXBalanceData(void); Parameters pMXBalanceData Specify initial balance data. Description Constructs or destructs an object. When constructing, the data member is set to the specified value. If not specified, the data member is initialized.
2.5 Details of the MX100 Class CDAQMXBalanceData::getBalanceValue Syntax int getBalanceValue(int balanceNo); Parameters balanceNo Specify the initial balance data number. Description Gets the initial balance value of the specified data number from the data member. Returns 0 if it does not exist. Return value Returns the initial balance value.
2.5 Details of the MX100 Class CDAQMXBalanceData::initialize Syntax virtual void initialize(void); 2 MX100 -Visual C++ Description Initializes the data member. The default value as a general rule is 0. Reference initMXBalanceData CDAQMXBalanceData::isObject Syntax virtual int isObject(const char * classname = “CDAQMXBalanceData”; Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited.
2.5 Details of the MX100 Class CDAQMXBalanceData::setBalance Syntax void setBalance(int balanceNo, int bValid, int iBalanceValue); Parameters balanceNo Specify the initial balance data number. bValid iBalanceValue Specify the Boolean value. Specify the initial balance value. Description Stores the specified value in the field indicated by the specified data number of the data member.
2.5 Details of the MX100 Class CDAQMXBalanceResult Class CDAQMXBalanceData CDAQMXBalanceResult 2 MX100 -Visual C++ This class stores the initial balance result of the MX100. It is a wrapper class of the MXBalanceResult structure. It inherits the CDAQMXBalanceData class, and includes the initial balance data. It is an group of initial balance results of all the channels. Each data can be accessed by initial balance data number. The initial balance number is the number of the strain channel.
2.5 Details of the MX100 Class Inherited Members CDAQMXBalanceData Reference getMXBalanceData setMXBalanceData initMXBalanceData getBalanceValid getBalanceValue setBalance Protected Members Data Members See also, “Inherited Members.” m_MXBalanceResult Field for storing the initial balance result. Inherited Members CDAQMXBalanceData Reference getMXBalance m_MXBalanceData Private Members None.
2.5 Details of the MX100 Class CDAQMXBalanceResult::getMXBalanceResult Syntax void getMXBalanceResult(MXBalanceResult * pMXBalanceResult); pMXBalanceResult Specify the destination where the initial balance result is to be returned. Description Gets the data in a structure. Stores the contents of the data member in the specified structure. CDAQMXBalanceResult::getResult Syntax int getResult(int balanceNo); Parameters balanceNo Specify the initial balance data number.
2.5 Details of the MX100 Class CDAQMXBalanceResult::isObject Syntax virtual int isObject(const char * classname = "CDAQMXBalanceResult"); Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited. If parameters are omitted, checks whether it is this class. Classes that inherit this class must be overridden in order to check their own classes. Returns true (valid value) if the class was inherited. Otherwise, returns false (invalid).
2.5 Details of the MX100 Class CDAQMXBalanceResult::setMXBalanceResult Syntax void setMXBalanceResult(MXBalanceResult * pMXBalanceResult); pMXBalanceResult MX100 -Visual C++ Parameters Specify the initial balance result. Description Sets the data in a structure. Stores the contents in the structure specified in the data member. If not specified, the data member is initialized.
2.5 Details of the MX100 Class CDAQMXChConfig Class CDAQChInfo CDAQMXChID CDAQMXChConfig This class stores the channel setup data of the MX100. It is a wrapper class of the MXChConfig structure. This class can be used as an interface for storing setup data by channel when retrieving setup data. Public Members Construct/Destruct CDAQMXChConfig ~CDAQMXChConfig Constructs an object. Destructs an object. Structure Manipulation getMXChConfig setMXChConfig initMXChConfig Gets the data in a structure.
2.5 Details of the MX100 Class Range Settings Sets SKIP (not used). Sets DC voltage input. setTC setRTD Sets thermocouple input. Sets RTD input. setDI setDELTA Sets Digital input (DI). Sets difference computation between channels. setSpan setScalling Sets the span. Sets the scale. changeRange setRES Changes the range using the temperature unit type. Sets the resistance range. setSTRAIN setAO Sets the strain range. Sets the AO range. setPWM setCOM Sets the PWM range.
2.5 Details of the MX100 Class Protected Members Data Members m_MXChConfigAIDI m_MXChConfigAI Field for storing AI and DI setup data. Field for storing AI setup data. m_MXChConfigDO m_nItemError Field for storing DO setup data. Field for storing the setting item number. Inherited Members See CDAQChInfo. m_chNo m_chType m_point CDAQMXChIDReference m_alarm m_comment m_kind m_range m_scaleType m_tag m_unit m_valid getMXAlarm Private Members None.
2.5 Details of the MX100 Class CDAQMXChConfig::changeRange Syntax void changeRange(int iTempUnit); 2 iTempUnit Specify the temperature unit type. Description Changes the range using the temperature unit type. The settings of the thermocouple input and RTD input are set to default values. The span, scale, decimal point position, unit name, and reference channel number become the rated values. The alarm setting is initialized (cleared).
2.5 Details of the MX100 Class CDAQMXChConfig::getMXChConfig Syntax void getMXChConfig(MXChConfig * pMXChConfig); Parameters pMXChConfig Specify the destination where the channel setup data is to be returned. Description Gets the data in a structure. Stores the contents of the data member in the specified structure. Reference getMXChID CDAQMXChConfig::getRangeMax Syntax static int getRangeMax(int iRange, int iTempUnit = DAQMX_TEMPUNIT_C); Parameters iRange iTempUnit Specify the range type.
2.5 Details of the MX100 Class CDAQMXChConfig::getRangeMin Syntax static int getRangeMin(int iRange, int iTempUnit = DAQMX_TEMPUNIT_C); 2 MX100 -Visual C++ Parameters iRange Specify the range type. iTempUnit Specify the temperature unit type. Description Gets the minimum value of the setting range of the specified range type. Specify the detailed range of the digital input. Returns 0 if the designation is unknown. The value returned is the value without the decimal places.
2.5 Details of the MX100 Class CDAQMXChConfig::getRJCType Syntax int getRJCType(void); Description Gets the RJC type value from the AI setup data field of the data member. Return value Returns the RJC type. CDAQMXChConfig::getRJCVolt Syntax int getRJCVolt(void); Description Gets the RJC voltage value from the AI setup data field of the data member. Return value Returns the RJC voltage.
2.5 Details of the MX100 Class CDAQMXChConfig::getSpanMax Syntax int getSpanMax(void); 2 MX100 -Visual C++ Description Gets the maximum value of span from the AI and DI setup data field of the data member. Return value Returns the span maximum. CDAQMXChConfig::getSpanMin Syntax int getSpanMin(void); Description Gets the minimum value of span from the AI and DI setup data field of the data member. Return value Returns the span minimum.
2.5 Details of the MX100 Class CDAQMXChConfig::isChatFilter Syntax int isChatFilter(void); Description Gets the chattering filter value from the setup data storage field of the data member. The value of 0 is invalid; other values are valid. Return value Returns a Boolean value. CDAQMXChConfig::isCorrect Syntax int isCorrect(int iTempUnit = DAQMX_TEMPUNIT_C); Parameters iTempUnit Specify the temperature unit type. Description Checks the validity. Checks each setting item according to the channel type.
2.5 Details of the MX100 Class CDAQMXChConfig::isHold Syntax 2 int isHold(void); MX100 -Visual C++ Description Gets the hold action value from the DO setup data field of the data member. The value of 0 is invalid; other values are valid. Return value Returns a Boolean value. CDAQMXChConfig::isObject Syntax virtual int isObject(const char * classname = "CDAQMXChConfig"); Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited.
2.5 Details of the MX100 Class CDAQMXChConfig::operator= Syntax CDAQMXChConfig & operator=(CDAQMXChConfig & cMXChConfig); Parameters cMXChConfig Specify an object for substitution. Description Copies the data member of the specified object. Return value Returns the reference to the object. Reference getMXChConfig setMXChConfig CDAQMXChConfig::setAlarm Syntax void setAlarm(int levelNo, int iAlarmType, int value, int histerisys = 0); Parameters levelNo Specify the alarm level.
2.5 Details of the MX100 Class CDAQMXChConfig::setAO Syntax void setAO(int iRangeAO); 2 iRangeAO MX100 -Visual C++ Parameters Specify the AO range type. Description Sets the specified range. Makes the channel status valid. The settings are set to the default values of the specified range type. Holds the reference channel number according to the previously set channel type. For command AO channels, the reference channel number is the “undefined reference channel number.
2.5 Details of the MX100 Class CDAQMXChConfig::setCOM Syntax void setCOM(int iRangeCOM); Parameters iRangeCOM Specify the communication range from the range type. Description Sets the specified range. Makes the channel status valid. The settings are set to the default values of the specified range type. The channel type is set to the CAN Bus input. Any channels other than the communication range are ignored.
2.5 Details of the MX100 Class CDAQMXChConfig::setDELTA Syntax void setDELTA(int refChNo, int iRange, int iTempUnit = DAQMX_TEMPUNIT_C); 2 MX100 -Visual C++ Parameters refChNo iRange iTempUnit Specify the reference channel number. Specify the range type. Specify the temperature unit type. Description Sets the specified range. Makes the channel status valid. The settings are set to the default values of the specified range type. The channel types for the API before R3.
2.5 Details of the MX100 Class CDAQMXChConfig::setFilter Syntax void setFilter(int iFilter); Parameters iFilter Specify the filter coefficient. Description Stores the specified value in the AI setup data field of the data member. CDAQMXChConfig::setHold Syntax void setHold(int bHold); Parameters bHold Specify the hold action using a Boolean value. Description Stores the specified value in the DO setup data field of the data member.
2.5 Details of the MX100 Class CDAQMXChConfig::setPULSE Syntax 2 void setPULSE(int iRangePULSE); iRangePULSE MX100 -Visual C++ Parameters Specify the pulse range from the range type. Description Sets the specified range. Makes the channel status valid. The settings are set to the default values of the specified range type. The channel type is set to the pulse input. Any channels other than the pulse range are ignored.
2.5 Details of the MX100 Class CDAQMXChConfig::setRefAlarm Syntax void setRefAlarm(int refChNo, int levelNo, int bValid); Parameters refChNo Specify the reference channel number. levelNo bValid Specify the alarm level. Specify the Boolean value. Description Stores the specified value in the DO setup data field of the data member. If the constant for “Specify all reference channel numbers”is specified for the channel numbers to be referenced, the value is stored for all the channels.
2.5 Details of the MX100 Class CDAQMXChConfig::setRES Syntax void setRES(int iRangeRES); 2 iRangeRES MX100 -Visual C++ Parameters Specify the range type of the resistance range. Description Sets the specified range. Makes the channel status valid. The settings are set to the default values of the specified range type. The channel type is set to AI. Any specification other than the resistance range is ignored.
2.5 Details of the MX100 Class CDAQMXChConfig::setRTD Syntax void setRTD(int iRangeRTD, int iTempUnit = DAQMX_TEMPUNIT_C); Parameters iRangeRTD Specify the range type of the RTD input. iTempUnit Specify the temperature unit type. Description Sets the specified range. Makes the channel status valid. The settings are set to the default values of the specified range type. The channel type is set to the value of AI. Any specification other than the RTD range is ignored.
2.5 Details of the MX100 Class CDAQMXChConfig::setSKIP Syntax void setSKIP(void); 2 MX100 -Visual C++ Description Sets SKIP (not used). Makes the channel status invalid. Reference setValid CDAQMXChConfig::setSpan Syntax void setSpan(int spanMin, int spanMax, int iTempUnit = DAQMX_TEMPUNIT_C); Parameters spanMin Specify the span minimum. spanMax iTempUnit Specify the span maximum. Specify the temperature unit type.
2.5 Details of the MX100 Class CDAQMXChConfig::setTC Syntax void setTC(int iRangeTC, int iTempUnit = DAQMX_TEMPUNIT_C); Parameters iRangeTC Specify the range type of the thermocouple input. iTempUnit Specify the temperature unit type. Description Sets the specified range. Makes the channel status valid. The settings are set to the default values of the specified range type. The channel type is set to the value of AI. Any specification other than the TC range is ignored.
2.5 Details of the MX100 Class CDAQMXChConfigData class 2 This class can be used as an interface for storing setup data for all channels when retrieving setup data. This class is a group of all channels of the CDAQMXChConfig class. It implements any processing required for the between-channel association information. Public Members Construct/Destruct CDAQMXChConfigData ~CDAQMXChConfigData Constructs an object. Destructs an object. Structure Manipulation getMXChConfigData Gets the data in a structure.
2.5 Details of the MX100 Class Protected Members Data Members m_cMXChConfig Field for storing the channel setup data of all the channels. m_pcMXChConfig Head pointer of the field for storing the channel setup data of all the channels. m_nItemError Field for storing the setting item number. Private Members None.
2.5 Details of the MX100 Class CDAQMXChConfigData::getClassMXChConfig Syntax CDAQMXChConfig * getClassMXChConfig(int chNo); 2 chNo MX100 -Visual C++ Parameters Specify the channel number. Description Gets from the data member the channel setup data field corresponding to the specified channel number as an object. Returns NULL if it does not exist. Return value Returns the reference to the object.
2.5 Details of the MX100 Class CDAQMXChConfigData::initMXChConfigData Syntax static void initMXChConfigData(MXChConfigData * pMXChConfigData); Parameters pMXChConfig Specify the field for the channel setup data for all channels. Description Initializes the specified field. The default value as a general rule is 0. CDAQMXChConfigData::isCorrect Syntax int isCorrect(int iTempUnit = DAQMX_TEMPUNIT_C); Parameters iTempUnit Specify the temperature unit type. Description Checks the validity.
2.5 Details of the MX100 Class CDAQMXChConfigData::isObject Syntax virtual int isObject(const char * classname = "CDAQMXChConfigData"); 2 MX100 -Visual C++ Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited. If parameters are omitted, checks whether it is this class. Classes that inherit this class must be overridden in order to check their own classes. Returns true (valid) if the class was inherited.
2.5 Details of the MX100 Class CDAQMXChConfigData::setMXChConfigData Syntax void setMXChConfigData(MXChConfigData * pMXChConfigData); Parameters pMXChConfigData Specify the channel setup data for all channels. Description Sets the data in a structure. Stores the contents of the specified structure in the data member. If not specified, the data member is initialized.
2.5 Details of the MX100 Class CDAQMXChID Class CDAQChInfo CDAQMXChID 2 This is the common section of the channel information data and channel setup data. Public Members Construct/Destruct CDAQMXChID ~CDAQMXChID Constructs an object. Destructs an object. initMXChID Initializes the data in a structure. Structure Manipulation getMXChID Gets the data in a structure. setMXChID initMXChID Sets the data in a structure. Initializes the data in a structure.
2.5 Details of the MX100 Class Operator operator= Executes substitution. Overridden Members Member Data Manipulation initialize getChType Initializes the data member. Gets the channel type. setChType Set the channel type. Utilities isObject Checks an object. Inherited Members See CDAQChInfo. getChNo getPoint setChNo setPoint Protected Members Data Members m_valid m_kind Field for storing the channel status. Field for storing the channel type.
2.5 Details of the MX100 Class Member Functions 2 CDAQMXChID::CDAQMXChID MX100 -Visual C++ Syntax CDAQMXChID(MXChID * pMXChID = NULL); virtual ~CDAQMXChID(void); Parameters pMXChID Specify the channel ID information. Description Constructs or destructs an object. When constructing, the specified data is stored in the data member. If not specified, the data member is initialized.
2.5 Details of the MX100 Class CDAQMXChID::getAlarmValueON Syntax int getAlarmValueON(int levelNo); Parameters levelNo Specify the alarm level. Description Gets the threshold level for alarm generation (ON value) of the specified alarm level from the alarm field of the data member. Returns 0 if the alarm level is outside the range. Return value Returns the threshold level (On value) for alarm activation.
2.5 Details of the MX100 Class CDAQMXChID::getComment Syntax const char * getComment(void); 2 MX100 -Visual C++ Description Gets the comment in the comment field from the data member. Return value Returns a pointer to the string. CDAQMXChID::getKind Syntax int getKind(void); Description Gets the value of the channel type field from the data member. Return value Returns the channel type. CDAQMXChID::getMXAlarm Syntax MXAlarm * getMXAlarm(int levelNo); Parameters levelNo Specify the alarm level.
2.5 Details of the MX100 Class CDAQMXChID::getRange Syntax int getRange(void); Description Gets the range type field from the data member. Return value Returns the range type. CDAQMXChID::getScale Syntax int getScale(void); Description Gets the scale type field from the data member. Return value Returns the scale type. CDAQMXChID::getTag Syntax const char * getTag(void); Description Gets the tag in the tag field from the data member. Return value Returns a pointer to the string.
2.5 Details of the MX100 Class CDAQMXChID::initMXChID Syntax static void initMXChID(MXChID * pMXChID); 2 pMXChID MX100 -Visual C++ Parameters Specify the channel ID information field. Description Initializes the specified field. The default value as a general rule is 0. CDAQMXChID::isObject Syntax virtual int isObject(const char * classname = "CDAQMXChID"); Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited.
2.5 Details of the MX100 Class CDAQMXChID::operator= Syntax CDAQMXChID & operator=(CDAQMXChID & cMXChID); Parameters cMXChID Specify an object for substitution. Description Copies the data member of the specified object. Return value Returns the reference to the object. Reference getMXChID setMXChID CDAQMXChID::setAlarmValue Syntax void setAlarmValue(int levelNo, int iAlarmType = DAQMX_ALARM_NONE, int valueON = 0, int valueOFF = 0); Parameters levelNo iAlarmType valueON Specify the alarm level.
2.5 Details of the MX100 Class CDAQMXChID::setComment Syntax void setComment(const char * strComment); 2 strComment MX100 -Visual C++ Parameters Specify the comment. Description Stores the specified value in the comment field of the data member. CDAQMXChID::setMXChID Syntax void setMXChID(MXChID * pMXChID); Parameters pMXChID Specify the channel ID information. Description Sets the data in a structure. Stores the contents of the specified structure in the data member.
2.5 Details of the MX100 Class CDAQMXChID::setType Syntax void setType(int iKind, int iRange, int iScale = DAQMX_SCALE_NONE); Parameters iKind Specify the channel type. iRange iScale Specify the range type. Specify the scale type. Description Stores the specified values in the channel type field, range type field, and scale type field of the data member. CDAQMXChID::setUnit Syntax void setUnit(const char * strUnit); Parameters strUnit Specify the unit name.
2.5 Details of the MX100 Class CDAQMXChID::toChNo Syntax static int toChNo(int chname); 2 chname MX100 -Visual C++ Parameters Specify the channel name. Description Separates the channel number from the specified channel name. Return value Returns the channel number. CDAQMXChID::toUnitNo Syntax static int toUnitNo(int chname); Parameters chname Specify the channel name. Description Separates the unit number from the specified channel name. Return value Returns the unit number.
2.5 Details of the MX100 Class CDAQMXChInfo Class CDAQChInfo CDAQMXChID CDAQMXChInfo This class stores the channel information data of the MX100. It is a wrapper class of the MXChInfo structure. Reference minimum and maximum values are not used. This class can be used as an interface for storing channel information data when retrieving channel information data. Measured data is easier to handle when associated with the measured data class.
2.5 Details of the MX100 Class Inherited Members See CDAQChInfo. getChNo getPoint setChNo setPoint 2 Protected Members Data Members m_FIFONo Field for storing the FIFO number. m_FIFOIndex Field for storing the channel sequence number in the FIFO. m_origMin m_origMax Field for storing the reference minimum value.* Field for storing the reference maximum value.* *The reference minimum/maximum values are currently not used. m_dispMin Field for storing the display minimum value.
2.5 Details of the MX100 Class Member Functions (Alphabetical Order) CDAQMXChInfo::CDAQMXChInfo Syntax CDAQMXChInfo(MXChInfo * pMXChInfo = NULL); virtual ~CDAQMXChInfo(void); Parameters pMXChInfo Specify the channel information data. Description Constructs or destructs an object. When constructing, the specified data is stored in the data member. If not specified, the data member is initialized.
2.5 Details of the MX100 Class CDAQMXChInfo::getFIFONo Syntax int getFIFONo(void); 2 MX100 -Visual C++ Description Gets the value in the FIFO number field from the data member. Return value Returns the FIFO number. CDAQMXChInfo::getMXChInfo Syntax void getMXChInfo(MXChInfo * pMXChInfo); Parameters pMXChInfo Specify the destination where the channel information data is to be returned. Description Gets the data in a structure. Stores the contents of the data member in the specified structure.
2.5 Details of the MX100 Class CDAQMXChInfo::getRealMax Syntax double getRealMax(void); Description Gets the value in the measurable maximum value field from the data member. Return value Returns the measurable maximum value. CDAQMXChInfo::getRealMin Syntax double getRealMin(void); Description Gets the value in the measurable minimum value field from the data member. Return value Returns the measurable minimum value.
2.5 Details of the MX100 Class CDAQMXChInfo::isObject Syntax virtual int isObject(const char * classname = "CDAQMXChInfo"); MX100 -Visual C++ Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited. If parameters are omitted, checks whether it is this class. Classes that inherit this class must be overridden in order to check their own classes. Returns true (valid) if the class was inherited. Otherwise, returns false (invalid).
2.5 Details of the MX100 Class CDAQMXChInfo::setFIFONo Syntax void setFIFONo(int fifoNo); Parameters fifoNo Specify the FIFO number. Description Stores the specified value in the FIFO number field of the data member. CDAQMXChInfo::setMXChInfo Syntax void setMXChInfo(MXChInfo * pMXChInfo); Parameters pMXChInfo Specify the channel information data. Description Sets the data in a structure. Stores the contents of the specified structure in the data member.
2.5 Details of the MX100 Class CDAQMXConfig Class 2 This class can be used as an interface for storing setup data when retrieving setup data. Public Members Construct/Destruct CDAQMXConfig Constructs an object. ~CDAQMXConfig Destructs an object. Structure Manipulation getMXConfigData Gets the data in a structure. setMXConfigData initMXConfigData Sets the data in a structure. Initializes the data in a structure. Member Data Manipulation initialize getClassMXSysInfo Initializes the data member.
2.5 Details of the MX100 Class setRES setSTRAIN Sets the resistance range. Sets the strain range. setAO setPWM Sets the AO range. Sets the PWM range. setCOM setPULSE Specify the communication range. Specify the pulse range. Check isCorrect Checks the validity. Operator operator= Executes substitution. Utilities getItemError Gets the number of the parameter on which an error was detected. isObject getSpanPoint Checks an object. Gets the decimal point position of the channel.
2.5 Details of the MX100 Class Member Functions (Alphabetical Order) 2 CDAQMXConfig::CDAQMXConfig MX100 -Visual C++ Syntax CDAQMXConfig(MXConfigData * pMXConfigData); virtual ~CDAQMXConfig(void); Parameters pMXConfigData Specify the setup data. Description Constructs or destructs an object. When constructing, the specified data is stored in the data member. If not specified, the data member is initialized.
2.5 Details of the MX100 Class CDAQMXConfig::getClassMXChConfig Syntax CDAQMXChConfig * getClassMXChConfig(int chNo); Parameters chNo Specify the channel number. Description Gets the channel setup data of the specified channel number. Returns NULL if it does not exist. Return value Returns a pointer to the object.
2.5 Details of the MX100 Class CDAQMXConfig::getClassMXStatus Syntax CDAQMXStatus & getClassMXStatus(void); 2 MX100 -Visual C++ Description Gets the status field as a data member. Return value Returns a reference to the data member. CDAQMXConfig::getClassMXSysInfo Syntax CDAQMXSysInfo & getClassMXSysInfo(void); Description Gets the System configuration data field as a data member. Return value Returns a reference to the object.
2.5 Details of the MX100 Class CDAQMXConfig::getRangePoint Syntax int getRangePoint(int iRange); Parameters iRange Specify the range type. Description Gets the decimal point position of the specified range type. For the contact range, specify the contact detailed range. Returns 0 if it does not exist. Return value Returns the decimal point position.
2.5 Details of the MX100 Class CDAQMXConfig::initMXConfigData Syntax static void initMXConfigData(MXConfigData * pMXConfigData); MX100 -Visual C++ Parameters pMXConfigData Specify the setup data field. Description Initializes the specified field. The default value as a general rule is 0.
2.5 Details of the MX100 Class CDAQMXConfig::isObject Syntax virtual int isObject(const char * classname = "CDAQMXConfig"); Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited. If parameters are omitted, checks whether it is this class. Classes that inherit this class must be overridden in order to check their own classes. Returns true (valid) if the class was inherited. Otherwise, returns false (invalid).
2.5 Details of the MX100 Class CDAQMXConfig::reconstruct Syntax void reconstruct(int bRealType); 2 bRealType Specify whether or not to set the actual module types to reconstruct the system using a Boolean. Description Reconstructs the system. When Valid is specified, creates setup data according to the actual module types. When Invalid is specified, creates setup data according to the current module types. Settings are set to default values.
2.5 Details of the MX100 Class CDAQMXConfig::setAO Syntax void setAO(int chNo,int iRangeAO,int spanMin = 0,int spanMax = 0); Parameters chNo Specify the channel number. iRangeAO spanMin Specify the AO range type. Specify the span minimum. spanMax Specify the span maximum. Description Sets the channel of the specified channel number to the specified range. If the maximum and minimum values are the same, the span is considered omitted.
2.5 Details of the MX100 Class CDAQMXConfig::setAOType Syntax void setAOType(int aoNo,int iKind,int refChNo = DAQMX_REFCHNO_NONE); 2 MX100 -Visual C++ Parameters aoNo Specify the AO data number. iKind refChNo Specify the AO type using channel type. Specify the reference channel number. Description Sets the channel type of the AO module. If unused is specified for the channel type, the channel is set to SKIP (not used).
2.5 Details of the MX100 Class CDAQMXConfig::setChKind Syntax void setChKind(int chNo,int iKind,int refChNo = DAQMX_REFCHNO_NONE); Parameters chNo Specify the channel number. iKind refChNo Specify the channel type. Specify the reference channel number. Description Sets the channel type on the channel of the specified channel number.
2.5 Details of the MX100 Class CDAQMXConfig::setDELTA Syntax void setDELTA(int chNo, int refChNo, int spanMin = 0, int spanMax = 0, int iRange = DAQMX_RANGE_REFERENCE); 2 MX100 -Visual C++ Parameters chNo Specify the channel number. refChNo spanMin Specify the reference channel number. Specify the span minimum. spanMax iRange Specify the span maximum. Specify the range type. Description Sets the channel of the specified channel number to the specified range.
2.5 Details of the MX100 Class CDAQMXConfig::setDI Syntax void setDI(int chNo, int iRangeDI, int spanMin = 0, int spanMax = 0); Parameters chNo Specify the channel number. iRangeDI spanMin Specify the range type of the digital input (DI). Specify the span minimum. spanMax Specify the span maximum. Description Sets the channel of the specified channel number to the specified range. If the maximum and minimum values are the same, the span is considered omitted.
2.5 Details of the MX100 Class CDAQMXConfig::setInterval Syntax void setInterval(int moduleNo, int iInterval, int iHz = DAQMX_INTEGRAL_AUTO); 2 MX100 -Visual C++ Parameters moduleNo Specify the module number. iInterval iHz Specify the interval type. Specify the type of A/D integration time. Description Sets the module of the specified module number to the specified value. If the module does not exist, the value is not set.
2.5 Details of the MX100 Class CDAQMXConfig::setPULSE Syntax void setPULSE(int chNo, int iRangePULSE, int spanMin = 0, int spanMax = 0); Parameters chNo iRangePULSE spanMin spanMax Specify the channel number. Specify the pulse range from the range type. Specify the span minimum. Specify the span maximum. Description Sets the channel of the specified channel number to the specified range. If the maximum and minimum values are the same, the span is considered omitted.
2.5 Details of the MX100 Class CDAQMXConfig::setPWMType Syntax void setPWMType(int pwmNo,int iKind,int refChNo = DAQMX_REFCHNO_NONE); 2 MX100 -Visual C++ Parameters pwmNo Specify the PWM data number. iKind refChNo Specify the PWM type with the channel type. Specify the reference channel number. Description Sets the channel type of the PWM module. If unused is specified for the channel type, the channel is set to SKIP (not used).
2.5 Details of the MX100 Class CDAQMXConfig::setRES Syntax void setRES(int chNo,int iRangeRES,int spanMin = 0,int spanMax = 0); Parameters chNo Specify the channel number. iRangeRES spanMin Specify the range type of the resistance range. Specify the span minimum. spanMax Specify the span maximum. Description Sets the channel of the specified channel number to the specified range. If the maximum and minimum values are the same, the span is considered omitted.
2.5 Details of the MX100 Class CDAQMXConfig::setRTD Syntax void setRTD(int chNo, int iRangeRTD, int spanMin = 0, int spanMax = 0); 2 MX100 -Visual C++ Parameters chNo Specify the channel number. iRangeRTD spanMin Specify the range type of the RTD input. Specify the span minimum. spanMax Specify the span maximum. Description Sets the channel of the specified channel number to the specified range. If the maximum and minimum values are the same, the span is considered omitted.
2.5 Details of the MX100 Class CDAQMXConfig::setSKIP Syntax void setSKIP(int chNo); Parameters chNo Specify the channel number. Description Sets the channel of the specified channel number to SKIP (not used). If the module does not exist, the value is not set. If the constant for “Specify all channel numbers” is specified for the channel numbers, all channels are processed.
2.5 Details of the MX100 Class CDAQMXConfig::setTC Syntax void setTC(int chNo, int iRangeTC, int spanMin = 0, int spanMax = 0); 2 MX100 -Visual C++ Parameters chNo Specify the channel number. iRangeTC spanMin Specify the range type of the thermocouple input. Specify the span minimum. spanMax Specify the span maximum. Description Sets the channel of the specified channel number to the specified range. If the maximum and minimum values are the same, the span is considered omitted.
2.5 Details of the MX100 Class CDAQMXConfig::setVOLT Syntax void setVOLT(int chNo,int iRangeVOLT,int spanMin = 0,int spanMax = 0); Parameters chNo Specify the channel number. iRangeVOLT spanMin Specify the range type of the DC voltage input. Specify the span minimum. spanMax Specify the span maximum. Description Sets the channel of the specified channel number to the specified range. If the maximum and minimum values are the same, the span is considered omitted.
2.5 Details of the MX100 Class CDAQMXDataInfo Class CDAQDataInfo CDAQMXDataInfo 2 This class can be used as an interface for storing measured data when retrieving measured data. Actual measured data can be calculated by associating with the channel information data class. Public Members Construct/Destruct CDAQMXDataInfo Constructs an object. ~CDAQMXDataInfo Destructs an object. Structure Manipulation getMXDataInfo Gets the data as a structure.
2.5 Details of the MX100 Class Inherited Members CDAQDataInfoReference getClassChInfo getDoubleValue getStringValue getValue setClassChInfo setValue toDoubleValue toStringValue Protected Members Data Members m_dataStatus m_alarm Field for storing the data status. Field for storing the presence or absence of the alarm. Inherited Members CDAQDataInfoReference m_pChInfo m_value Private Members None.
2.5 Details of the MX100 Class CDAQMXDataInfo::getAlarmName Syntax static const char * getAlarmName(int iAlarmType); 2 MX100 -Visual C++ Parameters iAlarmTypeSpecify the alarm type. Description Gets the string corresponding to the specified alarm type. If outside the range, the string is set the same as no alarm. Return value Returns a pointer to the string.
2.5 Details of the MX100 Class CDAQMXDataInfo::getStatus Syntax int getStatus(void); Description Gets the value in the data status field of the data member. Return value Returns the data status. CDAQMXDataInfo::initialize Syntax void initialize(void); Description Initializes the data member. The default value as a general rule is 0. The association with the channel information data is not initialized.
2.5 Details of the MX100 Class CDAQMXDataInfo::isObject Syntax virtual int isObject(const char * classname = "CDAQMXDataInfo"); MX100 -Visual C++ Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited. If parameters are omitted, checks whether it is this class. Classes that inherit this class must be overridden in order to check their own classes. Returns true (valid) if the class was inherited. Otherwise, returns false (invalid).
2.5 Details of the MX100 Class CDAQMXDataInfo::setAlarm Syntax void setAlarm(int levelNo, int bValid); Parameters levelNo Specify the alarm level. bValid Specify the Boolean value. Description Sets the alarm presence/absence field of the data member to the specified value. If the alarm level is outside the range, it is not set. CDAQMXDataInfo::setClassMXChInfo Syntax void setClassMXChInfo(CDAQMXChInfo * pcMXChInfo); Parameters pcMXChInfo Specify a pointer to the channel information data class.
2.5 Details of the MX100 Class CDAQMXDateTime Class CDAQDateTime CDAQMXDateTime 2 MX100 -Visual C++ This class stores the time information data of the MX100. It is a wrapper class of the MXDateTime structure. This class can be used as an interface for storing time information data when retrieving time information data for the retrieval of measured data. Public Members Construct/Destruct CDAQMXDateTime Constructs an object. ~CDAQMXDateTime Destructs an object.
2.5 Details of the MX100 Class Member Functions (Alphabetical Order) CDAQMXDateTime::CDAQMXDateTime Syntax CDAQMXDateTime(time_t time = 0, int milliSecond = 0); CDAQMXDateTime(MXDateTime * pMXDateTime); virtual ~CDAQMXDateTime(void); Parameters time milliSecond Specify seconds. Specify milliseconds. pMXDateTime Specify the time information data. Description Constructs or destructs an object. When constructing, the data member is set to the specified value.
2.5 Details of the MX100 Class CDAQMXDateTime::initMXDateTime Syntax static void initMXDateTime(MXDateTime * pMXDateTime); 2 pMXDateTime MX100 -Visual C++ Parameters Specify the time information data field. Description Initializes the specified field. The default value as a general rule is 0. CDAQMXDateTime::isObject Syntax virtual int isObject(const char * classname = "CDAQMXDateTime"); Parameters classname Specify the class name using a string.
2.5 Details of the MX100 Class CDAQMXDateTime::setMXDateTime Syntax void setMXDateTime(MXDateTime * pMXDateTime); Parameters pMXDateTime Specify the time information data. Description Sets the data in a structure. Stores the contents of the specified structure in the data member. If not specified, the data member is initialized.
2.5 Details of the MX100 Class CDAQMXDOData Class 2 It is a group of DO data of all the channels. This class can be used as an interface for storing DO data when retrieving or setting DO data. Public Members Construct/Destruct CDAQMXDOData Constructs an object. ~CDAQMXDOData Destructs an object. Structure Manipulation getMXDOData Gets the data in a structure. setMXDOData initMXDOData Sets the data in a structure. Initializes the data in a structure.
2.5 Details of the MX100 Class Member Functions (Alphabetical Order) CDAQMXDOData::CDAQMXDOData Syntax CDAQMXDOData(MXDOData * pMXDOData = NULL); virtual ~CDAQMXDOData(void); Parameters pMXDOData Specify the DO data. Description Constructs or destructs an object. When constructing, the data member is set to the specified value. If not specified, the data member is initialized. Reference setMXDOData CDAQMXDOData::getDOONOFF Syntax int getDOONOFF(int doNo); Parameters doNo Specify the data number.
2.5 Details of the MX100 Class CDAQMXDOData::getDOValid Syntax int getDOValid(int doNo); 2 doNo Specify the data number. Description Gets the Boolean value indicated by the specified DO data number from the DO data field of the data member. If it does not exist, returns Invalid. Return value Returns a Boolean value. Reference getMXDO CDAQMXDOData::getMXDO Syntax MXDO * getMXDO(int doNo); Parameters doNo Specify the data number.
2.5 Details of the MX100 Class CDAQMXDOData::initialize Syntax virtual void initialize(void); Description Initializes the data member. The default value as a general rule is 0. Reference initMXDOData CDAQMXDOData::initMXDOData Syntax static void initMXDOData(MXDOData * pMXDOData); Parameters pMXDOData Specify the DO data field. Description Initializes the specified field. The default value as a general rule is 0.
2.5 Details of the MX100 Class CDAQMXDOData::operator= Syntax CDAQMXDOData & operator=(CDAQMXDOData & cMXDOData); 2 cMXDOData MX100 -Visual C++ Parameters Specify an object for substitution. Description Copies the data member of the specified object. Return value Returns the reference to the object. CDAQMXDOData::setDO Syntax void setDO(int doNo, int bValid, int bONOFF = DAQMX_VALID_OFF); Parameters doNo Specify the data number. bValid bONOFF Specify valid or invalid using a Boolean value.
2.5 Details of the MX100 Class CDAQMXDOData::setMXDOData Syntax void setMXDOData(MXDOData * pMXDOData); Parameters pMXDOData Specify the DO data. Description Sets the data in a structure. Stores the contents of the specified structure in the data member. If not specified, the data member is initialized.
2.5 Details of the MX100 Class CDAQMXNetInfo Class 2 This class can be used as an interface for storing network information data when retrieving setup data. Public Members Construct/Destruct CDAQMXNetInfo Constructs an object. ~CDAQMXNetInfo Destructs an object. Structure Manipulation getMXNetInfo Gets the data in a structure. setMXNetInfo initMXNetInfo Sets the data in a structure. Initializes the data in a structure. Member Data Manipulation initialize getAddress Initializes the data member.
2.5 Details of the MX100 Class Member Functions (Alphabetical Order) CDAQMXNetInfo::CDAQMXNetInfo Syntax CDAQMXNetInfo(MXNetInfo * pMXNetInfo); virtual ~CDAQMXNetInfo(void); Parameters pMXNetInfo Specify the network information data. Description Constructs or destructs an object. When constructing, the data member is set to the specified value. If not specified, the data member is initialized.
2.5 Details of the MX100 Class CDAQMXNetInfo::getMXNetInfo Syntax void getMXNetInfo(MXNetInfo * pMXNetInfo); 2 pMXNetInfo Specify the destination where the network information data is to be returned. Description Gets the data in a structure. Stores the contents of the data member in the specified structure. CDAQMXNetInfo::getPart Syntax static int getPart(unsigned int address, int index); Parameters address index Specify the IP address. Specify the part position.
2.5 Details of the MX100 Class CDAQMXNetInfo::getSubMask Syntax unsigned int getSubMask(void); Description Gets the subnet mask from the network information data field of the data member. Return value Returns the subnet mask. CDAQMXNetInfo::initialize Syntax virtual void initialize(void); Description Initializes the data member. The default value as a general rule is 0.
2.5 Details of the MX100 Class CDAQMXNetInfo::isObject Syntax virtual int isObject(const char * classname = "CDAQMXNetInfo"); MX100 -Visual C++ Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited. If parameters are omitted, checks whether it is this class. Classes that inherit this class must be overridden in order to check their own classes. Returns true (valid) if the class was inherited. Otherwise, returns false (invalid).
2.5 Details of the MX100 Class CDAQMXOutput Class This class stores the output channel data on the MX100. It is a wrapper class of the MXOutputData structure. It is a group of all the channels worth of output channel data. Each data can be accessed by output channel data number. The output channel data number is the AO/PWM data number. This class can be used as an interface for setting and retrieving output channel data. Public Members Construct/Destruct CDAQMXOutputData Constructs an object.
2.5 Details of the MX100 Class Protected Members Data Members m_MXOutputData 2 Field for storing the output channel data. getMXOutput MX100 -Visual C++ Member Access Gets the output channel data structure for each channel. Private Members None. Member Functions (Alphabetical Order) CDAQMXOutputData::CDAQMXOutputData Syntax CDAQMXOutputData(MXOutputData * pMXOutputData = NULL); virtual ~CDAQMXOutputData(void); Parameters pMXOutputData Specify the output channel data.
2.5 Details of the MX100 Class CDAQMXOutputData::getIdleChoice Syntax int getIdleChoice(int outputNo); Parameters outputNo Specify the output channel data number. Description Gets the selected value during idling of the specified data number from the data member. If it does not exist, “Previous value” is returned. Return value Returns the selected value.
2.5 Details of the MX100 Class CDAQMXOutputData::getOutputType Syntax int getOutputType(int outputNo); 2 outputNo MX100 -Visual C++ Parameters Specify the output channel data number. Description Gets the output type of the specified data number from the data member. If it does not exist, “No output” is returned. Return value Returns the output type.
2.5 Details of the MX100 Class CDAQMXOutputData::initialize Syntax virtual void initialize(void); Description Initializes the data member. The default value as a general rule is 0. Reference initMXOutputData CDAQMXOutputData::initMXOutputData Syntax static void initMXOutputData(MXOutputData * pMXOutputData); Parameters pMXOutputData Specify the output channel data field. Description Initializes the specified field. The default value as a general rule is 0.
2.5 Details of the MX100 Class CDAQMXOutputData::operator= Syntax CDAQMXOutputData & operator=(CDAQMXOutputData & cMXOutputData); 2 MX100 -Visual C++ Parameters cMXOutputData Specify an object for substitution. Description Copies the data member of the specified object. Return value Returns the reference to the object. CDAQMXOutputData::setChoice Syntax void setChoice(int outputNo, int idleChoice, int errorChoice, int presetValue = 0); Parameters outputNo Specify the output channel data number.
2.5 Details of the MX100 Class CDAQMXOutputData::setOutputType Syntax void setOutputType(int outputNo, int iOutput); Parameters outputNo Specify the output channel data number. iOutput Specify the output type. Description Stores the specified value in the field indicated by the specified data number of the data member. If the data number is set to “Specify All output data numbers,” the same value is stored in all data. Other item fields are set to default values.
2.5 Details of the MX100 Class CDAQMXSegment Class 2 MX100 -Visual C++ This class stores the display pattern of the 7-segment LED on the MX100. It is a wrapper class of the MXSegment structure. This class can be used as an interface for storing the display pattern of the 7-segment LED. Public Members Construct/Destruct CDAQMXSegment Constructs an object. ~CDAQMXSegment Destructs an object. Structure Manipulation getMXSegment Gets the data in a structure.
2.5 Details of the MX100 Class Member Functions (Alphabetical Order) CDAQMXSegment::CDAQMXSegment Syntax CDAQMXSegment(MXSegment * pMXSegment = NULL); CDAQMXSegment(int pattern0, int pattern1); virtual ~CDAQMXSegment(void); Parameters pMXSegment pattern0 Specify the 7-segment LED. Specify the display pattern of segment number 0. pattern1 Description Specify the display pattern of segment number 1. Constructs or destructs an object. When constructing, the data member is set to the specified value.
2.5 Details of the MX100 Class CDAQMXSegment::initialize Syntax virtual void initialize(void); 2 MX100 -Visual C++ Description Initializes the data member. The default value as a general rule is 0. Reference initMXSegment CDAQMXSegment::initMXSegment Syntax static void initMXSegment(MXSegment * pMXSegment); Parameters pMXSegment Specify the 7-segment LED field. Description Initializes the specified field. The default value as a general rule is 0.
2.5 Details of the MX100 Class CDAQMXSegment::operator= Syntax CDAQMXSegment & operator=(CDAQMXSegment & cMXSegment); Parameters cMXSegment Specify an object for substitution. Description Copies the data member of the specified object. Return value Returns the reference to the object. CDAQMXSegment::setMXSegment Syntax void setMXSegment(MXSegment * pMXSegment); Parameters pMXSegment Specify the 7-segment LED. Description Sets the data in a structure.
2.5 Details of the MX100 Class CDAQMXStatus Class 2 This class can be used as an interface for storing status data when retrieving status data and setup data. Public Members Construct/Destruct CDAQMXStatus Constructs an object. ~CDAQMXStatus Destructs an object. Structure Manipulation getMXStatus Gets the data in a structure. setMXStatus initMXStatus Sets the data in a structure. Initializes the data in a structure. Member Data Manipulation initialize getFIFONum Initializes the data member.
2.5 Details of the MX100 Class Protected Members Data Members m_MXStatus Field for storing the status data. Member Access getMXFIFOInfo Gets the FIFO information structure for each FIFO. Private Members None. Member Functions (Alphabetical Order) CDAQMXStatus::CDAQMXStatus Syntax CDAQMXStatus(MXStatus * pMXStatus = NULL); virtual ~CDAQMXStatus(void); Parameters pMXStatus Specify the status data. Description Constructs or destructs an object.
2.5 Details of the MX100 Class CDAQMXStatus::getCFSize Syntax 2 int getCFSize(void); MX100 -Visual C++ Description Gets the CF capacity value from the status data field of the data member. The unit is KB. Return value Returns the size. CDAQMXStatus::getCFStatus Syntax int getCFStatus(void); Description Gets the CF status type value from the status data field of the data member. Return value Returns the CF status type.
2.5 Details of the MX100 Class CDAQMXStatus::getFIFONum Syntax int getFIFONum(void); Description Gets the valid number of FIFO value from the status data field of the data member. Return value Returns the valid number of FIFOs. CDAQMXStatus::getFIFOStatus Syntax int getFIFOStatus(int fifoNo); Parameters fifoNo Specify the FIFO number. Description Gets the FIFO status value of the FIFO information corresponding to the specified FIFO number from the status data field of the data member.
2.5 Details of the MX100 Class CDAQMXStatus::getMilliSecond Syntax 2 int getMilliSecond(void); MX100 -Visual C++ Description Gets milliseconds from the status data field of the data member. Return value Returns milliseconds. CDAQMXStatus::getMXFIFOInfo Syntax MXFIFOInfo * getMXFIFOInfo(int fifoNo); Parameters fifoNo Specify the FIFO number. Description Gets the structure of the specified FIFO number from the status data field of the data member. Returns NULL if it does not exist.
2.5 Details of the MX100 Class CDAQMXStatus::getNewDataNo Syntax MXDataNo getNewDataNo(int fifoNo); Parameters fifoNo Specify the FIFO number. Description Gets the newest data number of the FIFO information corresponding to the specified FIFO number from the status data field of the data member. Returns the constant for “Data number for instantaneous value specification” if it does not exist. Return value Returns the data number.
2.5 Details of the MX100 Class CDAQMXStatus::getTimeCnt Syntax int getTimeCnt(void); 2 MX100 -Visual C++ Description Gets the time number value from the status data field of the data member. Return value Returns the time number. CDAQMXStatus::getUnitStatus Syntax int getUnitStatus(void); Description Gets the unit status value from the status data field of the data member. Return value Returns the unit status value.
2.5 Details of the MX100 Class CDAQMXStatus::isBackup Syntax int isBackup(void); Description Gets the presence/absence of backup from the status data field of the data member. Return value Returns a Boolean value. CDAQMXStatus::isDataNo Syntax static int isDataNo(MXDataNo dataNo); Parameters dataNo Specify the data number. Description Checks whether the specified data number is a valid number. Returns “Valid” if the data number is 0 or greater. Return value Returns a Boolean value.
2.5 Details of the MX100 Class CDAQMXStatus::operator= Syntax CDAQMXStatus & operator=(CDAQMXStatus & cMXStatus); 2 cMXStatus MX100 -Visual C++ Parameters Specify an object for substitution. Description Copies the data member of the specified object. Return value Returns the reference to the object. CDAQMXStatus::setMXStatus Syntax void setMXStatus(MXStatus * pMXStatus); Parameters pMXStatus Specify the status data. Description Sets the data in a structure.
2.5 Details of the MX100 Class CDAQMXSysInfo Class This class stores the System configuration data of the MX100. It is a wrapper class of the MXSystemInfo structure. This class can be used as an interface for storing system configuration data when retrieving system configuration data and setup data. Public Members Construct/Destruct CDAQMXSysInfo Constructs an object. ~CDAQMXSysInfo Destructs an object. Structure Manipulation getMXSystemInfo Gets the data in a structure.
2.5 Details of the MX100 Class Sets the temperature unit type. Sets the timeout value. setCFWriteMode setModule Sets the CF write mode. Sets the module. setRealModule Changes the module to the actual module. 2 Check isCorrect Checks the validity. Utilities getItemError Gets the number of the parameter on which an error was detected. isObject Checks an object. Operator operator= Executes substitution.
2.5 Details of the MX100 Class CDAQMXSysInfo::getCFTimeout Syntax int getCFTimeout(void); Description Gets the timeout value from the System configuration data field of the data member. Return value Returns the timeout value. CDAQMXSysInfo::getCFWriteMode Syntax int getCFWriteMode(void); Description Gets the CF write mode value from the System configuration data field of the data member. Return value Returns the CF write mode.
2.5 Details of the MX100 Class CDAQMXSysInfo::getFIFONo Syntax int getFIFONo(int moduleNo); 2 moduleNo Specify the module number. Description Gets the FIFO number of the module corresponding to the specified module number from the System configuration data field of the data member. Returns a negative value if it does not exist. Return value Returns the FIFO number.
2.5 Details of the MX100 Class CDAQMXSysInfo::getInterval Syntax int getInterval(int moduleNo); Parameters moduleNo Specify the module number. Description Gets the interval type of the module corresponding to the specified module number from the System configuration data field of the data member. Returns 0 if it does not exist. Return value Returns the interval type.
2.5 Details of the MX100 Class CDAQMXSysInfo::getModuleSerial Syntax const char * getModuleSerial(int moduleNo); 2 moduleNo Specify the module number. Description Gets the serial number of the module corresponding to the specified module number from the System configuration data field of the data member. Returns NULL if it does not exist. Return value Returns a pointer to the string.
2.5 Details of the MX100 Class CDAQMXSysInfo::getModuleVersion Syntax int getModuleVersion(int moduleNo); Parameters moduleNo Specify the module number. Description Gets the module version of the module corresponding to the specified module number from the System configuration data field of the data member. Returns 0 if it does not exist. Return value Returns the module version.
2.5 Details of the MX100 Class CDAQMXSysInfo::getOption Syntax int getOption(void); 2 Gets the option value from the System configuration data field of the data member. Return value Returns the option. CDAQMXSysInfo::getPartNo Syntax const char * getPartNo(void); Description Gets the part number from the System configuration data field of the data member. Return value Returns a pointer to the string.
2.5 Details of the MX100 Class CDAQMXSysInfo::getStandbyType Syntax int getStandbyType(int moduleNo); Parameters moduleNo Specify the module number. Description Gets the module type upon startup of the module corresponding to the specified module number from the System configuration data field of the data member. If it does not exist, “No module” is returned. Return value Returns the module type.
2.5 Details of the MX100 Class CDAQMXSysInfo::getTerminalType Syntax int getTerminalType(int moduleNo); 2 moduleNo Specify the module number. Description Gets the terminal type of the module corresponding to the specified module number from the System configuration data field of the data member. If it does not exist, “Clamp” is returned. Return value Returns the terminal type.
2.5 Details of the MX100 Class CDAQMXSysInfo::initialize Syntax virtual void initialize(void); Description Initializes the data member. The default value as a general rule is 0. The timeout value is set to default. Reference initMXSystemInfo setCFTimeout CDAQMXSysInfo::initMXSystemInfo Syntax static void initMXSystemInfo(MXSystemInfo * pMXSystemInfo); Parameters pMXSystemInfo Specify the system configuration data field. Description Initializes the specified field.
2.5 Details of the MX100 Class CDAQMXSysInfo::isModuleValid Syntax int isModuleValid(int moduleNo); 2 moduleNo MX100 -Visual C++ Parameters Specify the module number. Description Gets the Boolean value of the module corresponding to the specified module number from the System configuration data field of the data member. If it does not exist, Invalid is returned. Return value Returns a Boolean value.
2.5 Details of the MX100 Class CDAQMXSysInfo::setCFTimeout Syntax void setCFTimeout(int timeout = 60); Parameters timeout Sets the timeout value. Description Stores the specified value in the System configuration data field of the data member. The unit is seconds. CDAQMXSysInfo::setCFWriteMode Syntax void setCFWriteMode(int iCFWriteMode); Parameters iCFWriteMode Specify the CF write mode. Description Stores the specified value in the System configuration data field of the data member.
2.5 Details of the MX100 Class CDAQMXSysInfo::setMXSystemInfo Syntax void setMXSystemInfo(MXSystemInfo * pMXSystemInfo); 2 MX100 -Visual C++ Parameters pMXSystemInfo Specify the system configuration data. Description Sets the data in a structure. Stores the contents of the specified structure in the data member. If not specified, the data member is initialized.
2.5 Details of the MX100 Class CDAQMXSysInfo::setUnitNo Syntax void setUnitNo(int unitNo); Parameters unitNo Specify the unit number. Description Stores the specified value in the System configuration data field of the data member.
2.5 Details of the MX100 Class CDAQMXTransmit Class 2 It is a group of transmissions statuses of all the channels. Each data can be accessed by transmission output data number. The transmission output data number is the PWM data number or the AO data number. This class can be used as an interface for setting and retrieving transmission output data. Public Members Construct/Destruct CDAQMXTransmit ~CDAQMXTransmit Constructs an object. Destructs an object.
2.5 Details of the MX100 Class Member Functions (Alphabetical Order) CDAQMXTransmit::CDAQMXTransmit Syntax CDAQMXTransmit(MXTransmit * pMXTransmit = NULL); virtual ~CDAQMXTransmit(void); Parameters pMXTransmit Specify the transmission status. Description Constructs or destructs an object. When constructing, the data member is set to the specified value. If not specified, the data member is initialized.
2.5 Details of the MX100 Class CDAQMXTransmit::initialize Syntax virtual void initialize(void); 2 MX100 -Visual C++ Description Initializes the data member. The default value as a general rule is 0. Reference initMXTransmit CDAQMXTransmit::initMXTransmit Syntax static void initMXTransmit(MXTransmit * pMXTransmit); Parameters pMXTransmit Specify the transmission status field. Description Initializes the specified field. The default value as a general rule is 0.
2.5 Details of the MX100 Class CDAQMXTransmit::operator= Syntax CDAQMXTransmit & operator=(CDAQMXTransmit & cMXTransmit); Parameters cMXTransmit Specify an object for substitution. Description Copies the data member of the specified object. Return value Returns the reference to the object. CDAQMXTransmit::setMXTransmit Syntax void setMXTransmit(MXTransmit * pMXTransmit); Parameters pMXTransmit Specify the transmission status. Description Sets the data in a structure.
Chapter 3 MX100 - Visual C - 3.1 Functions and Their Functionalities - MX100/ Visual C This section indicates the correspondence between the functionalities that the API supports and the C functions. 3 Communication Functions Function openMX closeMX setTimeOutMX MX100 - Visual C Function Connect to the MX100. Disconnect from the MX100. Set the communication timeout.
3.1 Functions and Their Functionalities - MX100/Visual C - Note If the auto control of the FIFO is enabled, the FIFO is automatically resumed when the FIFO is stopped due to an execution of a function. Functionality Collective Setup Function Configure the setup data collectively. Set the setup data (system setup data). Configure the setup data (channel setup data). Set the DO (Digital Output) data collectively. Send AO/PWM data collectively.
3.1 Functions and Their Functionalities - MX100/Visual C - For a description of the FIFO column in the table, see the explanation given in “Other Controls” on the previous page. If an invalid data error occurs, the last detected item is saved as a setting item number. It can be retrieved with a utility. Data Retrieval Functions Retrieval of System Status Data and System Configuration Data Function Get system status data. Get system configuration data.
3.1 Functions and Their Functionalities - MX100/Visual C - Retrieval of Setup Data Function Get the setup data collectively Declare the retrieval of the setup data. Retrieves setup data other than the channel setup data. Get channel setup data. Function used to retrieve channel setup data after declaring the retrieval of setup data using the talkConfigMX function. Function getConfigDataMX talkConfigMX getChConfigMX Retrieval of DO Data Function Get the DO data collectively.
3.1 Functions and Their Functionalities - MX100/Visual C - Retrieval of Initial Balance Data Function Get initial balance data collectively. Function getBalanceMX Retrieve Output Channel Data Function Get output channel data collectively. Function getOutputMX 3 MX100 - Visual C Utilities Function Insert the specified user count (user-defined order information) in the next packet to be issued. Get the MX100-specific error that was received last through communications.
3.2 Program - MX100/Visual C - Adding the Path to the Include File Add the path of the include file (DAQMX.h) to the project. The method of adding the include file varies depending on the environment used. Declaration in the Source File Write the declaration in the source file. #include "DAQMX.h" Note The include file of the common section (DAQHandler.h) is referenced from the include file described above. Thus, declaration for it is not necessary.
3.2 Program - MX100/Visual C - Retrieval of the Measured Data Program Example 1 This program retrieves measured data. IM MX190-01E 3-7 3 MX100 - Visual C ////////////////////////////////////////////////////////////// // MX100 sample for measurement #include #include "DAQMX.
3.2 Program - MX100/Visual C - //connect comm = openMX("192.168.1.
3.2 Program - MX100/Visual C - Flow of the Process The flow chart shown below omits the declaration section. START Connect Get the data range that can be retrieved startFIFOMX getFIFODataNoMX Declare the retrieval of the measured data talkFIFODataMX Get the time information getTimeDataMX Get the measured data getChDataMX 3 Last data number? Stop the FIFO Disconnect stopFIFOMX closeMX END Last data number? Communication Process First, make a connection.
3.2 Program - MX100/Visual C - Talker talkFIFODataMX(comm, 0, startNo, endNo) Specifies the data range and declares the retrieval of the FIFO data (measured data retrieval declaration). Retrieval of the FIFO Data Time Information getTimeDataMX(comm, &dataNo, &datetime, &usertime, &flag) Gets the time information in the specified range in units of data numbers. The end is determined by the flag status of “end data.” Note usertime is the user-defined sequence information (user count).
3.2 Program - MX100/Visual C - Retrieval of Setup Data and Configuration Program Example 2 This program executes the following three items. This program contains all four items, but each item can be written and executed separately. • Get the setup data collectively • Configure the setup data collectively. 3 • Set a DC voltage range to the channel IM MX190-01E 3-11 MX100 - Visual C ////////////////////////////////////////////////////////////// // MX100 sample for configuration #include
3.2 Program - MX100/Visual C - //disconnect rc = closeMX(comm); #ifdef WIN32 FreeLibrary(pDll); #endif return rc; } ////////////////////////////////////////////////////////////// Description Collective Retrieval of Setup Data getConfigDataMX(comm, &configdata) The setup data below can be retrieved by the collective retrieval of setup data. For details on the items that can be retrieved, see section 6.4, “MX100 Types.” • System configuration data: Stored in the MXSystemInfo structure.
Chapter 4 MX100 - Visual Basic - 4.1 Functions and Their Functionalities - MX100/ Visual Basic This section indicates the correspondence between the functionalities that the API supports and the Visual Basic functions. Communication Functions Function Connect to the MX100. Disconnect from the MX100. Set the communication timeout.
4.1 Functions and Their Functionalities - MX100/Visual Basic - Note If the auto control of the FIFO is enabled, the FIFO is automatically resumed when the FIFO is stopped due to an execution of a function. Functionality Collective Setup Function Set the setup data (system setup data). Configure the setup data (channel setup data). Set the DO (Digital Output) data collectively.
4.1 Functions and Their Functionalities - MX100/Visual Basic - Set the PWM type for the channel Output channel data Output types Selected value Pulse interval integer multiple Change a portion of the DO data. Change a portion of the AO/PWM data Change a portion of the initial balance data Change a portion of the transmission output data Sets the chattering filter on the channel.
4.1 Functions and Their Functionalities - MX100/Visual Basic - Retrieval of DO data Function Get the DO data collectively. Function getDODataMX Retrieval of AO/PWM Data and Transmission Output Data Function Get AO/PWM data and transmission output data collectively. Function getAOPWMDataMX Retrieval of Channel Information Data Function Declare the retrieval of the channel information data.
4.1 Functions and Their Functionalities - MX100/Visual Basic - Utilities IM MX190-01E Function setUserTimeVBMX getLastErrorMX toDoubleValueMX toStringValueMX toAlarmNameMX getVersionAPIMX getRevisionAPIMX toErrorMessageMX getMaxLenErrorMessageMX incrementDataNoMX 4 MX100 - Visual Basic Function Insert the specified user count (user-defined order information) in the next packet to be issued. Get the MX100-specific error that was received last through communications.
4.2 Programming - MX100/Visual Basic - Declaration of Types, Functions, and Constants To use types, functions, and constants for Visual Basic, they must be declared in advance. The following methods of declaration statements are available. Statement of All Declarations Adding the standard module library file for Visual Basic (DAQMX.bas) to the project is equivalent to declaring all types, functions, and constants.
4.2 Programming - MX100/Visual Basic - Retrieval of the Measured Data Program Example 1 This program retrieves measured data. Description Overview Data retrieval is possible by starting the FIFO. The range to be retrieved is specified by the FIFO number and the data number. The time stamp corresponding to the data number and the measured data are retrieved separately. The end is determined by the flag.
4.2 Programming - MX100/Visual Basic - Flow of the Process The flow chart shown below omits the declaration section. START Connect Start the FIFO Get the data range that can be retrieved openMX startFIFOMX getFIFODataNoMX Declare the retrieval of the measured data talkFIFODataVBMX Get the time information getTimeDataMX Get the measured data getChDataMX Last data number? Stop the FIFO Disconnect stopFIFOMX closeMX END Last data number? Communication Process First, make a connection.
4.2 Programming - MX100/Visual Basic - Retrieval of Data Range getFIFODataNoMX(comm, 0, startNo, endNo) Retrieves the range from the next data following the data retrieved last to the most recent data of the specified FIFO number using data numbers. Talker talkFIFODataVBMX(comm, 0, startNo, endNo) Specifies the data range and declares the retrieval of the FIFO data (measured data retrieval declaration). 4 The end is determined by the flag status of “end data.
4.2 Programming - MX100/Visual Basic - Retrieval of Setup Data and Configuration Program Example 2 This program executes the following four items. This program contains all four items, but each item can be written and executed separately. • Get setup data. • Set setup data other than channel setup data collectively.
4.2 Programming - MX100/Visual Basic - Collective Setting of Setup Data Other Than Channel Setup Data setSystemConfigMX(comm, sysinfo) The contents of the specified MXSystemInfo structure are assigned to the MX100. Setting of the Channel Setup Data setChConfigMX(comm, chconfig) The contents of the specified MXChConfig structure are assigned to the MX100. Setting a DC Voltage Range to the Channel setVOLTMX(comm, DAQMX_RANGE_VOLT_20MV, 1, 1, 0, 0, 0, 0, 0) Sets channel number 1 to DC voltage range 20 mV.
Chapter 5 Functions for the MX100 (Visual C/Visual Basic) 5.1 Details of Functions - MX100 (Visual C/Visual Basic) This section describes the MX100 functions that are used in C and Visual Basic. The functions are listed in alphabetical order by the function name. For details on constants and types, see chapter 6. For information about the MX100, see appendix 1. Most functions return an error number as a return value.Error number 0 is returned if there is no error.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - autoFIFOMX Syntax int autoFIFOMX(DAQMX daqmx, int bAuto); Declaration Public Declare Function autoFIFOMX Lib "DAQMX"(ByVal daqmx As Long, ByVal bAuto As Long) As Long Parameters daqmx Specify the device descriptor. bAuto Specify the boolean value. Description Sets auto control of the FIFO. Return value Returns an error number. Error: Not descriptor No device descriptor.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - changeAOPWMDataMX Syntax int changeAOPWMDataMX(MXAOPWMData * pMXAOPWMData, int aopwmNo, int bValid, int iAOPWMValue); Declaration Public Declare Function changeAOPWMDataMX Lib "DAQMX"(ByRef pMXAOPWMData As MXAOPWMData, ByVal aopwmNo As Long, ByVal bValid As Long, ByVal iAOPWMValue As Long) As Long Parameters cMXAOPWMData aopwmNo Specify AO/PWM data. Specify the AO/PWM data number. bValid iAOPWMValue Specify the boolean value.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - changeBalanceMX Syntax int changeBalanceMX(MXBalanceData * pMXBalanceData, int balanceNo, int bValid, int iValue); Declaration Public Declare Function changeBalanceMX Lib "DAQMX"(ByRef pMXBalanceData As MXBalanceData, ByVal balanceNo As Long, ByVal bValid As Long, ByVal iValue As Long) As Long Parameters pMXBalanceData balanceNo Specify initial balance data. Specify the initial balance data number. bValid iValue Specify the boolean value.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - changeDODataMX Syntax int changeDODataMX(MXDOData * pMXDOData, int doNo, int bValid, int bONOFF); Declaration Public Declare Function changeDODataMX Lib "DAQMX"(ByRef pMXDOData As MXDOData, ByVal doNo As Long, ByVal bValid As Long, ByVal bONOFF As Long) As Long Parameters pMXDOData doNo Specify the DO data. Specify the data number. bValid bONOFF Specify the boolean value. Specify the boolean value.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - changeTransmitMX Syntax int changeTransmitMX(MXTransmit * pMXTransmit, int aopwmNo, int iTrans); Declaration Public Declare Function changeTransmitMX Lib "DAQMX"(ByRef pMXTransmit As MXTransmit, ByVal pwmNo As Long, ByVal iTrans As Long) As Long Parameters pMXTransmit aopwmNo Specify the transmission output data. Specify the AO/PWM data number. iTrans Specify the transmission status.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - closeMX Syntax int closeMX(DAQMX daqmx); Declaration Public Declare Function closeMX Lib "DAQMX"(ByVal daqmx As Long) As Long Parameters daqmx Specify the device descriptor. Description Disconnects the communication using the specified device descriptor. When the communication is disconnected, the value of the device descriptor is 5 meaningless.Do not use the value as a device descriptor.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - compareDataNoMX Syntax int compareDataNoMX(MXDataNo * prevDataNo, MXDataNo * nextDataNo); Declaration Public Declare Function compareDataNoMX Lib "DAQMX"(ByRef prevDataNo As MXDataNo, ByRef nextDataNo As MXDataNo) As Long Parameters prevDataNo nextDataNo Specify the data number (previous). Specify the data number (next). Description Compares the specified data numbers. • The data number is 64 bits while the return value is 32 bits.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - decrementDataNoMX Syntax void decrementDataNoMX(MXDataNo * dataNo, int decrement); Declaration Public Declare Sub decrementDataNoMX Lib "DAQMX"(ByRef dataNo As MXDataNo, ByVal decrement As Long) Parameters dataNo Specify the data number. decrement Specify the value to decrement by. Description Decrements the specified data number by the specified amount. The field of the 5 specified data number is changed.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - formatCFMX Syntax int formatCFMX(DAQMX daqmx); Declaration Public Declare Function formatCFMX Lib "DAQMX"(ByVal daqmx As Long) As Long Parameters daqmx Specify the device descriptor. Description Formats the CF (Compact Flash) card. • The response to this function may take several seconds or longer. The time required varies depending on the medium used. Return value Returns an error number. Error: Not descriptor No device descriptor.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getAlarmNameMX [Visual C only] Syntax const char * getAlarmNameMX(int iAlarmType); Parameters iAlarmType Specify the alarm type. Description Gets the string corresponding to the specified alarm type. • In Visual Basic, use the toAlarmNameMX function. Return value Returns a pointer to the string.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getAOPWMDataMX Syntax int getAOPWMDataMX(DAQMX daqmx, MXAOPWMData * pMXAOPWMData, MXTransmit * pMXTransmit); Declaration Public Declare Function getAOPWMDataMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXAOPWMData As MXAOPWMData, ByRef pMXTransmit As MXTransmit) As Long Parameters daqmx pMXAOPWMData Specify the device descriptor. Specify the destination where the AO/PWM data is to be pMXTransmit returned.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getBalanceMX Syntax int getBalanceMX(DAQMX daqmx, MXBalanceData * pMXBalanceData); Declaration Public Declare Function getBalanceMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXBalanceData As MXBalanceData) As Long Parameters daqmx Specify the device descriptor. pMXBalanceData Specify the destination where the initial balance data is to be returned.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getChConfigMX Syntax int getChConfigMX(DAQMX daqmx, MXChConfig * pMXChConfig, int * pFlag); Declaration Public Declare Function getChConfigMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXChConfig As MXChConfig, ByRef pFlag As Long) As Long Parameters daqmx pMXChConfig Specify the device descriptor. Specify the destination where the channel setup data is to be pFlag returned. Specify the destination where the flag is to be returned.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getChDataMX Syntax int getChDataMX(DAQMX daqmx, MXDataNo * pMXDataNo, MXChInfo * pMXChInfo, MXDataInfo * pMXDataInfo, int * pFlag); Declaration Public Declare Function getChDataMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXDataNo As MXDataNo, ByRef pMXChInfo As MXChInfo, ByRef pMXDataInfo As MXDataInfo, ByRef pFlag As Long) As Long Parameters Specify the device descriptor. Specify the destination where the data number is to be returned.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getChDataNoMX Syntax int getChDataNoMX(DAQMX daqmx, int chNo, MXDataNo * startDataNo, MXDataNo * endDataNo); Declaration Public Declare Function getChDataNoMX Lib "DAQMX"(ByVal daqmx As Long, ByVal chNo As Long, ByRef startDataNo As MXDataNo, ByRef endDataNo As MXDataNo) As Long Parameters daqmx chNo Specify the device descriptor. Specify the channel number. startDataNo Specify the destination where the start data number is to be returned.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getChInfoMX Syntax int getChInfoMX(DAQMX daqmx, MXChInfo * pMXChInfo, int * pFlag); Declaration Public Declare Function getChInfoMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXChInfo As MXChInfo, ByRef pFlag As Long) As Long Parameters daqmx pMXChInfo Specify the device descriptor. Specify the destination where the channel information data is to pFlag be returned. Specify the destination where the flag is to be returned.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getConfigDataMX [Visual C only] Syntax int getConfigDataMX(DAQMX daqmx, MXConfigData * pMXConfigData); Parameters daqmx Specify the device descriptor. pMXConfigData Specify the destination where the setup data is to be returned. Description Gets the setup data collectively. • Stores setup data in the specified location if the return destination is specified.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getDODataMX Syntax int getDODataMX(DAQMX daqmx, MXDOData * pMXDOData); Declaration Public Declare Function getDODataMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXDOData As MXDOData) As Long Parameters daqmx Specify the device descriptor. pMXDOData Specify the destination where the DO data is to be returned. Description Gets the DO data collectively. 5 Stores DO data in the specified location if the return destination is specified.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getErrorMessageMX [Visual C only] Syntax const char * getErrorMessageMX(int errCode); Parameters errCode Specify the error number. Description Gets the error message string corresponding to the error number. In Visual Basic, use the toErrorMessageMX function. Return value Returns the length of the string.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getFIFODataNoMX Syntax int getFIFODataNoMX(DAQMX daqmx, int fifoNo, MXDataNo * startDataNo, MXDataNo * endDataNo); Declaration Public Declare Function getFIFODataNoMX Lib "DAQMX"(ByVal daqmx As Long, ByVal fifoNo As Long, ByRef startDataNo As MXDataNo, ByRef endDataNo As MXDataNo) As Long Parameters Specify the device descriptor. Specify the FIFO number. startDataNo Specify the destination where the start data number is to be returned.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getItemErrorMX Syntax int getItemErrorMX(DAQMX daqmx, int * itemErr); Declaration Public Declare Function getItemErrorMX Lib "DAQMX"(ByVal daqmx As Long, ByRef itemErr As Long) As Long Parameters daqmx Specify the device descriptor. itemErr returned. Specify the destination where the setting item number is to be Description Gets the number of the parameter on which an error was last detected.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getLastErrorMX Syntax int getLastErrorMX(DAQMX daqmx, int * lastErr); Declaration Public Declare Function getLastErrorMX Lib "DAQMX"(ByVal daqmx As Long, ByRef lastErr As Long) As Long Parameters daqmx Specify the device descriptor. lastErr returned. Specify the destination where the MX100-specific error is to be Description 5 Gets the MX100-specific error that was received last through communications.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getMaxLenAlarmNameMX Syntax int getMaxLenAlarmNameMX(void); Declaration Public Declare Function getMaxLenAlarmNameMX Lib "DAQMX"() As Long Description Gets the maximum length of the alarm type. • The return value does not include the terminator. Return value Returns the length of the string.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getMaxLenErrorMessageMX Syntax int getMaxLenErrorMessageMX(void); Declaration Public Declare Function getMaxLenErrorMessageMX Lib "DAQMX"() As Long Description Gets the maximum length of the error message string. • The return value does not include the terminator. Return value Returns the length of the string.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getOutputMX Syntax int getOutputMX(DAQMX daqmx, MXOutputData * pMXOutputData); Declaration Public Declare Function getOutputMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXOutputData As MXOutputData) As Long Parameters daqmx Specify the device descriptor. pMXOutputData Specify the destination where the output channel data is to be returned. Description Gets the output channel data. • Stores retrieved data if the return destination is specified.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getRevisionAPIMX Syntax const int getRevisionAPIMX(void); Declaration Public Declare Function getRevisionAPIMX Lib "DAQMX"() As Long Description Gets the revision number of this API. Return value Returns the revision number of this API as an integer value.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getStatusDataMX Syntax int getStatusDataMX(DAQMX daqmx, MXStatus * pMXStatus); Declaration Public Declare Function getStatusDataMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXStatus As MXStatus) As Long Parameters daqmx Specify the device descriptor. pMXStatus Specify the destination where the status is to be returned. Description Gets the status. • Stores the status in the specified location if the return destination is specified.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getSystemConfigMX Syntax int getSystemConfigMX(DAQMX daqmx, MXSystemInfo * pSysInfo); Declaration Public Declare Function getSystemConfigMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pSysInfo As MXSystemInfo) As Long Parameters daqmx Specify the device descriptor. pSysInfo Specify the destination where the system configuration data is to be returned. Description is specified. Return value Returns an error number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getTimeDataMX Syntax int getTimeDataMX(DAQMX daqmx, MXDataNo * pMXDataNo, MXDateTime * pMXDateTime, MXUserTime * pMXUserTime, int * pFlag); Declaration Public Declare Function getTimeDataMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXDataNo As MXDataNo, ByRef pMXDateTime As MXDateTime, ByRef pMXUserTime As MXUserTime, ByRef pFlag As Long) As Long Parameters daqmx pMXDataNo Specify the device descriptor.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - getVersionAPIMX Syntax const int getVersionAPIMX(void); Declaration Public Declare Function getVersionAPIMX Lib "DAQMX"() As Long Description Gets the version number of this API. Return value Returns the version number of this API as an integer value.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - incrementDataNoMX Syntax void incrementDataNoMX(MXDataNo * dataNo, int increment); Declaration Public Declare Sub incrementDataNoMX Lib "DAQMX"(ByRef dataNo As MXDataNo, ByVal increment As Long) Parameters dataNo increment Specify the data number. Specify the value to increment by. Description Increments the specified data number by the specified amount. The field of the specified data number is changed.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - initSystemMX Syntax int initSystemMX(DAQMX daqmx, int iCtrl); Declaration Public Declare Function initSystemMX Lib "DAQMX"(ByVal daqmx As Long, ByVal iCtrl As Long) As Long Parameters daqmx Specify the device descriptor. iCtrl Specify the system control type. Description Executes the specified system control. 5 Return value Not descriptor Functions for the MX100 (Visual C/Visual Basic) Returns an error number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - isDataNoMX [Visual C only] Syntax int isDataNoMX(MXDataNo dataNo); Parameters dataNo Specify the data number. Description Checks whether the specified data number is a valid number. • Returns “Valid” if the data number is 0 or greater. Return value Returns a boolean value.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - isDataNoVBMX Syntax int isDataNoVBMX(MXDataNo * dataNo); Declaration Public Declare Function isDataNoVBMX Lib "DAQMX"(ByRef dataNo As MXDataNo) As Long Parameters dataNo Specify the data number. Description Checks whether the specified data number is a valid number. • Except for reference specification, the data number specification is the same as 5 Functions for the MX100 (Visual C/Visual Basic) the isDataNoMX function.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - openMX Syntax DAQMX openMX(const char * strAddress, int * errorCode); Declaration Public Declare Function openMX Lib "DAQMX"(ByVal strAddress As String, ByRef errorCode As Long) As Long Parameters strAddress Specify the IP address as a string. errorCode Specify the destination where the error number is to be returned. Description Connects to the device with the IP address specified by the parameters.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - resetBalanceMX Syntax int resetBalanceMX(DAQMX daqmx, MXBalanceData * pMXBalanceData, MXBalanceResult * pMXBalanceResult); Declaration Public Declare Function resetBalanceMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXBalanceData As MXBalanceData, ByRef pMXBalanceResult As MXBalanceResult) As Long Parameters daqmx pMXBalanceData Specify the device descriptor. Specify initial balance data.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - runBalanceMX Syntax int runBalanceMX(DAQMX daqmx, MXBalanceData * pMXBalanceData, MXBalanceResult * pMXBalanceResult); Declaration Public Declare Function runBalanceMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXBalanceData As MXBalanceData, ByRef pMXBalanceResult As MXBalanceResult) As Long Parameters daqmx pMXBalanceData Specify the device descriptor. Specify initial balance data.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setAlarmMX Syntax int setAlarmMX(DAQMX daqmx, int levelNo, int startChNo, int endChNo, int iAlarmType, int value, int histerisys); Declaration Public Declare Function setAlarmMX Lib "DAQMX"(ByVal daqmx As Long, ByVal levelNo As Long, ByVal startChNo As Long, ByVal endChNo As Long, ByVal iAlarmType As Long, ByVal value As Long, ByVal histerisys As Long) As Long Parameters Specify the device descriptor. levelNo startChNo Specify the alarm level.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setAOMX Syntax int setAOMX(DAQMX daqmx, int iRangeAO, int startChNo, int endChNo, int spanMin, int spanMax); Declaration Public Declare Function setAOMX Lib "DAQMX"(ByVal daqmx As Long, ByVal iRangeAO As Long, ByVal startChNo As Long, ByVal endChNo As Long, ByVal spanMin As Long, ByVal spanMax As Long) As Long Parameters daqmx Specify the device descriptor. iRangeAO startChNo Specify the AO range type from the range type.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setAOPWMDataMX Syntax int setAOPWMDataMX(DAQMX daqmx, MXAOPWMData * pMXAOPWMData); Declaration Public Declare Function setAOPWMDataMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXAOPWMData As MXAOPWMData) As Long Parameters daqmx Specify the device descriptor. pMXAOPWMData Specify the AO/PWM data to output. Description Sends AO/PWM data collectively.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setAOTypeMX Syntax int setAOTypeMX(DAQMX daqmx, int aoNo, int iKind, int refChNo); Declaration Public Declare Function setAOTypeMX Lib "DAQMX"(ByVal daqmx As Long, ByVal aoNo As Long, ByVal iKind As Long, ByVal refChNo As Long) As Long Parameters daqmx aoNo Specify the device descriptor. Specify the AO data number. iKind refChNo Specify the type of AO channel using channel type. Specify the reference channel using a channel number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setBackupMX Syntax int setBackupMX(DAQMX daqmx, int bBackup, int iCFWriteMode); Declaration Public Declare Function setBackupMX Lib "DAQMX"(ByVal daqmx As Long, ByVal bBackup As Long, ByVal iCFWriteMode As Long) As Long Parameters daqmx bBackup Specify the device descriptor. Specify the boolean value. iCFWriteMode Specify the CF write mode. Description 5 Sets backup (saving of data to the CF card).
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setBalanceMX Syntax int setBalanceMX(DAQMX daqmx, MXBalanceData * pMXBalanceData); Declaration Public Declare Function setBalanceMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXBalanceData As MXBalanceData) As Long Parameters daqmx Specify the device descriptor. pMXBalanceData Specify initial balance data. Description Sets initial balance data. • Writes the initial balance data of channels whose initial balance data items are set to Valid.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setBurnoutMX Syntax int setBurnoutMX(DAQMX daqmx, int iBurnout, int startChNo, int endChNo); Declaration Public Declare Function setBurnoutMX Lib "DAQMX"(ByVal daqmx As Long, ByVal iBurnout As Long, ByVal startChNo As Long, ByVal endChNo As Long) As Long Parameters Specify the device descriptor. iBurnout startChNo Specify the burnout type. Specify the start channel number. endChNo Specify the end channel number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setChatFilterMX Syntax int setChatFilterMX(DAQMX daqmx, int bChatFilter, int startChNo, int endChNo); Declaration Public Declare Function setChatFilterMX Lib "DAQMX" (ByVal daqmx As Long, ByVal bChatFilter As Long, ByVal startChNo As Long, ByVal endChNo As Long) As Long Parameters daqmx bChatFilter Specify the device descriptor. Specify the Boolean value. startChNo endChNo Specify the start channel number. Specify the end channel number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setChConfigMX Syntax int setChConfigMX(DAQMX daqmx, MXChConfig * pMXChConfig); Declaration Public Declare Function setChConfigMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXChConfig As MXChConfig) As Long Parameters daqmx Specify the device descriptor. pMXChConfig Specify the channel setup data. Description Sets the channel setup data. 5 • The setup data is retrieved collectively, changed, and sent collectively.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setChoiceMX Syntax int setChoiceMX(DAQMX daqmx, int startChNo, int endChNo, int idleChoice, int errorChoice, int presetValue); Declaration Public Declare Function setChoiceMX Lib "DAQMX"(ByVal daqmx As Long, ByVal startChNo As Long, ByVal endChNo As Long, ByVal idleChoice As Long, ByVal errorChoice As Long, ByVal presetValue As Long) As Long Parameters daqmx Specify the device descriptor. startChNo endChNo Specify the start channel number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setCommentMX Syntax int setCommentMX(DAQMX daqmx, const char * strComment, int startChNo, int endChNo); Declaration Public Declare Function setCommentMX Lib "DAQMX"(ByVal daqmx As Long, ByVal strComment As String, ByVal startChNo As Long, ByVal endChNo As Long) As Long Parameters daqmx strComment Specify the device descriptor. Specify the comment. startChNo endChNo Specify the start channel number. Specify the end channel number.
5.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setConfigDataMX Syntax int setConfigDataMX(DAQMX daqmx, MXConfigData * pMXConfigData); Parameters daqmx Specify the device descriptor. pMXConfigData Specify the setup data. Description Sends the setup data collectively. • In Visual Basic, set each data structure individually. Return value 5 Not descriptor Functions for the MX100 (Visual C/Visual Basic) Returns an error number. Error: No device descriptor.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setDateTimeMX Syntax int setDateTimeMX(DAQMX daqmx, MXDateTime * pMXDateTime); Declaration Public Declare Function setDateTimeMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXDateTime As MXDateTime) As Long Parameters daqmx Specify the device descriptor. pMXDateTime Specify the time information data. Description Sets time information data on the device. • Milliseconds are discarded.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setDateTimeNowMX Syntax int setDateTimeNowMX(DAQMX daqmx); Declaration Public Declare Function setDateTimeNowMX Lib "DAQMX"(ByVal daqmx As Long) As Long Parameters daqmx Specify the device descriptor. Description Sets the current date/time. Return value 5 Returns an error number.
5.
5.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setDODataMX Syntax int setDODataMX(DAQMX daqmx, MXDOData * pMXDOData); Declaration Public Declare Function setDODataMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXDOData As MXDOData) As Long Parameters daqmx Specify the device descriptor. pMXDOData Specify the DO data. Description Sends the DO data collectively. • Changes the output of command DO channels. • You can create data to send by changing the DO data of a data operation function.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setDOTypeMX Syntax int setDOTypeMX(DAQMX daqmx, int doNo, int iKind, int bDeenergize, int bHold); Declaration Public Declare Function setDOTypeMX Lib "DAQMX"(ByVal daqmx As Long, ByVal doNo As Long, ByVal iKind As Long, ByVal bDeenergize As Long, ByVal bHold As Long) As Long Parameters Specify the device descriptor. Specify the data number. iKind bDeenergize Specify the DO channel type. Specify de-energize using a Boolean value.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setFilterMX Syntax int setFilterMX(DAQMX daqmx, int iFilter, int startChNo, int endChNo); Declaration Public Declare Function setFilterMX Lib "DAQMX"(ByVal daqmx As Long, ByVal iFilter As Long, ByVal startChNo As Long, ByVal endChNo As Long) As Long Parameters daqmx iFilter Specify the device descriptor. Specify the filter coefficient. startChNo endChNo Specify the start channel number. Specify the end channel number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setIntervalMX Syntax int setIntervalMX(DAQMX daqmx, int moduleNo, int iInterval, int iHz); Declaration Public Declare Function setIntervalMX Lib "DAQMX"(ByVal daqmx As Long, ByVal moduleNo As Long, ByVal iInterval As Long, ByVal iHz As Long) As Long Parameters daqmx moduleNo Specify the device descriptor. Specify the module number. iInterval iHz Specify the interval type. Specify the type of A/D integration time.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setOutputMX Syntax int setOutputMX(DAQMX daqmx, MXOutputData * pMXOutputData); Declaration Public Declare Function setOutputMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXOutputData As MXOutputData) As Long Parameters daqmx Specify the device descriptor. pMXOutputData Specify the output channel data. Description Sets the output channel data. • The setup data is retrieved collectively, changed, and sent collectively.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setOutputTypeMX Syntax int setOutputTypeMX(DAQMX daqmx, int iOutput, int startChNo, int endChNo); Declaration Public Declare Function setOutputTypeMX Lib "DAQMX"(ByVal daqmx As Long, ByVal iOutput As Long, ByVal startChNo As Long, ByVal endChNo As Long) As Long Parameters daqmx iOutput Specify the device descriptor. Specify the output type. startChNo endChNo Specify the start channel number. Specify the end channel number.
5.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setPulseTimeMX Syntax int setPulseTimeMX(DAQMX daqmx, int pulseTime, int startChNo, int endChNo); Declaration Public Declare Function setPulseTimeMX Lib "DAQMX"(ByVal daqmx As Long, ByVal pulseTime As Long, ByVal startChNo As Long, ByVal endChNo As Long) As Long Parameters daqmx pulserTime Specify the device descriptor. Specify the integer multiple of the pulse interval. startChNo endChNo Specify the start channel number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setPWMMX Syntax int setPWMMX(DAQMX daqmx, int iRangePWM, int startChNo, int endChNo, int spanMin, int spanMax); Declaration Public Declare Function setPWMMX Lib "DAQMX"(ByVal daqmx As Long, ByVal iRangePWM As Long, ByVal startChNo As Long, ByVal endChNo As Long, ByVal spanMin As Long, ByVal spanMax As Long) As Long Parameters daqmx Specify the device descriptor. iRangePWM startChNo Specify the PWM range type from the range type.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setPWMTypeMX Syntax int setPWMTypeMX(DAQMX daqmx, int pwmNo, int iKind, int refChNo); Declaration Public Declare Function setPWMTypeMX Lib "DAQMX"(ByVal daqmx As Long, ByVal pwmNo As Long, ByVal iKind As Long, ByVal refChNo As Long) As Long Parameters daqmx pwmNo Specify the device descriptor. Specify the PWM data number. iKind refChNo Specify the type of PWM channel using a channel type. Specify the reference channel using a channel number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setRefAlarmMX Syntax int setRefAlarmMX(DAQMX daqmx, int refChNo, int startChNo, int endChNo, int levelNo, int bValid); Declaration Public Declare Function setRefAlarmMX Lib "DAQMX"(ByVal daqmx As Long, ByVal refChNo As Long, ByVal startChNo As Long, ByVal endChNo As Long, ByVal levelNo As Long, ByVal bValid As Long) As Long Parameters daqmx Specify the device descriptor. refChNo startChNo Specify the reference channel using a channel number.
5.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setRJCTypeMX Syntax int setRJCTypeMX(DAQMX daqmx, int iRJCType, int startChNo, int endChNo, int volt); Declaration Public Declare Function setRJCTypeMX Lib "DAQMX"(ByVal daqmx As Long, ByVal iRJCType As Long, ByVal startChNo As Long, ByVal endChNo As Long, ByVal volt As Long) As Long Parameters daqmx iRJCType Specify the device descriptor. Specify the RJC type. startChNo endChNo Specify the start channel number. Specify the end channel number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setRRJCMX Syntax int setRRJCMX(DAQMX daqmx, int refChNo, int startChNo, int endChNo, int spanMin, int spanMax); Declaration Public Declare Function setRRJCMX Lib "DAQMX"(ByVal daqmx As Long, ByVal refChNo As Long, ByVal startChNo As Long, ByVal endChNo As Long, ByVal spanMin As Long, ByVal spanMax As Long) As Long Parameters Specify the device descriptor. refChNo startChNo Specify the reference channel using a channel number.
5.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setScallingUnitMX Syntax int setScallingUnitMX(DAQMX daqmx, const char * strUnit, int startChNo, int endChNo); Declaration Public Declare Function setScallingUnitMX Lib "DAQMX"(ByVal daqmx As Long, ByVal strUnit As String, ByVal startChNo As Long, ByVal endChNo As Long) As Long Parameters daqmx strUnit Specify the device descriptor. Specify the unit name. startChNo endChNo Specify the start channel number. Specify the end channel number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setSegmentMX Syntax int setSegmentMX(DAQMX daqmx, int dispType, int dispTime, MXSegment * newSegment, MXSegment * oldSegment); Declaration Public Declare Function setSegmentMX Lib "DAQMX"(ByVal daqmx As Long, ByVal iDispType As Long, ByVal dispTime As Long, ByRef newSegment As MXSegment, ByRef oldSegment As MXSegment) As Long Parameters daqmx Specify the device descriptor. iDispType dispTime Specify the display type. Specify the display time.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setSKIPMX Syntax int setSKIPMX(DAQMX daqmx, int startChNo, int endChNo); Declaration Public Declare Function setSKIPMX Lib "DAQMX"(ByVal daqmx As Long, ByVal startChNo As Long, ByVal endChNo As Long) As Long Parameters daqmx Specify the device descriptor. startChNo endChNo Specify the start channel number. Specify the end channel number. Description 5 • When set to an unused channel, the channel settings on the main unit are lost.
5.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setSystemConfigMX Syntax int setSystemConfigMX(DAQMX daqmx, MXSystemInfo * pMXSystemInfo); Declaration Public Declare Function setSystemConfigMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXSystemInfo As MXSystemInfo) As Long Parameters daqmx Specify the device descriptor. pMXSystemInfo Specify the system configuration data. Description Sets the system configuration data within the setup data.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setSystemTimeoutMX Syntax int setSystemTimeoutMX(DAQMX daqmx, int timeout); Declaration Public Declare Function setSystemTimeoutMX Lib "DAQMX"(ByVal daqmx As Long, ByVal timeout As Long) As Long Parameters daqmx Specify the device descriptor. timeout Specify the timeout value in numbers of seconds. Description Sets the timeout value. • The setup data is retrieved collectively, changed, and sent collectively.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setTagMX Syntax int setTagMX(DAQMX daqmx, const char * strTag, int startChNo, int endChNo); Declaration Public Declare Function setTagMX Lib "DAQMX"(ByVal daqmx As Long, ByVal strTag As String, ByVal startChNo As Long, ByVal endChNo As Long) As Long Parameters daqmx strTag Specify the device descriptor. Specify the tag. startChNo endChNo Specify the start channel number. Specify the end channel number.
5.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setTempUnitMX Syntax int setTempUnitMX(DAQMX daqmx, int iTempUnit); Declaration Public Declare Function setTempUnitMX Lib "DAQMX"(ByVal daqmx As Long, ByVal iTempUnit As Long) As Long Parameters daqmx Specify the device descriptor. iTempUnit Specify the temperature unit type. Description Sets the temperature unit type.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setTimeOutMX Syntax int setTimeOutMX(DAQMX daqmx, int seconds); Declaration Public Declare Function setTimeOutMX Lib "DAQMX"(ByVal daqmx As Long, ByVal seconds As Long) As Long Parameters daqmx Specify the device descriptor. seconds Specify the communication timeout value in units of seconds. Description Sets a timeout for the communication with the device. • If a negative value is specified, the timeout is discarded.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setTransmitMX Syntax int setTransmitMX(DAQMX daqmx, MXTransmit • pMXTransmit); Declaration Public Declare Function setTransmitMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXTransmit As MXTransmit) As Long Parameters daqmx Specify the device descriptor. pMXTransmit Specify the transmission output data. Description Sends the transmission output data collectively.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setUnitNoMX Syntax int setUnitNoMX(DAQMX daqmx, int unitNo); Declaration Public Declare Function setUnitNoMX Lib "DAQMX"(ByVal daqmx As Long, ByVal unitNo As Long) As Long Parameters daqmx Specify the device descriptor. unitNo Specify the unit number. Description Sets the unit number. • The setup data is retrieved collectively, changed, and sent collectively. Return value Returns an error number. Error: Not descriptor No device descriptor.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setUserTimeMX [Visual C Only] Syntax int setUserTimeMX(DAQMX daqmx, MXUserTime userTime); Parameters daqmx userTime Specify the device descriptor. Specify the user count. Description Sets the user count. • Inserts the specified user count in the next packet to be issued. • In Visual Basic, use the setUserTimeVBMX function. Return value 5 Returns an error number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - setUserTimeVBMX Syntax int setUserTimeVBMX(DAQMX daqmx, MXUserTime * userTime); Declaration Public Declare Function setUserTimeVBMX Lib "DAQMX"(ByVal daqmx As Long, ByRef userTime As MXUserTime) As Long Parameters daqmx Specify the device descriptor. userTime Specify the user count. Description Sets the user count. • Except for reference specification, the user count specification is the same as the setUserTimeMX function.
5.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - startFIFOMX Syntax int startFIFOMX(DAQMX daqmx); Declaration Public Declare Function startFIFOMX Lib "DAQMX"(ByVal daqmx As Long) As Long Parameters daqmx Specify the device descriptor. Description Starts the FIFO. • If the FIFO is already started, it is continued. • It may take time from the start of the FIFO until the measured data can be retrieved. The time required varies depending on the measurement interval.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - stopFIFOMX Syntax int stopFIFOMX(DAQMX daqmx); Declaration Public Declare Function stopFIFOMX Lib "DAQMX"(ByVal daqmx As Long) As Long Parameters daqmx Specify the device descriptor. Description Stops the FIFO. Return value 5 Returns an error number. Functions for the MX100 (Visual C/Visual Basic) Error: Not descriptor No device descriptor.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - talkChDataInstMX Syntax int talkChDataInstMX(DAQMX daqmx, int chNo); Declaration Public Declare Function talkChDataInstMX Lib "DAQMX"(ByVal daqmx As Long, ByVal chNo As Long) As Long Parameters daqmx Specify the device descriptor. chNo Specify the channel number. Description Declares the retrieval of the measured data of instantaneous values of the specified channel number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - talkChDataMX [Visual C only] Syntax int talkChDataMX(DAQMX daqmx, int chNo, MXDataNo startDataNo, MXDataNo endDataNo); Parameters daqmx chNo Specify the device descriptor. Specify the channel number. startDataNo endDataNo Specify the start data number. Specify the end data number. Description Declares the retrieval of the measured data of the specified channel number. • Specify the range to be retrieved using the start and end data numbers.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - talkChDataVBMX Syntax int talkChDataVBMX(DAQMX daqmx, int chNo, MXDataNo * startDataNo, MXDataNo * endDataNo); Declaration Public Declare Function talkChDataVBMX Lib "DAQMX"(ByVal daqmx As Long, ByVal chNo As Long, ByRef startDataNo As MXDataNo, ByRef endDataNo As MXDataNo) As Long Parameters daqmx chNo Specify the device descriptor. Specify the channel number. startDataNo endDataNo Specify the start data number. Specify the end data number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - talkChInfoMX Syntax int talkChInfoMX(DAQMX daqmx, int startChNo, int endChNo); Declaration Public Declare Function talkChInfoMX Lib "DAQMX"(ByVal daqmx As Long, ByVal startChNo As Long, ByVal endChNo As Long) As Long Parameters daqmx startChNo Specify the device descriptor. Specify the start channel number. endChNo Specify the end channel number. Description 5 Declares the retrieval of the channel information data.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - talkConfigMX Syntax int talkConfigMX(DAQMX daqmx, MXSystemInfo * pMXSystemInfo, MXStatus * pMXStatus, MXNetInfo * pMXNetInfo); Declaration Public Declare Function talkConfigMX Lib "DAQMX"(ByVal daqmx As Long, ByRef pMXSystemInfo As MXSystemInfo, ByRef pMXStatus As MXStatus, ByRef pMXNetInfo As MXNetInfo) As Long Parameters daqmx Specify the device descriptor.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - talkFIFODataInstMX Syntax int talkFIFODataInstMX(DAQMX daqmx, int fifoNo); Declaration Public Declare Function talkFIFODataInstMX Lib "DAQMX"(ByVal daqmx As Long, ByVal fifoNo As Long) As Long Parameters daqmx Specify the device descriptor. fifoNo Specify the FIFO number. Description Declares the retrieval of the measured data of instantaneous values of the specified 5 Functions for the MX100 (Visual C/Visual Basic) FIFO number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - talkFIFODataMX [Visual C Only] Syntax int talkFIFODataMX(DAQMX daqmx, int fifoNo, MXDataNo startDataNo, MXDataNo endDataNo); Parameters daqmx fifoNo Specify the device descriptor. Specify the FIFO number. startDataNo endDataNo Specify the start data number. Specify the end data number. Description Declares the retrieval of the measured data of the specified FIFO number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - talkFIFODataVBMX Syntax int talkFIFODataVBMX(DAQMX daqmx, int fifoNo, MXDataNo * startDataNo, MXDataNo * endDataNo); Declaration Public Declare Function talkFIFODataVBMX Lib "DAQMX"(ByVal daqmx As Long, ByVal fifoNo As Long, ByRef startDataNo As MXDataNo, ByRef endDataNo As MXDataNo) As Long Parameters daqmx fifoNo Specify the device descriptor. Specify the FIFO number. startDataNo endDataNo Specify the start data number.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - toAlarmNameMX Syntax int toAlarmNameMX(int iAlarmType, char * strAlarm, int lenAlarm); Declaration Public Declare Function toAlarmNameMX Lib "DAQMX"(ByVal iAlarmType As Long, ByVal strAlarm As String, ByVal lenAlarm As Long) As Long Parameters iAlarmType strAlarm Specify the alarm type. Specify the field where the string is to be stored. lenAlarm Specify the byte size of the field where the string is to be stored.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - toAOPWMValueMX Syntax int toAOPWMValueMX(double realValue, int iRangeAOPWM); Declaration Public Declare Function toAOPWMValueMX Lib "DAQMX"(ByVal realValue As Double, ByVal iRangeAOPWM As Long) As Long Parameters realValue Specify the actual output value. iRangeAOPWM Specify the range type.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - toDateTimeMX Syntax void toDateTimeMX(MXDateTime * pMXDateTime, int * pYear, int * pMonth, int * pDay, int * pHour, int * pMinute, int * pSecond); Declaration Public Declare Sub toDateTimeMX Lib "DAQMX"(ByRef pMXDateTime As MXDateTime, ByRef pYear As Long, ByRef pMonth As Long, ByRef pDay As Long, ByRef pHour As Long, ByRef pMinute As Long, ByRef pSecond As Long) Parameters pMXDateTime pYear Specify the time information.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - toDoubleValueMX Syntax double toDoubleValueMX(int dataValue, int point); Declaration Public Declare Function toDoubleValueMX Lib "DAQMX"(ByVal dataValue As Long, ByVal point As Long) As Double Parameters dataValue Specify the data value. point Specify the decimal point position. Description Generates the measured value from the specified data value and decimal point 5 position.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - toErrorMessageMX Syntax int toErrorMessageMX(int errCode, char * errStr, int errLen); Declaration Public Declare Function toErrorMessageMX Lib "DAQMX"(ByVal errCode As Long, ByVal errStr As String, ByVal errLen As Long) As Long Parameters errCode errStr Specify the error number. Specify the field where the string is to be stored. errLen Specify the byte size of the field where the string is to be stored.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - toRealValueMX Syntax double toRealValueMX(int iAOPWMValue, int iRangeAOPWM); Declaration Public Declare Function toRealValueMX Lib "DAQMX"(ByVal iAOPWMValue As Long, ByVal iRangeAOPWM As Long) As Double Parameters iAOPWMValue Specify the output data value. iRangeAOPWM Specify the range type.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - toStringValueMX Syntax int toStringValueMX(int dataValue, int point, char * strValue, int lenValue); Declaration Public Declare Function toStringValueMX Lib "DAQMX"(ByVal dataValue As Long, ByVal point As Long, ByVal strValue As String, ByVal lenValue As Long) As Long Parameters dataValue point Specify the data value. Specify the decimal point position. strValue lenValue Specify the field where the string is to be stored.
5.1 Details of Functions - MX100 (Visual C/Visual Basic) - toStyleVersionMX Syntax int toStyleVersionMX(int style) Declaration Public Declare Function toStyleVersionMX Lib "DAQMX"(ByVal style As Long) As Long Parameters style Specify the style. Description Gets the version number from the system configuration style. Return value 5 Returns the style version.
Chapter 6 MX100 Constants and Types 6.1 Overview of the MX100 Constants The API provides the following types of constants. The constants are common to Visual C++, Visual C, and Visual Basic. Type Communication constants Enumeration constants Maximum values Constants Boolean value Flag statuses Data status values Alarm types DC voltage range types TC range types IM MX190-01E Page 6-3 6-3 6-3 6-4 System control operation Universal input, digital input, etc.
6.1 Overview of the MX100 Constants Type RTD (1 mA) range types RTD (2 mA) range types RTD (other ) range Resistance ranges Digital Input (DI) ranges Digital input (DI) detailed ranges Strain ranges AO ranges PWM ranges 6-2 Description Pt100, etc. Pt100, etc. Pt500, Pt1000 20 Ω, 200 Ω, or 2 kΩ (0.25 mA) Level or contact input Contact input of the 4-CH Universal Input Module, etc.
6.2 MX100 Constants This section describes the mnemonic for, and the meaning of the constants. For the details on the MX100 functions, see the relevant user’s manual. Communication Constant Mnemonic DAQMX_COMMPORT Description Communication port number of the MX100. Enumeration Constants Description The number of modules. The number of channels. The number of DO data sets. DAQMX_NUMFIFO DAQMX_NUMALARM The number of FIFOs. The number of alarms. Since API R3.01, the number of alarms has changed to 4.
6.2 MX100 Constants Constants Mnemonic DAQMX_INSTANTANEOUS DAQMX_REFCHNO_ALL DAQMX_LEVELNO_ALL DAQMX_DONO_ALL DAQMX_SEGMENTNO_ALL DAQMX_CHNO_ALL DAQMX_MODULENO_ALL DAQMX_FIFONO_ALL DAQMX_AOPWMNO_ALL DAQMX_BALANCENO_ALL DAQMX_OUTPUTNO_ALL DAQMX_REFCHNO_NONE Description Data number when specifying the retrieval of the instantaneous value. Designation of all reference channel numbers. Designation of all alarm level numbers. Designation of all DO numbers.
6.2 MX100 Constants Alarm Types ◊ indicates a space.
6.
6.
6.
6.2 MX100 Constants FIFO Status Values Mnemonic DAQMX_FIFOSTAT_NONE DAQMX_FIFOSTAT_INIT DAQMX_FIFOSTAT_STOP DAQMX_FIFOSTAT_RUN DAQMX_FIFOSTAT_BACKUP Description Unknown Initializing Stopped Measuring Measuring (backing up) Display Format Values Mnemonic DAQMX_DISPTYPE_NONE DAQMX_DISPTYPE_ON DAQMX_DISPTYPE_BLINK Description Undefined ON Blinking Output Types Description No output V output mA output PWM output resolution 1 ms PWM output resolution 10 ms Setting range 6 -11.000 to 1.000 V 0 to 2.
6.2 MX100 Constants Range Type Reference range Mnemonic DAQMX_RANGE_REFERENCE Description Measurement range of the reference channel. If this constant is specified as the measurement range of the difference computation channel, the measurement range of the difference computation channel is set to the same range as the measurement range of the reference channel.
6.
6.2 MX100 Constants Mnemonic DAQMX_RANGE_VOLT_200MV Description Pt25 DAQMX_RANGE_RTD_1MACU10GEH Cu10:GE: high resolution Setting range –200.0 to 550.0°C –328.0 to 1022.0°F –200.0 to 300.0°C –328.0 to 572.0°F DAQMX_RANGE_RTD_1MACU10LNH Cu10:L&N: high resolution –500.0 to 500.0°C –328.0 to 572.0°F DAQMX_RANGE_RTD_1MACU10WEEDH Cu10:WEED: high resolution –500.0 to 500.0°C –328.0 to 572.0°F DAQMX_RANGE_RTD_1MACU10BAILEYHCu10:BAILEY: high resolution –500.0 to 500.0°C –328.0 to 572.
6.2 MX100 Constants RTD (2 mA) Range Types Mnemonic DAQMX_RANGE_RTD_2MAPT 6-13 6 MX100 Constants and Types Setting range –200.0 to 250.0°C –328.0 to 482.0°F DAQMX_RANGE_RTD_2MAJPT JPt100 –200.0 to 250.0°C –328.0 to 482.0°F DAQMX_RANGE_RTD_2MAPTH Pt100: high resolution –140.00 to 150.00°C –220.0 to 302.0°F DAQMX_RANGE_RTD_2MAJPTH JPt100: high resolution –140.00 to 150.00°C –220.0 to 302.0°F DAQMX_RANGE_RTD_2MAPT50 Pt50 –200.0 to 550.0°C –328.0 to 1022.0°F DAQMX_RANGE_RTD_2MACU10GE CU10:GE –200.0 to 300.
6.2 MX100 Constants Mnemonic Description DAQMX_RANGE_RTD_2MACU10BAILEYH Cu10:BAILEY: high resolution DAQMX_RANGE_RTD_2MAPTN Pt100: high noise resistance DAQMX_RANGE_RTD_2MAJPTN Jpt100: high noise resistance DAQMX_RANGE_RTD_2MACU100G Cu100G DAQMX_RANGE_RTD_2MACU50G Cu50G DAQMX_RANGE_RTD_2MACU10G Cu10G Setting range –200.0 to 300.0°C –328.0 to 572.0°F –200.0 to 250.0°C –328.0 to 482.0°F –200.0 to 250.0°C –328.0 to 482.0°F –200.0 to 200.0°C –328.0 to 392.0°F –200.0 to 200.0°C –328.0 to 392.0°F –200.
6.
6.3 MX100 Setting Item Numbers These numbers are added to each item of the setup data structure to unify them. When sending the setup data, the numbers show the detected location when an error occurs during a consistency check. A definition file is available. List of Setting Items Each item field of the MXConfigData structure is numbered. Definitions are given in the files below. Load the definitions as needed. • DAQMXItems.h • DAQMXItems.bas • DAQMXItems.txt • DAQMXItems.cs • DAQMXItems.
6.3 MX100 Setting Item Numbers Mnemonic Value Location DAQMX_ITEM_UNITCFTIMEOUT 9 Description Error String aSystemInfo. Timeout value aUnit.aCFTimeout Value does not CF Timeout (s) match equation. See “Timeout value calculation” DAQMX_ITEM_UNITCFWRITEMODE 10 aSystemInfo. aUnit. aCFWriteMode Value is out of range. CF WriteMode DAQMX_ITEM_UNITFREQUENCY 11 aSystemInfo. Power supply aUnit.aFrequency frequency - Frequency DAQMX_ITEM_UNITPARTNO 12 aSystemInfo. Part number aUnit.
6.3 MX100 Setting Item Numbers Modules Mnemonic Value Location Error String DAQMX_ITEM_MODULETYPE 40 aSystemInfo. Module type aModule[ ]. aType Description Value is out of range. Module0 Type DAQMX_ITEM_MODULECHNUM 48 aSystemInfo. aModule[ ]. aChNum Number of channels is out of range. Value Channel Num Module0 DAQMX_ITEM_MODULEINTERVAL 56 aSystemInfo. aModule[ ]. aInterval Interval types Value is out of range. FIFO exceeded.
6.3 MX100 Setting Item Numbers Mnemonic Value Location Description Error String DAQMX_ITEM_CHTAG 512 aChConfigData. aChConfig[ ]. aChID.aTag Tag - Channel00 Tag DAQMX_ITEM_CHCOMMENT 576 aChConfigData. Comment aChConfig[ ]. aChID.aComment - Channel00 Comment DAQMX_ITEM_ALARMTYPE 640 aChConfigData. aChConfig[ ]. aChID.aAlarm[ ]. aType Alarm type of alarm level 1 or 2. Value is out of range. Channel00 Alarm0 Type DAQMX_ITEM_ALARMON 768 aChConfigData. aChConfig[ ]. aChID.aAlarm[ ].
6.3 MX100 Setting Item Numbers Mnemonic Value Location Description Error String DAQMX_ITEM_CHIDLECHOICE 1920 aOutputData. aOutput[ ]. aIdleChoice Value selected when idle Value is out of range. Channel00 Idle Choice DAQMX_ITEM_CHERRCHOICE 1984 aOutputData. aOutput[ ]. aErrorChoice Value selected during error Value is out of range. Channel00 Error Choice DAQMX_ITEM_CHPRESETVALUE 2048 aOutputData. aOutput[ ]. aPresetValue Value when the selection value is the specified value.
6.
6.3 MX100 Setting Item Numbers Character Strings Notations for characters strings in item contents are as follows. • The valid/invalid value (Boolean) is notated as OFF or ON. • The string itself is shown as-is. • Values are written as decimals. However, hexadecimal is used to notate significant bits when present. • The alarm levels of reference channels are expressed as valid channel numbers (01, 02, etc.). • The choices are given by the name of the string.
6.4 Overview of the MX100 Types The data types below are provided.
6.4 Overview of the MX100 Types Type MXAOPWMData MXTransmit Description Structure for the specified number of AO/PWM data. Structure for the specified number of transmission statuses. Page 6-36 6-36 Type Callback type Description Add prefix “DLL” to the function name and write in uppercase. Example: callback type of the openMX function: DLLOPENMX The callback type is used to link the executable module (.dll) when using Visual C.
6.5 MX100 Types Explanation on the Description Visual C/Visual C++, and Visual Basic Types Indicates the type name in Visual C/Visual C++ and Visual Basic. Types without signs in Visual C/Visual C++ become types with signs in Visual Basic. Number of array elements for Visual C/Visual C++ types is omitted. Retrieval/Change The markings below are used to indicate items that can be retrieved, those that the user can set, and so on.
6.5 MX100 Types Detailed Explanation of Types DAQMX Type for storing the device descriptor. In Visual C/C++, it is an alias for the int type on the API before R3.01 and an alias for the viod* type on the API R3.01 or later. In Visual Basic, it is an alias for the Long type. DAQINT64 64-bit data type definition. Can be used in C/C++.This type cannot be used in Visual Basic.
6.5 MX100 Types MXAlarm MXAlarm structure Visual C/C++ Type int int int int Name Description Visual Basic Type aType aReserve aON aOFF Alarm Type Long Not used Long ON value (threshold level for alarm activation) OFF value (threshold level for alarm termination) Long Long Alarm setup information structure. The ON and OFF values must be converted to values corresponding to the measurement range by applying the decimal point position.
6.5 MX100 Types MXChConfigAI MXChConfigAI structure Visual C/C++ Type int int int int Name aFilter aRJCType aRJCVolt aBurnout Description Filter time constant RJC type RJC Voltage Burnout Description Basic Settings AI PI RC RC Visual Basic Type Long Long Long Long Retrieval/Change Name aFilter Filter time constant RJC type RJC Voltage Burnout aRJCType aRJCVolt aBurnout CI RC RC RC RC Setup data structure for AI channels.
6.
6.5 MX100 Types Retrieval/Change Name Description aChID aAIDI aAI aDO Channel ID information Setup data of the AI and DI AI setup data DO setup data Basic Settings AI DI DO RC RC RC RC RC RC RC AO RC RC PWM PI RC RC RC RC RC CI RC RC RC Channel setup information structure. MXChConfigData MXChConfigData structure Visual C/C++ Type MXChConfig [ ] Name Description Visual Basic Type aChConfig Channel setup information (None) Structure for storing the setup information of all the channels.
6.5 MX100 Types MXProductInfo MXProductInfo structure Visual C/C++ Type int Name Description Visual Basic Type aOption Options Long (Unit information only)* int aCheck Not used Long char [] aSerial Serial number String * DAQMX_MAXSERIALLEN (None) aNULL Unused Byte (serial number terminator, for Visual Basic) unsigned char [ ] aMAC MAC Address (0 To 5) As Byte (Unit information only)* * (Unit information only): Information only for the unit, not available for the module.
6.5 MX100 Types Retrieval/Change Name aType aStyle aNo aTempUnit aCFTimeout aCFWriteMode aFrequency aPartNo aProduct Description Unit type Style Unit Number Temperature unit type Timeout Value CF write mode Power supply frequency Part number Product information System R R R R R R Basic Settings R R RC RC RC RC R Unit information structure.
6.5 MX100 Types MXSystemInfo MXSystemInfo structure Visual C/C++ Name Type MXUnitData aUnit MXModuleData [ ] aModule Description Visual Basic Type Unit information Array for specificaiton of module information MXUnitData (0 To 5) As MXModuleData Retrieval/Change Name aUnit aModule Description Unit information Array of module information System R R Basic Settings R R System configuration data structure. Visual C++: The wrapper class is CDAQMXSysInfo.
6.
6.
6.5 MX100 Types MXOutput MXOutput structure Visual C/C++ Type int int int int Name aType aIdleChoice aErrorChoice aPresetValue int int aPulseTime aReserve Description Output type Value selected when idle Value selected during error Value if the selection value is the “specified value.
6.5 MX100 Types MXDO MXDO structure Visual C/C++ Type int Name aValid Visual Basic Type Long aONOFF Description Valid/invalid (presence/absence) ON/OFF (valid/invalid) int Name aDO Description DO data Visual Basic Type (1 To 60) As MXDO Long DO channel structure. MXDOData MXDOData structure Visual C/C++ Type MXDO [ ] DO data structure.
Chapter 7 DARWIN - Visual C++ - 7.1 DARWIN Class The API consists of the MX100/DARWIN Common Class and the class dedicated to the DARWIN as shown in the figure below. For the details on the MX100/DARWIN Common Class, see section 2.4. CDAQChInfo • CDAQDARWINChInfo • CDAQDARWINSysInfo CDAQDataInfo • CDAQDARWINDataInfo CDAQDateTime • CDAQDARWINDateTime CDAQHandler • CDAQDARWIN : Class common to the MX100 and the DARWIN. • : Class dedicated to the MX100.
7.2 Correspondence between the Functions and Class/Member Functions - DARWIN This section indicates the correspondence between the functions that the API supports and the class. Note This API provides a portion of the functions common to the DARWIN series instruments. Model-specific functions, setup functions of the setup mode, and A/D calibration functions are not implemented. The functions can be added by using the commands of the DARWIN communication function.
7.2 Correspondence between the Functions and Class/Member Functions - DARWIN - Control Functions Function Switch the setting mode. System reconfiguration RAM clear (Initialize the operation mode setup parameter.
7.2 Correspondence between the Functions and Class/Member Functions - DARWIN - Function Get the setup data (operation mode). Declare the retrieval of the setup data (setup mode). Get the setup data (setup mode). Declare the retrieval of the setup data (A/D calibration mode).
7.3 Programming - DARWIN/Visual C ++ - Adding the Path to the Include File Add the path of the include file (DAQDARWIN.h) to the project. The method of adding the include file varies depending on the environment used. Declaration in the Source File Write the declaration in the source file. #include "DAQDARWIN.h" Note The include file of the common section (DAQHandler.h) is referenced from the include file described above. Thus, declaration for it is not necessary.
7.3 Programming - DARWIN/Visual C ++ - Retrieval of the Measured Data Program Example 1 This program retrieves measured data. ////////////////////////////////////////////////////////////// // DARWIN sample for measurement #include #include "DAQDARWIN.
7.3 Programming - DARWIN/Visual C ++ - Flow of the Process The flow chart shown below omits the declaration section. START Connect Declare the retrieval of the measured data Get the measured data channel by channel CDAQDARWIN::open CDAQDARWIN::talkDataByBinary CDAQDARWIN::getChDataByBinary Last channel? Disconnect CDAQDARWIN::close END 7 Communication Process DARWIN - Visual C++ - First, make a connection. After making the connection, the member functions become available.
7.3 Programming - DARWIN/Visual C ++ - Retrieval of Setup Data and Configuration Program Example 2 This program executes the following two items. This program contains both items, but each item can be written and executed separately. • Retrieval of setup data • Setting a DC voltage range to the channel ////////////////////////////////////////////////////////////// // DARWIN sample for configuration #include #include "DAQDARWIN.
7.3 Programming - DARWIN/Visual C ++ - Description Talker talkOperationData(0, 1, 0, 2) Specifies the type of setup data to be retrieved (setup data of the operation mode) and the channel range (channels 1 and 2 of subunit number 0). Retrieval of Setup Data getSetDataByLine(line, BUFSIZ, &len, &flag) Gets the output by the talker function line by line. The end is determined by the flag status of “end data.”.
7.3 Programming - DARWIN/Visual C ++ - Implementing Function Commands Program Example 3 This program switches DARWIN to operation mode. The program executes the DS command of DARWIN communication function. ////////////////////////////////////////////////////////////// // DARWIN sample for command #include #include "DAQDARWIN.
7.3 Programming - DARWIN/Visual C ++ - Implementing the Talker Function Program Example 4 This program retrieves the system configuration data. The program executes the TS and CF commands of the DARWIN communication function. IM MX190-01E 7-11 7 DARWIN - Visual C++ - ////////////////////////////////////////////////////////////// // DARWIN sample for talker #include #include "DAQDARWIN.
7.3 Programming - DARWIN/Visual C ++ - Description Talker sprintf(line, "TS%d" DAQDARWIN_TALK_SYSINFODATA); Stores the TS5 (declares the retrieval of the system configuration data) command message of the DARWIN communication function to line. The constant “system configuration data output” is used to specify the output of the system configuration data. runCommand(line) Sends the message and receives the response. The number of bytes of the message is not specified (omitted).
7.4 Details of the DARWIN Class The classes are listed in alphabetical order by the class name. CDAQDARWIN Class CDAQHandler CDAQDARWIN This class is derived from the CDAQHandler class.It provides functions common to the DARWIN series such as communications, data retrieval, and measurement range setting. Public Members Construct/Destruct CDAQDARWIN Constructs an object. ~CDAQDARWIN Destructs an object.
7.4 Details of the DARWIN Class getChDataByBinary talkOperationData Gets the measured data in binary format. Declares the retrieval of the setup data of operation mode. talkSetupData talkCalibrationData Declares the retrieval of the setup data of setup mode. Declares the retrieval of the setup data of A/D calibration getSetDataByLine mode. Gets the setup data. getReportStatus Gets the report status. Setup Functions setSKIP setVOLT Sets SKIP (not used). Sets DC voltage input.
7.4 Details of the DARWIN Class Protected Members Communication Functions startTalker Starts the talker function. Utilities checkAck Checks the response. getVersionDLL getRevisionDLL Gets the version number of the DLL. Gets the revision number of the DLL. Inherited Members See CDAQHandler.
7.4 Details of the DARWIN Class CDAQDARWIN::checkAck Syntax int checkAck(const char * strAck, int lenAck); Parameters strAck lenAck Specify the response using a string. Specify the byte size of the response. Description Checks the string specified by the parameter as a response and returns the result. Return value Returns an error number. Error: Success Responds with “processing executed successfully.” Commands are not processed successfully Responds with “processing not executed successfully.
7.4 Details of the DARWIN Class CDAQDARWIN::establish Syntax int establish(int iSetup = DAQDARWIN_SETUP_ABORT); Parameters iSetup Specifies establishment of setup. Description Executes the specified setup establishment. Executes the “Communication interface”EX command. Creates and sends the command and receives the response. It is valid in setup mode. Return value Returns an error number. Reference runCommand CDAQDARWIN::getChannel 7 Syntax Parameters chType Specify the channel type.
7.4 Details of the DARWIN Class CDAQDARWIN::getChDataByASCII Syntax int getChDataByASCII(CDAQDARWINDataInfo & cDARWINDataInfo, int * pFlag); Parameters cDARWINDataInfo Specify the destination where the measured data is to be pFlag returned. Specify the destination where the flag is to be returned. Description Gets the output of each channel using the talker function declared by ttalkDataByASCII. Analyzes received information channel by channel and stores it in the return destination.
7.4 Details of the DARWIN Class CDAQDARWIN::getChInfo Syntax int getChInfo(CDAQDARWINChInfo & cDARWINChInfo, int * pFlag); Parameters cDARWINChInfo Specify the destination where the channel information data is to be pFlag returned. Specify the destination where the flag is to be returned. Description Gets the channel information data output by channel using the talker function declared by talkChInfo. Analyzes received information channel by channel and stores it in the return destination.
7.4 Details of the DARWIN Class CDAQDARWIN::getReportStatus Syntax int getReportStatus(int * pReportStatus); Parameters pReportStatus Specify the destination where the report status is to be returned. Description Gets the report status. The function executes the data retrieval declaration as a talker function and the data output in succession. Stores the report status in the return destination. This function executes the TS and RF commands of the DARWIN communication function.
7.4 Details of the DARWIN Class CDAQDARWIN::getSetDataByLine Syntax int getSetDataByLine(char * strLine, int maxLine, int * lenLine, int * pFlag); Parameters strLine Specify the field where the string received by lines is to be stored. maxLine Specify the byte size of the field where the string received by lines is to be stored. lenLine Specify the destination where the byte size of the actual string received is returned. pFlag Specify the destination where the flag is to be returned.
7.4 Details of the DARWIN Class CDAQDARWIN::getSystemConfig Syntax int getSystemConfig(CDAQDARWINSysInfo & cDARWINSysInfo); Parameters cDARWINSysInfo Specify the destination where the system configuration data is to be returned. Description Gets the system configuration data. The function executes the data retrieval declaration as a talker function and the data output. Stores the scan interval and the system configuration data to the return destination.
7.4 Details of the DARWIN Class CDAQDARWIN::isObject Syntax virtual int isObject(const char * classname = "CDAQDARWIN"; Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited. If parameters are omitted, checks whether it is this class. Classes that inherit this class must be overridden in order to check their own classes. Returns true (valid) if the class was inherited. Otherwise, returns false (invalid).
7.4 Details of the DARWIN Class CDAQDARWIN::receiveByte Syntax virtual int receiveByte(unsigned char * byteData, int maxData = 1, int * lenData = NULL); Parameters byteData Specify the field where the received data is to be stored using a maxData byte array. Specify the byte size of the received data. lenData Specify the destination where the byte size of the actual data received is returned. Description Stores the received data to the field specified by the parameter up to the specified byte size.
7.4 Details of the DARWIN Class CDAQDARWIN::runCommand Syntax virtual int runCommand(const char * strCmd) Parameters strCmd Specify the command message to be sent. Description Sends the specified command message and receives the response. This function adds a terminator to the command message at the time of transmission. Therefore, do not include the terminator in the command message.
7.4 Details of the DARWIN Class CDAQDARWIN::setAlarm Syntax int setAlarm(int levelNo, int chType, int startChNo, int endChNo = 0, int iAlarmType = DAQDARWIN_ALARM_NONE, int value = 0,int relayType = 0, int relayNo = 0); Parameters levelNo Specify the alarm level. chType startChNo Specify the channel type. Specify the start channel number. endChNo iAlarmType Specify the end channel number. Specify the alarm type using the alarm type value. value relayType Specify the alarm value.
7.4 Details of the DARWIN Class CDAQDARWIN::setDateTime Syntax int setDateTime(CDAQDARWINDateTime * pcDARWINDateTime = NULL); Parameters pcDARWINDateTime Specify the time information data. Description Sets time information data on the device. If NULL is specified, the current date/time of the PC is used. This function executes the SD command of the DARWIN communication function. It creates and sends the command and receives the response. Return value Returns an error number.
7.4 Details of the DARWIN Class CDAQDARWIN::setDI Syntax int setDI(int iRangeDI, int chType, int startChNo, int endChNo = 0, int spanMin = 0, int spanMax = 0, int scaleMin = 0, int scaleMax = 0, int scalePoint = 0); Parameters iRangeDI Specify the range type of contact input (DI). chType startChNo Specify the channel type of the measurement channel. Specify the start channel number. endChNo spanMin Specify the end channel number. Specify the left value of the span.
7.4 Details of the DARWIN Class CDAQDARWIN::setMA Syntax int setMA(int iRangeMA, int chType, int startChNo, int endChNo = 0, int spanMin = 0, int spanMax = 0, int scaleMin = 0, int scaleMax = 0, int scalePoint = 0); Parameters iRangeMA Specify the DC current range. chType startChNo Specify the channel type of the measurement channel. Specify the start channel number. endChNo spanMin Specify the end channel number. Specify the left value of the span.
7.4 Details of the DARWIN Class CDAQDARWIN::setPOWER Syntax int setPOWER(int iRangePOWER, int chType, int chNo, int iItem = DAQDARWIN_POWERITEM_P1, int iWire = DAQDARWIN_WIRE_1PH2W, int spanMin = 0, int spanMax = 0, int scaleMin = 0, int scaleMax = 0, int scalePoint = 0); Parameters iRangeVOLT Specify the power monitor range. chType chNo Specify the channel type of the measurement channel. Specify the channel number. iItem iWire Specify the power measurement parameter.
7.4 Details of the DARWIN Class CDAQDARWIN::setPULSE Syntax int setPULSE(int iRangePULSE, int chType, int startChNo, int endChNo = 0, int spanMin = 0, int spanMax = 0, int scaleMin = 0, int scaleMax = 0, int scalePoint = 0, int bFilter = DAQDARWIN_VALID_OFF); Parameters iRangePULSE Specify the pulse range. chType startChNo Specify the channel type of the measurement channel. Specify the start channel number. endChNo spanMin Specify the end channel number. Specify the left value of the span.
7.4 Details of the DARWIN Class CDAQDARWIN::setRRJC Syntax int setRRJC(int refChNo, int chType, int startChNo, int endChNo = 0, int spanMin = 0, int spanMax = 0); Parameters refChNo chType Specify the channel number of the reference channel. Specify the channel type of the measurement channel. startChNo endChNo Specify the start channel number. Specify the end channel number. spanMin spanMax Specify the left value of the span. Specify the right value of the span.
7.4 Details of the DARWIN Class CDAQDARWIN::setRTD Syntax int setRTD(int iRangeRTD, int chType, int startChNo, int endChNo = 0, int spanMin = 0, int spanMax = 0, int scaleMin = 0, int scaleMax = 0, int scalePoint = 0); Parameters iRangeRTD Specify the range type of the RTD input. chType startChNo Specify the channel type of the measurement channel. Specify the start channel number. endChNo spanMin Specify the end channel number. Specify the left value of the span.
7.4 Details of the DARWIN Class CDAQDARWIN::setScallingUnit Syntax int setScallingUnit(const char * strUnit, int chType, int startChNo, int endChNo = 0); Parameters strUnit chType Specify the unit name using a string. Specify the channel type. startChNo endChNo Specify the start channel number. Specify the end channel number. Description Sets the specified unit to the channels in the specified channel range (specified by channel type, start channel number, and end channel number).
7.4 Details of the DARWIN Class CDAQDARWIN::setSTRAIN Syntax int setSTRAIN(int iRangeSTRAIN, int chType, int startChNo, int endChNo = 0, int spanMin = 0, int spanMax = 0, int scaleMin = 0, int scaleMax = 0, int scalePoint = 0); Parameters iRangeSTRAIN Specify the strain input range. chType startChNo Specify the channel type of the measurement channel. Specify the start channel number. endChNo spanMin Specify the end channel number. Specify the left value of the span.
7.4 Details of the DARWIN Class CDAQDARWIN::setTC Syntax int setTC(int iRangeTC, int chType, int startChNo, int endChNo = 0, int spanMin = 0, int spanMax = 0, int scaleMin = 0, int scaleMax = 0, int scalePoint = 0); Parameters iRangeTC Specify the range type of the thermocouple input. chType startChNo Specify the channel type of the measurement channel. Specify the start channel number. endChNo spanMin Specify the end channel number. Specify the left value of the span.
7.4 Details of the DARWIN Class CDAQDARWIN::setVOLT Syntax int setVOLT(int iRangeVOLT, int chType, int startChNo, int endChNo = 0, int spanMin = 0, int spanMax = 0, int scaleMin = 0,int scaleMax = 0, int scalePoint = 0); Parameters iRangeVOLT Specify the range type of the DC voltage input. chType startChNo Specify the channel type of the measurement channel. Specify the start channel number. endChNo spanMin Specify the end channel number. Specify the left value of the span.
7.4 Details of the DARWIN Class CDAQDARWIN::talkCalibrationData Syntax int talkCalibrationData(int startChType, int startChNo, int endChType, int endChNo); Parameters startChType Specify the start channel type. startChNo endChType Specify the start channel number. Specify the end channel type. endChNo Specify the end channel number.
7.4 Details of the DARWIN Class CDAQDARWIN::talkDataByASCII Syntax int talkDataByASCII(int startChType, int startChNo, int endChType, int endChNo, CDAQDARWINDateTime & cDARWINDateTime); Parameters startChType Specify the start channel type. startChNo endChType Specify the start channel number. Specify the end channel type. endChNo cDARWINDateTime Specify the end channel number. Specify the destination where the time information data is to be returned.
7.4 Details of the DARWIN Class CDAQDARWIN::talkDataByBinary Syntax int talkDataByBinary(int startChType, int startChNo, int endChType, int endChNo, CDAQDARWINDateTime & cDARWINDateTime); Parameters startChType Specify the start channel type. startChNo endChType Specify the start channel number. Specify the end channel type. endChNo cDARWINDateTime Specify the end channel number. Specify the destination where the time information data is to be returned.
7.4 Details of the DARWIN Class CDAQDARWIN::talkOperationData Syntax int talkOperationData(int startChType, int startChNo, int endChType, int endChNo); Parameters startChType startChNo Specify the start channel type. Specify the start channel number. endChType endChNo Specify the end channel type. Specify the end channel number.
7.4 Details of the DARWIN Class CDAQDARWIN::transMode Syntax int transMode(int iMode); Parameters iMode Specify the mode. Description Switches to the specified mode. This function executes the DS command of the DARWIN communication function. It creates and sends the command and receives the response. Return value Returns an error number.
7.4 Details of the DARWIN Class CDAQDARWINChInfo Class CDAQChInfo CDAQDARWINChInfo This class is derived from the CDAQChInfo class. It is a class for storing the channel information data of the DARWIN series. It is a wrapper class of the DarwinChInfo structure. It stores the following types of data that is retrieved when the channel information data of the talker function is retrieved.
7.4 Details of the DARWIN Class Utilities getChName toChName Gets the channel as a string. Converts the channel into a string. toChRange getStatusName Converts the channel range into a string. Gets the status value as a string. toStatus toFlag Converts a string or data value into a data status value. Converts a character to a flag. toChType Converts a character to a channel type. Operator operator= Executes substitution.
7.4 Details of the DARWIN Class Member Functions (Alphabetical Order) CDAQDARWINChInfo::CDAQDARWINChInfo Syntax CDAQDARWINChInfo(DarwinChInfo * pDarwinChInfo = NULL); CDAQDARWINChInfo(int chType, int chNo, int point, const char * strUnit, int iStatus = DAQDARWIN_DATA_UNKNOWN); virtual ~CDAQDARWINChInfo(void); Parameters pDarwinChInfo chType Specify the channel information data using a structure. Specify the channel type. chNo point Specify the channel number. Specify the decimal point position.
7.4 Details of the DARWIN Class CDAQDARWINChInfo::getChStatus Syntax int getChStatus(void); Description Gets the value of the channel status field from the data member. Return value Returns the channel status. CDAQDARWINChInfo::getDarwinChInfo Syntax void getDarwinChInfo(DarwinChInfo * pDarwinChInfo); Parameters pDarwinChInfo be returned. Specify the destination where the channel information data is to Description Gets the data in a structure.
7.4 Details of the DARWIN Class CDAQDARWINChInfo::initDarwinChInfo Syntax static void initDarwinChInfo(DarwinChInfo * pDarwinChInfo); Parameters pDarwinChInfo Specify the channel information data field. Description Initializes the specified field. The default value as a general rule is 0. CDAQDARWINChInfo::initialize Syntax virtual void initialize(void); Description Initializes the data member. The default value is 0.
7.4 Details of the DARWIN Class CDAQDARWINChInfo::operator= Syntax CDAQDARWINChInfo & operator=(CDAQDARWINChInfo & cDARWINChInfo); Parameters cDARWINChInfo Specify an object for substitution. Description Copies the data member of the specified object. Return value Returns the reference to the object. CDAQDARWINChInfo::setChStatus Syntax void setChStatus(int iStatus); Parameters iStatus Specify the channel status. Description Stores the channel status field of the data member to the specified value.
7.4 Details of the DARWIN Class CDAQDARWINChInfo::setLine Syntax int setLine(const char * strLine, int lenLine, int * pFlag); Parameters strLine Specify the line using a string. lenLine pFlag Specify the byte size of the line. Specify the destination where the flag is to be returned. Description Analyzes the specified line and stores the information in the data member. The line format is the output format of the channel information data. Return value Returns an error number.
7.4 Details of the DARWIN Class CDAQDARWINChInfo::toChName Syntax static int toChName(int chType, int chNo, char * strName, int lenName); Parameters chType Specify the channel type. chNo strName Specify the channel number. Specify the field where the string is to be stored. lenName Specify the byte size of the field where the string is to be stored. Description Creates a channel name from the specified channel type and channel number as a string and stores the string in the specified field.
7.4 Details of the DARWIN Class CDAQDARWINChInfo::toChType Syntax static int toChType(char cType); Parameters cType Specify characters. Description Converts the specified value into a channel type. If outside the range, the value is set to 0. One character of the channel/relay type is converted to the channel type value. Return value Returns the channel type. CDAQDARWINChInfo::toFlag Syntax static int toFlag(char cFlag); Parameters cFlag Specify characters.
7.4 Details of the DARWIN Class CDAQDARWINChInfo::toStatus Syntax static int toStatus(char cStatus); static int toStatus(int value); Parameters cStatus Specify characters. value Specify 2 bytes of the data value as an integer. Description Converts the specified value into a data status value. If a string is specified and is outside the range, the data status value ìUnknown”is returned. If a data value is specified and is outside the range, “Normal” is returned.
7.4 Details of the DARWIN Class CDAQDARWINDataInfo Class CDAQDataInfo CDAQDARWINDataInfo This class is derived from the CDAQDataInfo class. It stores the data in units of channels that is retrieved through the retrieval of the measured data by the talker function. This class consists of the association with the channel information data and the measured data. The stored information varies depending on the code (ASCII or binary) when the measured data of the talker function is retrieved.
7.4 Details of the DARWIN Class Member Data Manipulation getStatus getAlarm Gets the data status. Gets the alarm value. setStatus setAlarm Set the data status. Sets the alarm value. Output Format Manipulation setLine setByte Stores the measured data from the string. Stores the measured data from the byte array. Association getClassDARWINChInfo Gets the association with the channel information data. setClassDARWINChInfo Sets the association with the channel information data.
7.4 Details of the DARWIN Class Private Members None Member Functions (Alphabetical Order) CDAQDARWINDataInfo::CDAQDARWINDataInfo Syntax CDAQDARWINDataInfo(DarwinDataInfo * pDarwinDataInfo = NULL, CDAQDARWINChInfo * pcDARWINChInfo = NULL); virtual ~CDAQDARWINDataInfo(void); Parameters pDarwinDataInfo pcDARWINChInfo Specify the measured data. Specify the association with the channel information data. Description Constructs or destructs an object.
7.4 Details of the DARWIN Class CDAQDARWINDataInfo::getAlarmName Syntax static const char * getAlarmName(int iAlarmType); Parameters iAlarmType Specify the alarm type. Description Gets the string corresponding to the specified alarm type. If outside the range, the string is set the same as no alarm. The string is aligned to the left. The string is padded with spaces. Return value Returns a pointer to the string.
7.4 Details of the DARWIN Class CDAQDARWINDataInfo::getMaxLenAlarmName Syntax static int getMaxLenAlarmName(void); Description Gets the maximum length of the alarm type string. The return value does not include the terminator. Return value Returns the maximum length of the string in numbers of bytes. CDAQDARWINDataInfo::getStatus Syntax int getStatus(void); Description Gets the data status field from the data member. Return value Returns the data status.
7.4 Details of the DARWIN Class CDAQDARWINDataInfo::isObject Syntax virtual int isObject(const char * classname = “CDAQDARWINDataInfo”; Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited. If parameters are omitted, checks whether it is this class. Classes that inherit this class must be overridden in order to check their own classes. Returns true (valid) if the class was inherited. Otherwise, returns false (invalid).
7.4 Details of the DARWIN Class CDAQDARWINDataInfo::setByte Syntax int setByte(const unsigned char pByte[], int numByte); Parameters pByte Specify the head pointer of the byte array. numByte Specify the byte size of the byte array. Description Analyzes the specified byte array and stores the information in the data member. The byte array type is the output format of the measured data in binary code.
7.4 Details of the DARWIN Class CDAQDARWINDataInfo::setLine Syntax int setLine(const char * strLine, int lenLine, int * pFlag); Parameters strLine Specify the line using a string. lenLine pFlag Specify the byte size of the line. Specify the destination where the flag is to be returned. Description Analyzes the specified line and stores the information in the data member. The line format is the output format of the measured data in ASCII code.
7.4 Details of the DARWIN Class CDAQDARWINDateTime Class CDAQDateTime CDAQDARWINDateTime This class is derived from the CDAQDateTime class. Class for storing time information data of the DARWIN series. It is a wrapper class of the DarwinDateTime structure. Stores the time information data that is retrieved when the measured data through the talker function is retrieved. When storing the measured data through the talker function, the following member functions corresponding to the code are used.
7.4 Details of the DARWIN Class Output Format Manipulation setLine setByte Stores the time information data from the string. Stores the time information data from the byte array. Utilities toString Converts the time information data into a string. Operator operator= Executes substitution. Overridden Members Member Data Manipulation initialize setNow Initializes the data member. Sets the current date/time. Utilities iisObject Checks an object.
7.4 Details of the DARWIN Class Member Functions (Alphabetical Order) CDAQDARWINDateTime::CDAQDARWINDateTime Syntax CDAQDARWINDateTime(DarwinDateTime * pDarwinDateTime = NULL); CDAQDARWINDateTime(int iYaer, int iMonth, int iDay, int iHour = 0, int iMinute = 0, int iSecond = 0); virtual ~CDAQDARWINDateTime(void); Parameters pDarwinDateTime iYaer Specify the time information data. Specify the last two digits of the year. iMonth iDay Specify the month. Specify the day. iHour iMinute Specify the hours.
7.4 Details of the DARWIN Class CDAQDARWINDateTime::getFullYear Syntax int getFullYear(void); Description Gets the year from the data member. Corrects the last 2 digits and returns a 4 digit value. Return value Returns the year. Reference getYear CDAQDARWINDateTime::getHour Syntax int getHour(void); Description Gets the hours from the data member. Return value Returns the hours. CDAQDARWINDateTime::getMinute Syntax int getMinute(void); Description Gets the minutes from the data member.
7.4 Details of the DARWIN Class CDAQDARWINDateTime::getSecond Syntax int getSecond(void); Description Gets the seconds from the data member. Return value Returns the seconds. CDAQDARWINDateTime::getYear Syntax int getYear(void); Description Gets the year from the data member. Returns the last two digits. Return value Returns the year.
7.4 Details of the DARWIN Class CDAQDARWINDateTime::isObject Syntax virtual int isObject(const char * classname = “CDAQDARWINDateTime”; Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited. If parameters are omitted, checks whether it is this class. Classes that inherit this class must be overridden in order to check their own classes. Returns true (valid) if the class was inherited. Otherwise, returns false (invalid).
7.4 Details of the DARWIN Class CDAQDARWINDateTime::setByte Syntax int setByte(const unsigned char pByte[], int numByte); Parameters pByte numByte Specify the head pointer of the byte array. Specify the byte size of the byte array. Description Analyzes the specified byte array and stores the information in the data member. The format in byte array is the date/time section of the output format of the measured data in binary code.
7.4 Details of the DARWIN Class CDAQDARWINDateTime::setLine Syntax int setLine(const char * strLine, int lenLine); Parameters strLine Specify the line using a string. lenLine Specify the byte size of the line. Description Analyzes the specified line and stores the information in the data member. The line format is the first two lines of the output format of the measured data in ASCII code. Specify the date and time in separate lines. If the front of the line is D, it is interpreted as YYMMDD format.
7.4 Details of the DARWIN Class CDAQDARWINDateTime::toString Syntax int toString(char * strDateTime, int lenDateTime); Parameters strDateTime lenDateTime Specify the field where the string is to be stored. Specify the byte size of the field where the string is to be stored. Description Converts the time information data from the data member into a string and stores to the specified field. The format is YY/MM/DD,hh:mm:ss. This is the parameter of the SD command of the DARWIN communication function..
7.4 Details of the DARWIN Class CDAQDARWINSysInfo Class This class stores the system configuration data and the scan interval of the DARWIN series. It is a wrapper class of the DarwinSystemInfo structure. Stores the data that is retrieved when the system configuration data through the talker function is retrieved. This class can be used as an interface for retrieving system configuration data when retrieving system configuration data.
7.4 Details of the DARWIN Class Member Access getDarwinUnitInfo getDarwinModuleInfo Gets the unit information structure. Gets the module information structure. Private Members None Member Functions (Alphabetical Order) CDAQDARWINSysInfo::CDAQDARWINSysInfo Syntax CDAQDARWINSysInfo(double interval = 0.0, DarwinSystemInfo * pDarwinSystemInfo = NULL); virtual ~CDAQDARWINSysInfo(void); Parameters interval Specify the scan interval. pDarwinSystemInfo Specify the system configuration data.
7.4 Details of the DARWIN Class CDAQDARWINSysInfo::getDarwinSystemInfo Syntax void getDarwinSystemInfo(DarwinSystemInfo * pDarwinSystemInfo); Parameters pDarwinSystemInfo Specify the destination where the system configuration data is to be returned. Description Gets the data in a structure. Stores the contents of the data member in the specified structure. CDAQDARWINSysInfo::getDarwinUnitInfo Syntax DarwinUnitInfo * getDarwinUnitInfo(int unitNo); Parameters unitNo Specify the unit number.
7.4 Details of the DARWIN Class CDAQDARWINSysInfo::getModuleCode Syntax int getModuleCode(int unitNo, int slotNo); Parameters unitNo Specify the unit number. slotNo Specify the slot number. Description Gets the structure of the specified module internal code structure from the System configuration data field of the data member. Returns 0 if it does not exist. Return value Returns the internal code.
7.4 Details of the DARWIN Class CDAQDARWINSysInfo::initialize Syntax voidinitialize(void); Description Initializes the data member. The default value as a general rule is 0. The scan interval field is not initialized. Reference initDarwinSystemInfo CDAQDARWINSysInfo::isExist Syntax int isExist(int unitNo); Parameters unitNo Specify the unit number. Description Checks the validity of the specified unit. If it does not exist, returns Invalid value. Return value Returns a boolean value.
7.4 Details of the DARWIN Class CDAQDARWINSysInfo::operator= Syntax CDAQDARWINSysInfo & operator=(CDAQDARWINSysInfo & cDARWINSysInfo); Parameters cDARWINSysInfo Specify an object for substitution. Description Copies the data member of the specified object. Return value Returns the reference to the object. CDAQDARWINSysInfo::setDarwinSystemInfo Syntax void setDarwinSystemInfo(DarwinSystemInfo * pDarwinSystemInfo); Parameters pDarwinSystemInfo Specify the system configuration data.
7.4 Details of the DARWIN Class CDAQDARWINSysInfo::setLine Syntax int setLine(const char * strLine, int lenLine, int * pFlag); Parameters strLine Specify the line using a string. lenLine pFlag Specify the byte size of the line. Specify the destination where the flag is to be returned. Description Analyzes the specified line and stores the information in the data member. The line format is the output format of the system configuration data.
Chapter 8 DARWIN - Visual C - 8.1 Functions and Their Functionalities - DARWIN/ Visual C This section indicates the correspondence between the functionalities that the API supports and the C functions. Note This API provides a portion of the functions common to the DARWIN series instruments. Model-specific functions, setup functions of the setup mode, and A/D calibration functions are not implemented. The functions can be added by using the commands of the DARWIN communication function.
8.1 Functions and Their Functionalities - DARWIN/Visual C - Control Functions Functionality Switch the setting mode. System reconfiguration RAM clear (Initialize the operation mode setup parameter.
8.1 Functions and Their Functionalities - DARWIN/Visual C - Data Retrieval Functions Function Get system configuration data. Declare the retrieval of the channel information data. Get channel information data. Declare the retrieval of the measured data (ASCII code). Get the measured data (ASCII code). Declare the retrieval of the measured data (binary code). Get the measured data (binary code). Declare the retrieval of the setup data (operation mode). Get the setup data (operation mode).
8.2 Programming - DARWIN/Visual C - Adding the Path to the Include File Add the path of the include file (DAQDARWIN.h) to the project. The method of adding the include file varies depending on the environment used. Declaration in the Source File Write the declaration in the source file. #include "DAQDARWIN.h" Note The include file of the common section (DAQHandler.h) is referenced from the include file described above. Thus, declaration for it is not necessary.
8.2 Programming - DARWIN/Visual C - Retrieval of the Measured Data Program Example 1 This program retrieves measured data. IM MX190-01E 8-5 8 DARWIN - Visual C - ////////////////////////////////////////////////////////////// // DARWIN sample for measurement #include #include "DAQDARWIN.
8.2 Programming - DARWIN/Visual C - Description Overview When retrieving data, the talker is executed first, and then data retrieval is executed in units of channels or lines. The end is determined by the flag. Include File Statement #include "DAQDARWIN.h" Load Library Statement The load library statement is from #ifdef WIN32 to #endif //WIN32.A callback type (such as DLLOPENDARWIN) is used. Flow of the Process The flow chart shown below omits the declaration section.
8.2 Programming - DARWIN/Visual C - Communication Connection openDARWIN("192.168.1.11", &rc) The IP address of the DARWIN is specified. The communication report specifies the communication constant DAQDARWIN report number.” Talker talkDataByBinaryDARWIN(comm, 0, 1, 0, 2, &datetime) Sends the retrieval request of the measured data of channels 1 and 2 of subunit number 0 and retrieves the time information (declares the retrieval of the measured data).
8.2 Programming - DARWIN/Visual C - Retrieval of Setup Data and Configuration Program Example 2 This program executes the following two items. This program contains both items, but each item can be written and executed separately. • Retrieval of setup data • Setting a DC voltage range to the channel ////////////////////////////////////////////////////////////// // DARWIN sample for configuration #include #include "DAQDARWIN.
8.
8.2 Programming - DARWIN/Visual C - Implementing Function Commands Program Example 3 This program switches the DARWIN to the operation mode. The program uses the DS command of the DARWIN communication function. ////////////////////////////////////////////////////////////// // DARWIN sample for command #include #include "DAQDARWIN.
8.2 Programming - DARWIN/Visual C - Description Creating the Message sprintf(line, "DS%d" DAQDARWIN_MODE_OPE) Stores the DS0 (switch to operation mode) command message of the DARWIN communication function in the line array. The constant “operation mode”is used to specify operation mode. Sending Messages runCommandDARWIN(comm, line) Sends the command message and receives the response. The number of bytes of the message is not specified (omitted). This member adds a terminator to the message and sends it.
8.2 Programming - DARWIN/Visual C - Implementing the Talker Function Program Example 4 This program retrieves the system configuration data. The program executes the TS and CF commands of the DARWIN communication function. ////////////////////////////////////////////////////////////// // DARWIN sample for talker #include #include "DAQDARWIN.
8.2 Programming - DARWIN/Visual C - //disconnect rc = closeDARWIN(comm); #ifdef WIN32 FreeLibrary(pDll); #endif return rc; } ////////////////////////////////////////////////////////////// Description Load Library Statement The load library statement is from #ifdef WIN32 to #endif //WIN32.A callback type (such as DLLOPENDARWIN) is used.
8.2 Programming - DARWIN/Visual C - Error Processing • Most functions return the result of the function process using an error number. • The function getErrorMessageDARWIN can be used to get the error message string corresponding to the error number. A function for retrieving the maximum length of the error message string is also available.
Chapter 9 DARWIN - Visual Basic - 9.1 Functions and Their Functionalities - DARWIN/ Visual Basic This section indicates the correspondence between the functionalities that the API supports and the Visual Basic functions. Note This API provides a portion of the functions common to the DARWIN series instruments. Model-specific functions, setup functions of the setup mode, and A/D calibration functions are not implemented.
9.1 Functions and Their Functionalities - DARWIN/Visual Basic - Control Functions Function Switch the setting mode. System reconfiguration RAM clear (Initialize the operation mode setup parameter.
9.1 Functions and Their Functionalities - DARWIN/Visual Basic - Data Retrieval Functions Function Get system configuration data. Declare the retrieval of the channel information data. Get channel information data. Declare the retrieval of the measured data (ASCII code). Get the measured data (ASCII code). Declare the retrieval of the measured data (binary code). Get the measured data (binary code). Declare the retrieval of the setup data (operation mode). Get the setup data (operation mode).
9.2 Programming - DARWIN/Visual Basic - Declaration of Types, Functions, and Constants To use types, functions, and constants for Visual Basic, they must be declared in advance. The following methods of declaration statements are available. Statement of All Declarations Adding the standard module library file for Visual Basic (DAQDARWIN.bas) to the project is equivalent to declaring all types, functions, and constants.
9.2 Programming - DARWIN/Visual Basic - Retrieval of the Measured Data Program Example 1 This program retrieves measured data. Public Function Main() Dim datetime As DarwinDateTime Dim chinfo As DarwinChInfo Dim datainfo As DarwinDataInfo 'connect host = "192.168.1.
9.2 Programming - DARWIN/Visual Basic - Communication Process First, make a connection. After making the connection, the functions become available. As a termination procedure, disconnect the communication. Communication Connection openDARWIN(host, rc) The IP address of the DARWIN is specified. The communication report specifies the communication constant “DAQDARWIN report number.
9.2 Programming - DARWIN/Visual Basic - Retrieval of Setup Data and Configuration Program Example 2 This program executes the following two items. This program contains both items, but each item can be written and executed separately. • Retrieval of setup data • Setting a DC voltage range to the channel Public Function Main() Dim line As String * 256 'connect host = "192.168.1.
9.2 Programming - DARWIN/Visual Basic - Implementing Function Commands Program Example 3 This program switches DARWIN to the operation mode. The program uses the DS command of DARWIN communication function. Public Function Main() 'connect host = "192.168.1.11" comm = openDARWIN(host, rc) 'run Line = "DS0"rc = runCommandDARWIN(comm, Line) 'disconnect rc = closeDARWIN(comm) End Function Description Sending Messages runCommandDARWIN(comm, line) Sends the command message and receives the response.
9.2 Programming - DARWIN/Visual Basic - Implementing the Talker Function Program Example 4 This program retrieves the system configuration data. The program executes the TS and CF commands of the DARWIN communication function. Public Function Main() Dim lenLine As Long Dim line As String * 256 'connect host = "192.168.1.
9.2 Programming - DARWIN/Visual Basic - Error Processing • Most functions return the result of the function process using an error number. • The function toErrorMessageDARWIN can be used to get the error message string corresponding to the error number. A function for retrieving the maximum length of the error message string is also available.
Chapter 10 Functions for the DARWIN - Visual C/Visual Basic - 10.1 Details of Functions - DARWIN (Visual C/Visual Basic) This section describes the DARWIN functions that are used in C and Visual Basic. The functions are listed in alphabetical order by the function name. For details on constants and types, see chapter 11. For DARWIN terminology, see appendix 2. Most functions return an error number as a return value. Error number 0 is returned if there is no error.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - closeDARWIN Syntax int closeDARWIN(DAQDARWIN daqdarwin); Declaration Public Declare Function closeDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long) As Long Parameters daqdarwin Specify the device descriptor. Description Disconnects the communication using the specified device descriptor. • When the communication is disconnected, the value of the device descriptor is meaningless.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - computeDARWIN Syntax int computeDARWIN(DAQDARWIN daqdarwin, int iCompute); Declaration Public Declare Function computeDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal iCompute As Long) As Long Parameters daqdarwin Specify the device descriptor. iCompute Specify the computation. Description Starts/stops computation. • Valid with the computation function. • This function executes the EX command of the DARWIN communication function.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - establishDARWIN Syntax int establishDARWIN(DAQDARWIN daqdarwin, int iSetup); Declaration Public Declare Function establishDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal iSetup As Long) As Long Parameters daqdarwin Specify the device descriptor. iSetup Specifies establishment of setup. Description Establishes setting contents for setup mode. • It is only valid in setup mode.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - getAlarmNameDARWIN [Visual C only] Syntax const char * getAlarmNameDARWIN(int iAlarmType); Parameters iAlarmType Specify the alarm type. Description Gets the string corresponding to the specified alarm type. • In Visual Basic, use the toAlarmNameDARWIN function. Return value Returns a pointer to the alarm type string.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - getChDataByASCIIDARWIN Syntax int getChDataByASCIIDARWIN(DAQDARWIN daqdarwin, DarwinChInfo * pDarwinChInfo, DarwinDataInfo * pDarwinDataInfo, int * pFlag); Declaration Public Declare Function getChDataByASCIIDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByRef pDarwinChInfo As DarwinChInfo, ByRef pDarwinDataInfo As DarwinDataInfo, ByRef pFlag As Long) As Long Parameters daqdarwin Specify the device descriptor.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - getChDataByBinaryDARWIN Syntax int getChDataByBinaryDARWIN(DAQDARWIN daqdarwin, DarwinChInfo * pDarwinChInfo, DarwinDataInfo * pDarwinDataInfo, int * pFlag); Declaration Public Declare Function getChDataByBinaryDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByRef pDarwinChInfo As DarwinChInfo, ByRef pDarwinDataInfo As DarwinDataInfo, ByRef pFlag As Long) As Long Parameters daqdarwin Specify the device descriptor.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - getChInfoDARWIN Syntax int getChInfoDARWIN(DAQDARWIN daqdarwin, DarwinChInfo * pDarwinChInfo, int * pFlag); Declaration Public Declare Function getChInfoDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByRef pDarwinChInfo As DarwinChInfo, ByRef pFlag As Long) As Long Parameters daqdarwin Specify the device descriptor. pDarwinChInfo Specify the destination where the channel information data is to be returned.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - getErrorMessageDARWIN [Visual C only] Syntax const char * getErrorMessageDARWIN(int errCode); Parameters errCode Specify the error number. Description Gets the error message string corresponding to the error number. • In Visual Basic, use the function toErrorMessageDARWIN. Return value Returns the pointer to the error message string corresponding to the error number.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - getMaxLenAlarmNameDARWIN Syntax int getMaxLenAlarmNameDARWIN(void); Declaration Public Declare Function getMaxLenAlarmNameDARWIN Lib "DAQDARWIN"() As Long Description Gets the maximum length of the alarm type string. • The return value does not include the terminator. Return value Returns the length of the string.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - getMaxLenErrorMessageDARWIN Syntax int getMaxLenErrorMessageDARWIN(void); Declaration Public Declare Function getMaxLenErrorMessageDARWIN Lib "DAQDARWIN"() As Long Description Gets the maximum length of the error message string. • The return value does not include the terminator. Return value Returns the length of the string.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - getReportStatusDARWIN Syntax int getReportStatusDARWIN(DAQDARWIN daqdarwin, int * pReportStatus); Declaration Public Declare Function getReportStatusDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByRef pReportStatus As Long) As Long Parameters daqdarwin Specify the device descriptor. pReportStatus Specify the destination where the report status is to be returned. Description Gets the report status.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - getRevisionAPIDARWIN Syntax const int getRevisionAPIDARWIN(void); Declaration Public Declare Function getRevisionAPIDARWIN Lib "DAQDARWIN"() As Long Description Gets the revision number of this API. Return value Returns the revision number.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - getSetDataByLineDARWIN Syntax int getSetDataByLineDARWIN(DAQDARWIN daqdarwin, char * strLine, int maxLine, int * lenLine, int * pFlag); Declaration Public Declare Function getSetDataByLineDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal strLine As String, ByVal maxLine As Long, ByRef lenLine As Long, ByRef flag As Long) As Long Parameters daqdarwin Specify the device descriptor.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - getStatusByteDARWIN Syntax int getStatusByteDARWIN(DAQDARWIN daqdarwin, int * pStatusByte); Declaration Public Declare Function getStatusByteDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByRef pStatusByte As Long) As Long Parameters daqdarwin Specify the device descriptor. pStatusByte Specify the destination where the status byte is to be returned. Description Sends the status byte output command (ESC S) and receives the status bytes.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - getSystemConfigDARWIN Syntax int getSystemConfigDARWIN(DAQDARWIN daqdarwin, double * interval, DarwinSystemInfo * pDarwinSystemInfo); Declaration Public Declare Function getSystemConfigDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByRef interval As Double, ByRef pDarwinSystemInfo As DarwinSystemInfo) As Long Parameters daqdarwin Specify the device descriptor.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - getVersionAPIDARWIN Syntax const int getVersionAPIDARWIN(void); Declaration Public Declare Function getVersionAPIDARWIN Lib "DAQDARWIN"() As Long Description Gets the version number of this API. Return value Returns the version number.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - initSystemDARWIN Syntax int initSystemDARWIN(DAQDARWIN daqdarwin, int iCtrl); Declaration Public Declare Function initSystemDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal iCtrl As Long) As Long Parameters daqdarwin Specify the device descriptor. iCtrl Specify the system control type. Description Executes the operation of the specified system control type.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - openDARWIN Syntax DAQDARWIN openDARWIN(const char * strAddress, int * errorCode); Declaration Public Declare Function openDARWIN Lib "DAQDARWIN"(ByVal strAddress As String, ByRef errorCode As Long) As Long Parameters strAddress Specify the IP address as a string. errorCode Specify the destination where the error number is to be returned. Description Connects to the device with the IP address specified by the parameters.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - receiveByteDARWIN Syntax int receiveByteDARWIN(DAQDARWIN daqdarwin, unsigned char * byteData, int maxData, int * lenData) Declaration Public Declare Function receiveByteDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByRef byteData() As Byte, ByVal maxData As Long, ByRef lenData As Long) As Long Parameters daqdarwin Specify the device descriptor. byteData maxData Specify the field where the received byte data is to be stored.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - receiveLineDARWIN Syntax int receiveLineDARWIN(DAQDARWIN daqdarwin, char * strLine, int maxLine, int * lenLine); Declaration Public Declare Function receiveLineDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal strLine As String, ByVal maxLine As Long, ByRef lenLine As Long) As Long Parameters daqdarwin Specify the device descriptor. strLine maxLine Specify the field where the received string is to be stored.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - reportingDARWIN Syntax int reportingDARWIN(DAQDARWIN daqdarwin, int iReportRun); Declaration Public Declare Function reportingDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal iReportRun As Long) As Long Parameters daqdarwin Specify the device descriptor. iReportRun Specify the report execution type. Description Starts/stops reporting. • Valid with the report option.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - runCommandDARWIN Syntax int runCommandDARWIN(DAQDARWIN daqdarwin, const char * strCmd); Declaration Public Declare Function runCommandDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal strCmd As String) As Long Parameters daqdarwin Specify the device descriptor. strCmd Specify the command message to be sent. Description Sends the specified command message and terminator and receives the response.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - sendLineDARWIN Syntax int sendLineDARWIN(DAQDARWIN daqdarwin, const char * strLine); Declaration Public Declare Function sendLineDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal strLine As String) As Long Parameters daqdarwin Specify the device descriptor. strLine Specify the string to be sent. Description Sends the string data specified by the parameter. • When sending the command, the terminator is also part of the data.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - sendTriggerDARWIN Syntax int sendTriggerDARWIN(DAQDARWIN daqdarwin); Declaration Public Declare Function sendTriggerDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long) As Long Parameters daqdarwin Specify the device descriptor. Description Sends a trigger command (ESC T), and receives the response. Return value Returns an error number. Error: Not descriptor No device descriptor.
10.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - setDateTimeDARWIN Syntax int setDateTimeDARWIN(DAQDARWIN daqdarwin, DarwinDateTime * pDarwinDateTime); Declaration Public Declare Function setDateTimeDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByRef pDarwinDateTime As DarwinDateTime) As Long Parameters daqdarwin Specify the device descriptor. pDarwinDateTime Specify the time information data. Description Sets the date and time on the device.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - setDateTimeNowDARWIN Syntax int setDateTimeNowDARWIN(DAQDARWIN daqdarwin); Declaration Public Declare Function setDateTimeNowDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long) As Long Parameters daqdarwin Specify the device descriptor. Description Sets the current date/time. Return value Returns an error number.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - setDELTADARWIN Syntax int setDELTADARWIN(DAQDARWIN daqdarwin, int refChNo, int chType, int startChNo, int endChNo, int spanMin, int spanMax); Declaration Public Declare Function setDELTADARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal refChNo As Long, ByVal chType As Long, ByVal startChNo As Long, ByVal endChNo As Long, ByVal spanMin As Long, ByVal spanMax As Long) As Long Parameters daqdarwin Specify the device descriptor.
10.
10.
10.
10.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - setRRJCDARWIN Syntax int setRRJCDARWIN(DAQDARWIN daqdarwin, int refChNo, int chType, int startChNo, int endChNo, int spanMin, int spanMax); Declaration Public Declare Function setRRJCDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal refChNo As Long, ByVal chType As Long, ByVal startChNo As Long, ByVal endChNo As Long, ByVal spanMin As Long, ByVal spanMax As Long) As Long Parameters daqdarwin Specify the device descriptor.
10.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - setScallingUnitDARWIN Syntax int setScallingUnitDARWIN(DAQDARWIN daqdarwin, const char * strUnit, int chType, int startChNo, int endChNo); Declaration Public Declare Function setScallingUnitDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal strUnit As String, ByVal chType As Long, ByVal startChNo As Long, ByVal endChNo As Long) As Long 111 Parameters daqdarwin Specify the device descriptor.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - setSKIPDARWIN Syntax int setSKIPDARWIN(DAQDARWIN daqdarwin, int chType, int startChNo, int endChNo); Declaration Public Declare Function setSKIPDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal chType As Long, ByVal startChNo As Long, ByVal endChNo As Long) As Long Parameters daqdarwin Specify the device descriptor. chType startChNo Specify the channel type. Specify the start channel number. endChNo Specify the end channel number.
10.
10.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - setTimeOutDARWIN Syntax int setTimeOutDARWIN(DAQDARWIN daqdarwin, int seconds); Declaration Public Declare Function setTimeOutDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal seconds As Long) As Long Parameters daqdarwin Specify the device descriptor. seconds Specify the communication timeout value in units of seconds. Description Sets a timeout for the communication with the device.
10.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - talkCalibrationDataDARWIN Syntax int talkCalibrationDataDARWIN(DAQDARWIN daqdarwin, int startChType, int startChNo, int endChType, int endChNo); Declaration Public Declare Function talkCalibrationDataDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal startChType As Long, ByVal startChNo As Long, ByVal endChType As Long, ByVal endChNo As Long) As Long Parameters daqdarwin Specify the device descriptor.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - talkChInfoDARWIN Syntax int talkChInfoDARWIN(DAQDARWIN daqdarwin, int startChType, int startChNo, int endChType, int endChNo); Declaration Public Declare Function talkChInfoDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal startChType As Long, ByVal startChNo As Long, ByVal endChType As Long, ByVal endChNo As Long) As Long Parameters daqdarwin Specify the device descriptor. startChType startChNo Specify the start channel type.
10.
10.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - talkOperationDataDARWIN Syntax int talkOperationDataDARWIN(DAQDARWIN daqdarwin, int startChType, int startChNo, int endChType, int endChNo); Declaration Public Declare Function talkOperationDataDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal startChType As Long, ByVal startChNo As Long, ByVal endChType As Long, ByVal endChNo As Long) As Long Parameters daqdarwin Specify the device descriptor.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - talkSetupDataDARWIN Syntax int talkSetupDataDARWIN(DAQDARWIN daqdarwin, int startChType, int startChNo, int endChType, int endChNo); Declaration Public Declare Function talkSetupDataDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal startChType As Long, ByVal startChNo As Long, ByVal endChType As Long, ByVal endChNo As Long) As Long Parameters daqdarwin Specify the device descriptor. startChType startChNo Specify the start channel type.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - toAlarmNameDARWIN Syntax int toAlarmNameDARWIN(int iAlarmType, char * strAlarm, int lenAlarm); Declaration Public Declare Function toAlarmNameDARWIN Lib "DAQDARWIN"(ByVal iAlarmType As Long, ByVal strAlarm As String, ByVal lenAlarm As Long) As Long Parameters iAlarmType Specify the alarm type. strAlarm lenAlarm Specify the field where the string is to be stored. Specify the byte size of the field where the string is to be stored.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - toDoubleValueDARWIN Syntax double toDoubleValueDARWIN(int dataValue, int point); Declaration Public Declare Function toDoubleValueDARWIN Lib "DAQDARWIN"(ByVal dataValue As Long, ByVal point As Long) As Double Parameters dataValue Specify the data value. point Specify the decimal point position. Description Generates the measured value from the specified data value and decimal point position.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - toErrorMessageDARWIN Syntax int toErrorMessageDARWIN(int errCode, char * errStr, int errLen); Declaration Public Declare Function toErrorMessageDARWIN Lib "DAQDARWIN"(ByVal errCode As Long, ByVal errStr As String, ByVal errLen As Long) As Long Parameters errCode Specify the error number. errStr errLen Specify the field where the string is to be stored. Specify the byte size of the field where the string is to be stored.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - toStringValueDARWIN Syntax int toStringValueDARWIN(int dataValue, int point, char * strValue, int lenValue); Declaration Public Declare Function toStringValueDARWIN Lib "DAQDARWIN"(ByVal dataValue As Long, ByVal point As Long, ByVal strValue As String, ByVal lenValue As Long) As Long Parameters dataValue Specify the data value. point strValue Specify the decimal point position. Specify the field where the string is to be stored.
10.1 Details of Functions - DARWIN (Visual C/Visual Basic) - transModeDARWIN Syntax int transModeDARWIN(DAQDARWIN daqdarwin, int iMode); Declaration Public Declare Function transModeDARWIN Lib "DAQDARWIN"(ByVal daqdarwin As Long, ByVal iMode As Long) As Long Parameters daqdarwin Specify the device descriptor. iMode Specify the mode. Description Switches to the specified mode. • This function executes the DS command of the DARWIN communication function. Return value Returns an error number.
Chapter 11 DARWIN Constants and Types 11.1 Overview of the DARWIN Constants The types of constants provided are listed below. The constants are common to Visual C++, Visual C, and Visual Basic. Description Communication port number of the DARWIN Number of subunits, etc. Maximum length of the channel name string, etc. Terminator string Valid (ON) setting or Invalid (OFF) setting Identifies the last data set when data retrieved Status of the measured data Upper-limit alarm, etc.
11.2 DARWIN Constants This section describes the mnemonic and the meaning of the constants. For DARWIN terminology, see appendix 2. Communication Constants Mnemonic DAQDARWIN_COMMPORT Description Communication port number of DARWIN. Enumeration Constants Sets the number of items such as the number of modules or units. Mnemonic DAQDARWIN_NUMCHANNEL DAQDARWIN_NUMALARM Description The number of channels. The number of alarms. DAQDARWIN_NUMUNIT DAQDARWIN_NUMSLOT DAQDARWIN_NUMTERM The number of subunits.
11.2 DARWIN Constants Flag Status Mnemonic DAQDARWIN_FLAG_OFF DAQDARWIN_FLAG_ENDDATA of lines is at the last data set. Description All OFF. The data line retrieved using ASCII codes or in units Can be synthesized using logical OR operators. Data Status Values Mnemonic DAQDARWIN_UNKNWON DAQDARWIN_DATA_NORMAL DAQDARWIN_DATA_DIFFINPUT Description The data status is not set. Normal. Difference computation between channels being performed. DAQDARWIN_DATA_PLUSOVER Positive overrange.
11.2 DARWIN Constants Channel/Relay types Type values for channels, relays, communication input, and computation constants. Can be used to specify the channel or relay. Definitions consisting of a single character are available also to simplify the statements. Mnemonic DAQDARWIN_CHTYPE_MAINUNIT Char Description Channel I Value representing the main unit expandable model DAQDARWIN_CHTYPE_STANDALONE Value representing the Yes model of the standalone unit. Same as subunit number of 0.
11.2 DARWIN Constants Status Byte Value Can be synthesized using logical OR operators.
11.2 DARWIN Constants Report type Mnemonic DAQDARWIN_REPORT_HOURLY DAQDARWIN_REPORT_DAILY DAQDARWIN_REPORT_MONTHLY DAQDARWIN_REPORT_STATUS Description Hourly Daily Montly Status Report status Can be synthesized using logical OR operators.
11.
11.2 DARWIN Constants Power monitor range Mnemonic DAQDARWIN_RANGE_POWER_25V05A DAQDARWIN_RANGE_POWER_25V5A DAQDARWIN_RANGE_POWER_250V05A DAQDARWIN_RANGE_POWER_250V5A Description 25 V 0.5 A 25 V 5 A 250 V 0.5 A 250 V 5 A Setting range Voltage 25 V, current 0.5 A Voltage 25 V, current 5 A Voltage 250 V, current 0.5 A Voltage 250 V, current 5 A DC current range Mnemonic DAQDARWIN_RANGE_MA_20MA Description 20 mA Setting range –20.000-20.
11.
11.3 Overview of the DARWIN Types The data types below are provided. Type DAQDARWIN DarwinDateTime DarwinChInfo DarwinDataInfo DarwinModuleInfo DarwinUnitInfo DarwinSystemInfo Description Device descriptor type. Time information structure. Channel information data structure. Measured data structure. Module information structure. Unit information structure. System configuration data structure.
11.4 DARWIN Types Explanation on the Description Visual C/Visual C++, and Visual Basic Types Indicates the type in Visual C/Visual C++ and Visual Basic. Types without signs in Visual C/Visual C++ become types with signs in Visual Basic. Number of array elements for Visual C/Visual C++ types is omitted. Retrieval The markings below are used to indicate items that can be retrieved, those that the user can set, and so on.
11.4 DARWIN Types DAQDARWIN Type for storing the device descriptor. Handled as Long type in Visual Basic and int in Visual C.
11.4 DARWIN Types Retrieval Name aChNo aPoint aStatus aChType aUnit Description Channel number Decimal Point Position Channel Status Channel Type Unit Name ASCII R R R R Binary R R - Channel Information R R R R R Channel information data structure. Visual C++: The wrapper class is CDAQDARWINChInfo. Note For functions that retrieve measured data in binary code, the decimal point position and unit information is not retrieved.
11.4 DARWIN Types DarwinUnitInfo DarwinUnitInfo structure Visual C/C++ Type int int DarwinModuleInfo [ ] Name Description Visual Basic Type aExist aUnitNo aModule Valid/Invalid of Reports Unit Number Array of module information of the specified number of slots Long Long (0 To 5) As DarwinModuleInfo Unit information structure.
Chapter 12 MX100 for Extended API - Visual C++ - 12.1 MX100 Class The Extended API consists of the MX100-dedicated classes below. CDAQConfig CDAQMXItemConfig CDAQHandler CDAQMX • CDAQMX100 • CDAQMXDataBuffer • CDAQMXList • CDAQMXAOPWMList • CDAQMXBalanceList • CDAQMXDOList • CDAQMXTransmitList : Class of API. • : Class added by the extended API CDAQMX100 Class A handler class for the main unit. Executes status transitions. CDAQMXAOPWMList Class Class for managing command AO/PWM channel data.
12.1 MX100 Class Notes Memory usage is large since the various kinds of data are stored internally. Performance may suffer since the status is retrieved during status transitions. Also, if memory or disk space is insufficient, data may not be saved correctly. Problems may occur when communications are performed for functions other than status transitions. If access to the MX100 main unit is lost, communications are closed. If you want to keep the connection open, run status data retrieval.
12.1 MX100 Class 12.2 Correspondence between the Functions and Class/Member Functions - MX100 This section indicates the correspondence between the functions that the Extended API supports and the class member functions. There are two types, status transition functions and retrieval functions. Status transition functions control the MX100.
12.
12.1 MX100 Class Setup Change Functions The setup functions send the settings then update the status. These settings are for individual channels. If the settings could not be entered, an error is usually returned. Specification is possible with data values or measured values (Double).
12.
12.
12.
12.1 MX100 Class Retrieval Functions Each data is stored in its class according to type. They are retrieved from the CDAQMX100 class. Measured Data Data Name Data value Data status values Alarm (presence/absence) Measured Double integer value String Time No.
12.
12.1 MX100 Class The data is retrieved from CDAQMX100::getClassMXItemConfig through CDAQMXItemConfig::getClassMXChConfig. The initial balance data is the same as the current data. It is retrieved from CDAQMX100::getClassMXItemConfig through CDAQMXItemConfig::getClassMXBalanceData. The output channel data is retrieved from CDAQMX100::getClassMXItemConfig through CDAQMXItemConfig::getClassMXOutputData.
12.1 MX100 Class Status Data Data Name Unit status value Valid number of FIFOs Backup (presence or absence) FIFO FIFO status value Interval type CF CF status type Size Remaining capacity Status No.
12.1 MX100 Class User Data Data Name DO data AO/PWM data Initial balance data Trans.
12.1 MX100 Class Utilities Function/Data Name No. of remaining data Retrieve by channel Retrieve by FIFO Error Get MX-specific error Get the error message string. Get the maximum length of the error message string. Get the number of the parameter on which an error was detected Change from FIFO information to channel number Get the decimal point position by range type. Meas value Change to double integer Convert into string. Alarm Get the alarm type string. Get the maximum length of the alarm string.
12.3 Programming - MX100/Visual C++ Adding the Path to the Include File Add the path of the include file (DAQMX100.h) to the project. The method of adding the include file varies depending on the environment used. Declaration in the Source File Write the declaration in the source file. #include ìDAQMX100.h” Note The include file of the common section (DAQHandler.h) and the MX100 include file (DAQMX.h) is referenced from the include file described above. Thus, declaration for it is not necessary.
12.3 Programming - MX100/Visual C++ - Retrieval of the Measured Data Program Example ////////////////////////////////////////////////////////////// // MX100 sample for measurement #include #include "DAQMX100.h" ////////////////////////////////////////////////////////////// int main(int argc, char* argv[]) { int rc; //return code CDAQMX100 daqmx100; //class int value; //connect rc = daqmx100.open("192.168.1.12"); //get rc = daqmx100.measStart(); rc = daqmx100.measDataCh(1); value = ((daqmx100.
12.3 Programming - MX100/Visual C++ - Retrieval of Measured Values value = ((daqmx100.getClassMXDataBuffer(1))-> currentDataInfo())->getValue(); Retrieves the measured value of the current status of channel 1 from the field where the measured data by channels are stored through the measured data of the current status. FIFO Stop rc = daqmx100.measStop(); Stops the FIFO. Comm. cut rc = daqmx100.close(); Drops the connection. Reference The sample program is completed by executing measDaraCh only once.
12.3 Programming - MX100/Visual C++ - Retrieval of Setup Data and Configuration Program Example ////////////////////////////////////////////////////////////// // MX100 sample for items #include #include "DAQMX100.h"#include "DAQMXItems.h" ////////////////////////////////////////////////////////////// int main(int argc, char* argv[]) { int rc; //return code CDAQMX100 daqmx100; //class int i; //counter char strItem[BUFSIZ]; int realLen; //connect rc = daqmx100.open("192.168.1.
12.3 Programming - MX100/Visual C++ - Communication Connection rc = daqmx100.open("192.168.1.12"); The IP address of the MX100 is specified. This statement implicitly specifies the communication constant DAQMX_COMMPORT (communication port number of the MX100). Getting the Setup Data Collectively rc = daqmx100.getItemAll(); Gets all items of the MX100 setup data collectively and stores in the setup data field. Retrieval of the Setup Data by Item realLen = (daqmx100.getClassMXItemConfig()).
12.4 Details of the MX100 Class Classes are listed in alphabetical order by the class name. CDAQMX100 Class This class is a CDAQMX derived class. This class communicates with the MX100, and stores the retrieved data. It supports status transition functions. In general, after a function is executed, the status is updated and saved. For setup functions, after each setting is executed the settings are received again and the status is updated.
12.4 Details of the MX100 Class Control Functions switchBackup reconstruct Switches backup. Reconfigures the system. initSetValue ackAlarm Initializes the system. Resets alarms. displaySegment sendConfig Displays the 7-segment LED. Sends the setup data collectively. initBalance clearBalance Executes initial balancing. Initializes the initial balance value. Setup Functions Sets the range. setChDELTA setChRRJC Sets difference computation between channels. Sets remote RJC.
12.4 Details of the MX100 Class Data Update Functions updateStatus updateSystem Updates status data. Updates the system configuration data. updateConfig updateDOData Updates the setup data. Updates the current DO data. updateAOPWMData updateBalance Updates the current AO/PWM data. Updates the current initial balance data. updateOutput updateInfoCh Updates the current output channel data. Updates the channel information data. Data Retrieval Functions measDataCh Gets FIFO values by channel.
12.4 Details of the MX100 Class Utilities initDataCh initDataFIFO Initializes the stored data of the specified channel. Initializes the stored data of the specified FIFO. getDataNum toChNo Gets the remaining number of data. Gets the channel number. • Overridden Members Communication Functions open Establishes connection. Control Functions setDateTime Sets the time information. formatCF Formats the CF card. Utilities isObject Checks an object. • Inherited Members See CDAQHandler.
12.4 Details of the MX100 Class Member Data Manipulation measClear Initializes the data member for retrieval of the measured data. userClear Initializes the data member of the management field. Data Update Functions updateAll Updates all status and information data. updateRenew Updates the status. Data Retrieval Functions getDataCh getDataFIFO Gets the FIFO values by channel. Gets FIFO values by FIFO. getInstCh getInstFIFO Gets instantaneous values by channel. Gets instantaneous values by FIFO.
12.4 Details of the MX100 Class Member Functions (Alphabetical Order) CDAQMX100::ackAlarm Syntax int ackAlarm(void); Description Resets alarms. Updates the status if successful. Return value Returns an error number. Reference initSystem updateRenew CDAQMX100::CDAQMX100 Syntax CDAQMX100(void); CDAQMX100(const char * strAddress, unsigned int uiPort = DAQMX_COMMPORT, int * errCode = NULL); virtual ~CDAQMX100(void); Parameters strAddress Specify the IP address as a string.
12.4 Details of the MX100 Class CDAQMX100::changeAOPWMValue Syntax void changeAOPWMValue(int idAOPWM, int aopwmNo, int bValid, double realValue); Parameters idAOPWM Specify the AO/PWM data identifier. aopwmNo bValid Specify the AO/PWM data number. Specify valid/invalid using a Boolean value. realValue Specify the actual output value. Description Changes the AO/PWM data of the specified AO/PWM data identifier. Converts the specified actual output values to output data values and stores them.
12.4 Details of the MX100 Class CDAQMX100::commandAOPWM Syntax int commandAOPWM(int idAOPWM); int commandAOPWM(CDAQMXAOPWMData & cMXAOPWMData); Parameters idAOPWM Specify the AO/PWM data identifier. cMXAOPWMData Specify AO/PWM data. Description Sends the specified AO/PWM data. Updates the status if successful. Return value Returns an error number. Error: Not Data There is no data.
12.4 Details of the MX100 Class CDAQMX100::commandTransmit Syntax int commandTransmit(int idTrans); int commandTransmit(CDAQMXTransmit & cMXTransmit); Parameters idTrans Specify the transmission output data identifier. cMXTransmit Specify the transmission output data. Description Sends the specified transmission output data. Updates the status if successful. Return value Returns an error number. Error: Not Data There is no data.
12.4 Details of the MX100 Class CDAQMX100::displaySegment Syntax int displaySegment(int dispPattern0, int dispPattern1, int dispType, int dispTime); Parameters dispPattern0 Specify the display pattern of segment number 0. dispPattern1 dispType Specify the display pattern of segment number 1. Specify the display format. dispTime Specify the display time. Description Sets the display of the 7-segment LED. Returns the display pattern prior to setting. Updates the status if successful.
12.4 Details of the MX100 Class CDAQMX100::getClassMXAOPWMList Syntax CDAQMXAOPWMList & getClassMXAOPWMList(void); Description Gets the object of the AO/PWM data management field from the data member. Return value Returns a reference to the object. CDAQMX100::getClassMXBalanceList Syntax CDAQMXBalanceList & getClassMXBalanceList(void); Description Gets the object of the initial balance data management field from the data member. Return value Returns a reference to the object.
12.4 Details of the MX100 Class CDAQMX100::getClassMXItemConfig Syntax CDAQMXItemConfig & getClassMXItemConfig(void); Description Gets the object of the setup data field from the data member. Return value Returns a reference to the object. CDAQMX100::getClassMXTransmitList Syntax CDAQMXTransmitList & getClassMXTransmitList(void); Description Gets the object of the transmission output data management field from the data member. Return value Returns a reference to the object.
12.4 Details of the MX100 Class CDAQMX100::getDataFIFO Syntax int getDataFIFO(int fifoNo, int * bComm); Parameters fifoNo Specify the FIFO number. bComm not occur. Specify the return destination where the communication will or will Description Retrieves the measured data of the specified FIFO number. Increments the current index of various kinds of information for each channel of the data member. When no stored data exists, communication is opened and new data is retrieved.
12.4 Details of the MX100 Class CDAQMX100::getInstCh Syntax int getInstCh(int chNo); Parameters chNo Specify the channel number. Description Receives the measured data of the specified channel number. Gets instantaneous values by channel, and stores them in the data member. Return value Returns an error number. Error: Not Data Various kinds of information fields for each channel do not exist.
12.4 Details of the MX100 Class CDAQMX100::getItemAll Syntax int getItemAll(void); Description Receives setup data and stores it in the data member. Updates the status and all information data if successful. Return value Returns an error number. Reference getClassMXItemConfig getConfig updateAll CDAQMX100::getRevisionMX100DLL Syntax static const int getRevisionMX100DLL(void); Description Gets the revision number of this DLL. Return value Returns the revision number of this DLL.
12.4 Details of the MX100 Class CDAQMX100::initDataCh Syntax void initDataCh(int chNo = DAQMX_CHNO_ALL); Parameters chNo Specify the channel number. Description Initializes the various information of the specified channel. If the constant for “Specify All Channel numbers” is specified for the channel number, all valid channels are processed. Updates the status if successful.
12.4 Details of the MX100 Class CDAQMX100::isObject Syntax virtual int isObject(const char * classname = "CDAQMX100"; Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited. If parameters are omitted, checks whether it is this class. Classes that inherit this class must be overridden in order to check their own classes. Returns true (valid) if the class was inherited. Otherwise, returns false (invalid).
12.4 Details of the MX100 Class CDAQMX100::measDataCh Syntax int measDataCh(int chNo = DAQMX100_CHNO_ALL); Parameters chNo Specify the channel number. Description Increments the current measurement point of the measured data of the specified channel number just one point. If the constant for “Specify All Channels” is specified for the channel numbers, all valid channels are processed. Updates the status if communication executed. Return value Returns an error number.
12.4 Details of the MX100 Class CDAQMX100::measInstCh Syntax int measInstCh(int chNo = DAQMX100_CHNO_ALL); Parameters chNo Specify the channel number. Description Receives the measured data of the specified channel number. Gets instantaneous values by channel, and stores them in the data member. If the constant for “Specify All Channels” is specified for the channel numbers, all valid channels are processed. Updates the status if successful. Return value Returns an error number.
12.4 Details of the MX100 Class CDAQMX100::measStart Syntax int measStart(void); Description Starts data acquisition. Starts the FIFO. Updates the status if successful. Return value Returns an error number. Reference startFIFO updateRenew CDAQMX100::measStop Syntax int measStop(void); Description Stops data acquisition. Stops the FIFO. Updates the status if successful. Return value Returns an error number.
12.4 Details of the MX100 Class CDAQMX100::open Syntax virtual int open(const char * strAddress, unsigned int uiPort = DAQMX_COMMPORT); Parameters strAddress Specify the IP address as a string. uiPort Specify the port number. Description Connects to the device with the IP address and port number specified by the parameters. The port number can be omitted. If omitted, it is set to the communication constant, “MX100 communication port number.
12.4 Details of the MX100 Class CDAQMX100::reloadBalance Syntax int reloadBalance(int idBalance); int reloadBalance(CDAQMXBalanceData & cMXBalanceData); Parameters idBalance Specify the initial balance data identifier. cMXBalanceData Specify initial balance data. Description Sends specified initial balance data. Updates the status if successful. Return value Returns an error number. Error: Not Data There is no data.
12.4 Details of the MX100 Class CDAQMX100::setAlarm Syntax int setAlarm(int chNo, int levelNo, int iAlarmType, double valueON, double valueOFF); int setAlarm(int chNo, int levelNo, int iAlarmType = DAQMX_ALARM_NONE, int valueON = 0, int valueOFF = 0); Parameters chNo Specify the channel number. levelNo iAlarmType Specify the alarm level. Specify the alarm type. valueON valueOFF Specify the threshold level (ON value) for alarm activation. Specify the threshold level (OFF value) for alarm termination.
12.4 Details of the MX100 Class CDAQMX100::setCFWriteMode Syntax int setCFWriteMode(int iCFWriteMode); Parameters iCFWriteMode Specify the CF write mode. Description Sets the CF write mode. Changes the setup data fields of the data member and sends them collectively. Return value Returns an error number.
12.4 Details of the MX100 Class CDAQMX100::setChComment Syntax int setChComment(int chNo, const char * strComment); Parameters chNo Specify the channel number. strComment Specify the comment. Description Sets the comment on the channel of the specified channel number. Changes the setup data fields of the data member and sends them collectively. If the constant for “Specify All Channels” is specified for the channel numbers, all channels are processed. Return value Returns an error number.
12.4 Details of the MX100 Class CDAQMX100::setChKind Syntax int setChKind(int chNo, int iKind, int refChNo = DAQMX_REFCHNO_NONE); Parameters chNo Specify the channel number. iKind refChNo Specify the channel type. Specify the reference channel number. Description Sets the channel type on the channel of the specified channel number. The channel settings are set to the default values. Changes the setup data fields of the data member and sends them collectively.
12.4 Details of the MX100 Class CDAQMX100::setChoice Syntax int setChoice(int outputNo, int idleChoice, int errorChoice, int presetValue); int setChoice(int outputNo, int idleChoice, int errorChoice, double presetValue); Parameters outputNo Specify the output channel data number. idleChoice errorChoice Specify the selected value when idling. Specify the selected value when an error occurs. presetValue Specify the value if the selected value is the “specified value.
12.4 Details of the MX100 Class CDAQMX100::setChTag Syntax int setChTag(int chNo, const char * strTag); Parameters chNo Specify the channel number. strTag Specify the tag. Description Sets the tag on the channel of the specified channel number. Changes the setup data fields of the data member and sends them collectively. If the constant for “Specify All Channels” is specified for the channel numbers, all channels are processed. Return value Returns an error number.
12.4 Details of the MX100 Class CDAQMX100::setDateTime Syntax virtual int setDateTime(CDAQMXDateTime * pcMXDateTime = NULL); Parameters pcMXDateTime Specify the time information data. Description Sets time information data on the device. Updates the status if successful. Return value Returns an error number. Reference updateRenew CDAQMX::setDateTime CDAQMX100::setDeenergize Syntax int setDeenergize(int doNo, int bDeenergize); Parameters doNo bDeenergize Specify the data number.
12.4 Details of the MX100 Class CDAQMX100::setFilter Syntax int setFilter(int chNo, int iFilter); Parameters chNo Specify the channel number. iFilter Specify the filter coefficient. Description Sets the filter coefficient on the channel of the specified channel number. Changes the setup data fields of the data member and sends them collectively. If the constant for “Specify All Channels” is specified for the channel numbers, all channels are processed. Return value Returns an error number.
12.4 Details of the MX100 Class CDAQMX100::setHold Syntax int setHold(int doNo, int bHold); Parameters doNo Specify the data number. bHold Specify hold using a Boolean value. Description Sets hold on the specified DO data number of the specified channel. Changes the setup data fields of the data member and sends them collectively. If the constant for “Specify All Channels” is specified for the channel numbers, all channels are processed. Return value Returns an error number.
12.4 Details of the MX100 Class CDAQMX100::setInterval Syntax int setInterval(int moduleNo, int iInterval); Parameters moduleNo Specify the module number. iInterval Specify the interval type. Description Sets the interval type on the module of the specified module number. Changes the setup data fields of the data member and sends them collectively. If the constant for “Specify all module numbers” is specified for the module numbers, all modules are processed. Return value Returns an error number.
12.4 Details of the MX100 Class CDAQMX100::setOutputType Syntax int setOutputType(int outputNo, int iOutput); Parameters outputNo Specify the output channel data number. iOutput Specify the output type. Description Sets the output type on the output channel data of the specified output channel data number. The settings other than the output type are set to the default values. Changes the setup data fields of the data member and sends them collectively.
12.4 Details of the MX100 Class CDAQMX100::setRange Syntax int setRange(int chNo, int iRange); Parameters chNo Specify the channel number. iRange Specify the range type. Description Sets the range. For the contact range and SKIP range types, see the definitions for the new constants. Channel settings outside the range take default values. Changes the setup data fields of the data member and sends them collectively.
12.4 Details of the MX100 Class CDAQMX100::setRefAlarm Syntax int setRefAlarm(int doNo, int refChNo, int levelNo, int bValid); Parameters doNo Specify the data number. refChNo levelNo Specify the reference channel number. Specify the alarm level. bValid Specify the Boolean value. Description Sets the reference alarm on the specified DO data number of the specified channel. The reference alarm is specified by reference channel number and alarm level.
12.4 Details of the MX100 Class CDAQMX100::setScale Syntax int setScale(int chNo, double scaleMin, double scaleMax, int scalePoint); int setScale(int chNo, int scaleMin = 0, int scaleMax = 0, int scalePoint = 0); Parameters chNo Specify the channel number. scaleMin scaleMax Specify the scale minimum. Specify the scale maximum. scalePoint Specify the decimal point position. Description Sets the scale on the channel of the specified channel number.
12.4 Details of the MX100 Class CDAQMX100::setUnitNo Syntax int setUnitNo(int unitNo); Parameters unitNo Specify the unit number. Description Sets the unit number. Changes the setup data fields of the data member and sends them collectively. Return value Returns an error number. Reference getClassMXItemConfig setItemAll CDAQMXItemConfig::getClassMXSysInfo CDAQMXSysInfo::setUnitNo CDAQMX100::setUnitTemp Syntax int setUnitTemp(int iTempUnit); Parameters iTempUnit Specify the temperature unit type.
12.4 Details of the MX100 Class CDAQMX100::switchBackup Syntax int switchBackup(int bBackup); Parameters bBackup Specify backup using a Boolean value. Description Switches backup. Updates the status if successful. Return value Returns an error number. Reference setBackup updateRenew CDAQMX100::switchDO Syntax int switchDO(int idDO, int bONOFF); Parameters idDO bONOFF Specify the DO data identifier. Specify ON/OFF using a Boolean value. Description Sends the specified DO data.
12.4 Details of the MX100 Class CDAQMX100::switchTransmit Syntax int switchTransmit(int idTrans, int iTransmit); Parameters idTrans Specify the transmission output data identifier. iTransmit Specify the transmission status. Description Sends the specified transmission output data. Changes all channels of the transmission output data to the specified transmission status and sends them. Updates the status if successful. Return value Returns an error number. Error: Not Data There is no data.
12.4 Details of the MX100 Class CDAQMX100::updateAll Syntax int updateAll(void); Description Updates all status and information data. Gets the following information and stores it in the data member. • Setup data • Channel information data • Status of randomly changing instrument Return value Returns an error number.
12.4 Details of the MX100 Class CDAQMX100::updateBalance Syntax int updateBalance(void); Description Gets initial balance data and stores it in the data member. Stores it in the current data of the initial balance data management field. Also copies to the initial balance data of the setup data field. If the communication packet version is not supported by the instrument, the process concludes normally. Return value Returns an error number.
12.4 Details of the MX100 Class CDAQMX100::updateInfoCh Syntax int updateInfoCh(int chNo = DAQMX_CHNO_ALL); Parameters chNo Specify the channel number. Description Gets the channel information data of the specified channel number and stores it in the data member. If the constant for “Specify All Channels” is specified for the channel numbers, all channels are processed. Return value Returns an error number.
12.4 Details of the MX100 Class CDAQMX100::updateStatus Syntax int updateStatus(void); Description Gets status data and stores it in the data member. Return value Returns an error number. Reference getClassMXItemConfig getStatusData CDAQMXItemConfig::getClassMXStatus CDAQMX100::updateSystem Syntax int updateSystem(void); Description Gets system configuration data and stores it in the data member. Return value Returns an error number.
12.4 Details of the MX100 Class CDAQMX100::userDoubleAOPWMValue Syntax double userDoubleAOPWMValue(int idAOPWM, int aopwmNo); Parameters idAOPWM Specify the AO/PWM data identifier. aopwmNo Specify the AO/PWM data number. Description Gets, as actual output values, the output data values of the specified AO/PWM data number from the AO/PWM data of the specified AO/PWM data identifier of the AO/ PWM data management field of the data member. Returns 0.0 if it does not exist.
12.4 Details of the MX100 Class CDAQMXAOPWMList Class CDAQMXList CDAQMXAOPWMList This class is for managing AO/PWM data from the output of command AO/PWM. You can create the AO/PWM data to output in advance and store it. The data is labeled with indentifiers. Public Members Construct/Destruct CDAQMXAOPWMList Constructs an object. ~CDAQMXAOPWMList Destructs an object. Member Data Manipulation add Adds AO/PWM data. change copyData Changes AO/PWM data. Copies AO/PWM data.
12.4 Details of the MX100 Class Private Members None. Member Functions (Alphabetical Order) CDAQMXAOPWMList::add Syntax int add(CDAQMXAOPWMData * pcMXAOPWMData); Parameters pcMXAOPWMData Specify the data using a pointer. Description Adds the specified data to the list and generates data identifiers. Returns a negative value if not added. Return value Returns the data identifier.
12.4 Details of the MX100 Class CDAQMXAOPWMList::change Syntax void change(int idAOPWM, int aopwmNo, int bValid, int iAOPWMValue = 0); Parameters idAOPWM Specify the AO/PWM data identifier. aopwmNo bValid Specify the AO/PWM data number. Specify valid/invalid using a Boolean value. iAOPWMValue Specify the output data value. Description Changes the AO/PWM data of the specified AO/PWM data identifier.
12.4 Details of the MX100 Class CDAQMXAOPWMList::copyData Syntax void copyData(int idAOPWM, CDAQMXAOPWMData * pcMXAOPWMData); Parameters idAOPWM Specify the AO/PWM data identifier. pcMXAOPWMData Specify the data using a pointer. Description Copies the data specified by the pointer to the data of the specified data identifier. If the data identifier is set to the constant for “Specify all data identifiers,” all data in the list is processed.
12.4 Details of the MX100 Class CDAQMXAOPWMList::getCurrent Syntax CDAQMXAOPWMData & getCurrent(void); Description Gets the current data field from the data member. Return value Returns a reference to the data. CDAQMXAOPWMList::initCurrent Syntax void initCurrent(void); Description Initializes the current data field of the data member.
12.4 Details of the MX100 Class CDAQMXBalanceList Class CDAQMXList CDAQMXBalanceList This class manages initial balance data. You can create the initial balance data to send in advance and store it. The data is identified by an indentifier. You can also store the results of the current data. Public Members Construct/Destruct CDAQMXBalanceList ~CDAQMXBalanceList Constructs an object. Destructs an object. Member Data Manipulation add Adds initial balance data.
12.4 Details of the MX100 Class Private Members None. Member Functions (Alphabetical Order) CDAQMXBalanceList::add Syntax int add(CDAQMXBalanceData * pcMXBalanceData); Parameters pcMXBalanceData Specify the data using a pointer. Description Adds the specified data to the list and generates data identifiers. Returns a negative value if not added. Return value Returns the data identifier.
12.4 Details of the MX100 Class CDAQMXBalanceList::change Syntax void change(int idBalance, int balanceNo, int bValid, int iValue = 0); Parameters idBalance Specify the initial balance data identifier. balanceNo bValid Specify the initial balance data number. Specify valid/invalid using a Boolean value. iValue Specify the initial balance value. Description Changes the initial balance data of the specified initial balance data identifier.
12.4 Details of the MX100 Class CDAQMXBalanceList::copyData Syntax void copyData(int idBalance, CDAQMXBalanceData * pcMXBalanceData); Parameters idBalance Specify the initial balance data identifier. pcMXBalanceData Specify the data using a pointer. Description Copies the data specified by the pointer to the data of the specified data identifier. If the data identifier is set to the constant for “Specify all data identifiers,” all data in the list is processed.
12.4 Details of the MX100 Class CDAQMXBalanceList::getCurrent Syntax CDAQMXBalanceResult & getCurrent(void); Description Gets the current data field from the data member. Return value Returns a reference to the data. CDAQMXBalanceList::initCurrent Syntax void initCurrent(void); Description Initializes the current data field of the data member.
12.4 Details of the MX100 Class CDAQMXDataBuffer Class This class stores each type of information for each channel of the MX100 in a group. You can store multiple data with the FIFO. The data is managed in a list. It is specified with a storage location index number. You can indicate the current location using the current index number. The following data can be stored.
12.4 Details of the MX100 Class Private Members None. Member Functions (Alphabetical Order) CDAQMXDataBuffer::CDAQMXDataBuffer Syntax CDAQMXDataBuffer(void); CDAQMXDataBuffer(CDAQMXChInfo & cMXChInfo); virtual ~CDAQMXDataBuffer(void); Parameters cMXChInfo Specify the channel information data. Description Constructs or destructs an object. When constructing, the data member is initialized. If a channel information data is specified in the parameter, it is copied to the data member.
12.4 Details of the MX100 Class CDAQMXDataBuffer::currentDataInfo Syntax CDAQMXDataInfo * currentDataInfo(void); Description Retrieves the measured data indicated by the current index number. Returns NULL if it does not exist. Return value Returns a pointer to the object. CDAQMXDataBuffer::currentDateTime Syntax CDAQMXDateTime * currentDateTime(void); Description Retrieves the time information indicated by the current index number. Returns NULL if it does not exist.
12.4 Details of the MX100 Class CDAQMXDataBuffer::getDataNum Syntax int getDataNum(void); Description Gets the number of remaining data from the difference between the number of valid elements and the current index number. Return value Returns the remaining number of data. CDAQMXDataBuffer::getDateTime Syntax CDAQMXDateTime * getDateTime(int index); Parameters index Specify the storage location index number. cMXDateTime Specify the time information data.
12.4 Details of the MX100 Class CDAQMXDataBuffer::next Syntax int next(void); Description Increments the current index number. If the valid number of elements is exceeded, the storage location is considered to be nonexistent, and a negative number is set. Return value Returns the current index number. CDAQMXDataBuffer::setChInfo Syntax void setChInfo(CDAQMXChInfo & cMXChInfo); Parameters cMXChInfo Specify the channel information data.
12.4 Details of the MX100 Class CDAQMXDataBuffer::setDateTime Syntax int setDateTime(int index, CDAQMXDateTime & cMXDateTime); Parameters index Specify the storage location index number. cMXDateTime Specify the time information data. Description Copies the specified time information data to the specified location of the data member. If no data exists in the element of the specified location in the list, data is created. Return value Returns an error number. Error: Not Data range. There is no data.
12.4 Details of the MX100 Class CDAQMXDOList Class CDAQMXList CDAQMXDOList This class is for managing DO data from the output of command DO. You can create the DO data to send in advance and store it. The data is identified by an indentifier. Public Members Construct/Destruct CDAQMXDOList Constructs an object. ~CDAQMXDOList Destructs an object. Member Data Manipulation add Adds the DO data. change copyData Changes the DO data. Copies the DO data. getClassMXDOData initCurrent Gets the DO data.
12.4 Details of the MX100 Class Private Members None. Member Functions (Alphabetical Order) CDAQMXDOList::add Syntax int add(CDAQMXDOData * pcMXDOData); Parameters pcMXDOData Specify the data using a pointer. Description Adds the specified data to the list and generates data identifiers. Returns a negative value if not added. Reference addData CDAQMXDOList::CDAQMXDOList Syntax CDAQMXDOList(void); virtual ~CDAQMXDOList(void); Description Constructs or destructs an object.
12.4 Details of the MX100 Class CDAQMXDOList::change Syntax void change(int idDO,int doNo,int bValid,int bONOFF = DAQMX_VALID_OFF); Parameters idDO Specify the DO data identifier. doNo bValid Specify the data number. Specify valid/invalid using a Boolean value. bONOFF Specify ON/OFF using a Boolean value. Description Changes the DO data of the specified DO data identifier. If the data identifier is set to the constant for “Specify all data identifiers,” all data in the list is processed.
12.4 Details of the MX100 Class CDAQMXDOList::copyData Syntax void copyData(int idDO,CDAQMXDOData * pcMXDOData); Parameters idDO Specify the DO data identifier. pcMXDOData Specify the data using a pointer. Description Copies the data specified by the pointer to the data of the specified data identifier. If the data identifier is set to the constant for “Specify all data identifiers,” all data in the list is processed.
12.4 Details of the MX100 Class CDAQMXDOList::getCurrent Syntax CDAQMXDOData & getCurrent(void); Description Gets the current data field from the data member. Return value Returns a reference to the data. CDAQMXDOList::initCurrent Syntax void initCurrent(void); Description Initializes the current data field of the data member.
12.4 Details of the MX100 Class CDAQMXItemConfig Class CDAQCongig CDAQMXItemConfig This is a setup data class providing functions that access the setting contents using setup items. Access using setup items involves the loading from or writing to the fields of the content. In principle, all contents are processed even they are unused, indefinite, or illegal. The contents are not checked for validity. The class supports functions that indicate content fields using strings.
12.4 Details of the MX100 Class Utilities toItemName getItemNo Gets the setup item string. Gets the setting item number. getMaxLenItemName Get the maximum length of the setup item string. Overridden Members Utilities isObject Checks an object. Inherited Members See CDAQMXConfig.
12.4 Details of the MX100 Class Member Functions (Alphabetical Order) CDAQMXItemConfig::CDAQMXItemConfig Syntax CDAQMXItemConfig(MXConfigData * pMXConfigData = NULL); virtual ~CDAQMXItemConfig(void); Parameters pMXConfigData Specify the setup data. Description Constructs or destructs an object. When constructing, the data member is set to the specified value. If not specified, the data member is initialized.
12.4 Details of the MX100 Class CDAQMXItemConfig::getDoubleAlarmON Syntax double getDoubleAlarmON(int chNo, int levelNo); Parameters chNo Specify the channel number. levelNo Specify the alarm level. Description Gets the specified channel number and threshold level for alarm generation (ON value) as a floating point number. Returns 0.0 if it does not exist. Return value Returns the threshold level (ON value) for alarm generation as a floating point number.
12.4 Details of the MX100 Class CDAQMXItemConfig::getDoublePresetValue Syntax double getDoublePresetValue(int outputNo); Parameters outputNo Specify the output channel data number. Description Gets the value if the selected value of the specified output channel data number is the “specified value,” as a floating point number. Returns 0.0 if it does not exist. Return value Returns the value if the selected value is the “specified value” as a floating point number.
12.4 Details of the MX100 Class CDAQMXItemConfig::getDoubleScaleMin Syntax double getDoubleScaleMin(int chNo); Parameters chNo Specify the channel number. Description Gets the minimum scale value for the specified channel number as a floating point number. Returns 0.0 if it does not exist. Return value Gets the scale minimum value as a floating point number.
12.4 Details of the MX100 Class CDAQMXItemConfig::getDoubleSpanMin Syntax double getDoubleSpanMin(int chNo); Parameters chNo Specify the channel number. Description Gets the minimum span value for the specified channel number as a floating point number. Returns 0.0 if it does not exist. Return value Gets the span minimum value as a floating point number.
12.4 Details of the MX100 Class CDAQMXItemConfig::getMaxLenItemName Syntax static int getMaxLenItemName(void); Description Gets the maximum length of string of the item name of the setup item. The return value does not include the terminator. Return value Returns the length of the string. CDAQMXConfig::isObject Syntax virtual int isObject(const char * classname = “CDAQMXItemConfig”; Parameters classname Specify the class name using a string.
12.4 Details of the MX100 Class CDAQMXItemConfig::readItem Syntax int readItem(int itemNo,char * strItem, int lenItem); Parameters itemNo Specify the setup item. strItem lenItem Specify the field where the string is to be stored. Specify the byte size of the field where the string is to be stored. Description Gets the contents of the specified setup item as a string. Stores the string in the specified storage destination. The strings that can be stored are, in general, ASCII strings.
12.4 Details of the MX100 Class CDAQMXItemConfig::toItemName Syntax static int toItemName(int itemNo, char * strItem, int lenItem); Parameters itemNo Specify the setup item. strItem lenItem Specify the field where the string is to be stored. Specify the byte size of the field where the string is to be stored. Description Gets the setup item name of the specified setup item as a string. Stores the string in the specified storage destination. The string stored to the field includes the terminator.
12.4 Details of the MX100 Class CDAQMXItemConfig::writeItem Syntax int writeItem(int itemNo, const char * strItem); Parameters itemNo Specify the setup item. strItem Specify the contents using a string. Description Sets the specified contents to the specified setup item. The format of the string should match the output of setup item loading function. The specified string is, in general, an ASCII string. Return value Returns an error number. Error: Not Support Setup item or contents not supported.
12.4 Details of the MX100 Class CDAQMXList Class CDAQMXList CDAQMXList This class manages data created by the user. The registered data is identified by a data indentifier. The data identifier corresponds to the index number of the list. This class does not define data to be created. It overrides data member manipulation function members. Public Members Construct/Destruct CDAQMXList ~CDAQMXList Constructs an object. Destructs an object.
12.4 Details of the MX100 Class Member Functions (Alphabetical Order) CDAQMXList::addData Syntax int addData(void * pData); Parameters pData Specify the data using a pointer. Description Adds the specified data to the list and generates data identifiers. Returns a negative value if not added. Return value Returns the data identifier. CDAQMXList::CDAQMXList Syntax CDAQMXList(void); virtual ~CDAQMXList(void); Description Constructs or destructs an object.
12.4 Details of the MX100 Class CDAQMXList::create Syntax virtual int create(void); Description Creates data and adds it to the list. Data not created if not overridden. Return value Returns the data identifier. Reference addData CDAQMXList::del Syntax virtual void del(int idxNo); Parameters idxNo Specify the data identifier. Description Deletes the data of the specified data identifier from the list and destructs.
12.4 Details of the MX100 Class CDAQMXList::getData Syntax void * getData(int idxNo); Parameters idxNo Specify the data identifier. Description Gets the data of the specified data identifier. Returns NULL if it does not exist. Return value Returns a pointer to the data. CDAQMXList::getMaxNo Syntax int getMaxNo(void); Description Gets the maximum value of the data identifier of the data that exists in the list. Return value Returns the data identifier.
12.4 Details of the MX100 Class CDAQMXList::isData Syntax int isData(int idxNo); Parameters idxNo Specify the data identifier. Description Checks whether the data of the specified data identifier exists in the list. If it exists, Valid is returned. Otherwise, returns Invalid. Return value Returns a Boolean value.
12.4 Details of the MX100 Class CDAQMXTransmitList Class CDAQMXList CDAQMXTransmitList This class is for managing transmission output data specified under transmission output. You can create the transmission output data to send in advance and store it. The data is identified by an indentifier. Public Members Construct/Destruct CDAQMXTransmitList Constructs an object. ~CDAQMXTransmitList Destructs an object. Member Data Manipulation add Adds transmission output data.
12.4 Details of the MX100 Class Member Functions (Alphabetical Order) CDAQMXTransmitList::add Syntax int add(CDAQMXTransmit * pcMXTransmit); Parameters pcMXTransmit Specify the data using a pointer. Description Adds the specified data to the list and generates data identifiers. Returns a negative value if not added. Return value Returns the data identifier.
12.4 Details of the MX100 Class CDAQMXTransmitList::change Syntax void change(int idTransmit, int aopwmNo, int iTransmit); Parameters idTransmit Specify the transmission output data identifier. aopwmNo iTransmit Specify the AO/PWM data number. Specify the transmission status. Description Changes the transmission output data of the specified transmission output data identifier. If the data identifier is set to the constant for “Specify all data identifiers,” all data in the list is processed.
12.4 Details of the MX100 Class CDAQMXTransmitList::copyData Syntax void copyData(int idTransmit, CDAQMXTransmit * pcMXTransmit); Parameters idTransmit Specify the transmission output data identifier. pcMXTransmit Specify the data using a pointer. Description Copies the data specified by the pointer to the data of the specified data identifier. If the data identifier is set to the constant for “Specify all data identifiers,” all data in the list is processed.
12.4 Details of the MX100 Class CDAQMXTransmitList::getCurrent Syntax CDAQMXTransmit & getCurrent(void); Description Gets the current data field from the data member. Return value Returns a reference to the data. CDAQMXTransmitList::initCurrent Syntax void initCurrent(void); Description Initializes the current data field of the data member.
Chapter 13 MX100 for Extended API - Visual C - 13.1 Functions and Their Functionalities - MX100/ Visual C This section indicates the correspondence between the functionalities that the extension API supports and the Visual C functions. There are two types, status transition functions and retrieval functions. Status retrieval functions control the MX100.
13.
13.
13.
13.
13.1 Functions and Their Functionalities - MX100/Visual C - Retrieval Functions Function Status data System configuration data Setup data Output DO data data AO/PWM data Transmission output data Channel information data Measured Specify ch.
13.1 Functions and Their Functionalities - MX100/Visual C - Retrieval Functions Measured Data Data Name Data value Data status Values Alarm (presence/absence) Measured values Double integer String Time No.
13.
13.
13.1 Functions and Their Functionalities - MX100/Visual C - Status Data Data Name Unit status value Valid number of FIFOs Backup (presence or absence) FIFO FIFO status value Interval type CF CF status type Size Remaining capacity Status return time No.
13.
13.2 Programming - MX100/Visual C Adding the Path to the Include File Add the path of the include file (DAQMX100.h) to the project. The method of adding the include file varies depending on the environment used. Declaration in the Source File Write the declaration in the source file. #include "DAQMX100.h" Note The include file of the common section (DAQHandler.h) and the MX100 include file (DAQMX.h) is referenced from the include file described above. Thus, declaration for it is not necessary.
13.2 Programming - MX100/Visual C - Retrieval of the Measured Data Program Example IM MX190-01E 13-13 MX100 for Extended API - Visual C - ////////////////////////////////////////////////////////////// // MX100 sample for measurement #include #include "DAQMX100.
13.2 Programming - MX100/Visual C - Description Overview Data retrieval is possible by starting the FIFO. The amount of retrievable data within the FIFO data on channel 1 of the MX100 is retrieved and stored in the field. Gets the measured value data (one point) of the current status (first measurement point) and concludes the process. Communication Connection comm = openMX100("192.168.1.12", &rc); The IP address of the MX100 is specified.
13.2 Programming - MX100/Visual C - Retrieval of Setup Data and Configuration Program Example MX100 for Extended API - Visual C - ////////////////////////////////////////////////////////////// // MX100 sample for items #include #include "DAQMX100.h" #include "DAQMXItems.
13.2 Programming - MX100/Visual C - //connect comm = openMX100("192.168.1.
13.2 Programming - MX100/Visual C - Getting the Setup Data Collectively rc = daqmx100.getItemAll(); Gets all items of the MX100 setup data collectively and stores in the setup data field. Retrieval of the Setup Data by Item rc = readItemMX100(comm, i, strItem, BUFSIZ, &realLen); Retrieves the contents of item number “i” from the setup data field. Writing the Setup Data by Item rc = writeItemMX100(comm, i, strItem); Writes the contents of strItem to item number “i” of the setup data field.
Chapter 14 MX100 for Extended API - Visual Basic - 14.1 Functions and Their Functionalities - MX100/ Visual Basic This section indicates the correspondence between the functionalities that the extension API supports and the Visual Basic functions. There are two types, status transition functions and retrieval functions. Status transition functions control the MX100.
14.1 Functions and Their Functionalities - MX100/Visual Basic - Control Functions Function Set date/time Current time Set backup valid/invalid Format of the CF card.
14.1 Functions and Their Functionalities - MX100/Visual Basic - Setup Change Functions The setup functions send the settings then update the status. These settings are for individual channels. If the settings could not be entered, an error is usually returned. Specification is possible with data values or measured values (Double).
14.
14.
14.
14.1 Functions and Their Functionalities - MX100/Visual Basic - Retrieval Functions Measured Data Data Name Data value Data status values Alarm (presence/absence) Measured values Double integer String Time No.
14.
14.
14.1 Functions and Their Functionalities - MX100/Visual Basic - Status Data Data Name Unit status value Valid number of FIFOs Backup (presence or absence) FIFO FIFO status value Interval type CF CF status type Size Remaining capacity Status return time No.
14.
14.2 Programming - MX100/Visual Basic Declaration of Types, Functions, and Constants To use types, functions, and constants for Visual Basic, they must be declared in advance. The following methods of declaration statements are available. Statement of All Declarations Adding the standard module file for Visual Basic (DAQMX100.bas) to the project is equivalent to declaring all types, functions, and constants.
14.2 Programming - MX100/Visual Basic - Retrieval of the Measured Data Program Example Attribute VB_Name = "Module1" Public Sub Main() 'connect comm = openMX100("192.168.1.12", rc) 'get rc = measStartMX100(comm) rc = measDataChMX100(comm, 1) value = dataValueMX100(comm, 1) rc = measStopMX100(comm) 'disconnect rc = closeMX100(comm) End Sub Description Overview Data retrieval is possible by starting the FIFO.
14.2 Programming - MX100/Visual Basic - FIFO Stop rc = measStopMX100(comm) Stops the FIFO. Comm. cut rc = closeMX100(comm) Drops the connection. Reference The sample program is completed by executing measDaraChMX100 only once. Each time measDataChMX100 is executed, the measurement point advances by one, and the next data is set as the current status. When the last stored measurement point is reached, the next retrievable amount of data is retrieved.
14.2 Programming - MX100/Visual Basic - Retrieval of Setup Data and Configuration Program Example Attribute VB_Name = "Module1" Public Sub Main() Dim comm As Long '/descriptor Dim rc As Long '/return (error) code Dim i As Long '/counter Dim strItem As String * 512 '/string buffer Dim lenItem As Long '/size of buffer Dim realLen As Long '/real size of string by function returned '/set size lenItem = 512 '/open comm = openMX100("192.168.1.
14.2 Programming - MX100/Visual Basic - Communication Connection comm = openMX100("192.168.1.12", rc) The IP address of the MX100 is specified. This statement implicitly specifies the communication constant DAQMX_COMMPORT (communication port number of the MX100). Getting the Setup Data Collectively rc = getItemAllMX100(comm) Gets all items of the MX100 setup data collectively and stores in the setup data field.
Chapter 15 MX100 for Extended API - Visual Basic.NET - 15.1 Functions and Their Functionalities - MX100/ Visual Basic.NET - 15 extension API supports and the Visual C functions. There are two types, status transition functions and retrieval functions. Status retrieval functions control the MX100. When measured data is retrieved with the data transition function, the measured data advances by only one interval’s worth of data (the status of the extension API changes).
15.1 Functions and Their Functionalities - MX100/Visual Basic.
15.1 Functions and Their Functionalities - MX100/Visual Basic.
15.1 Functions and Their Functionalities - MX100/Visual Basic.
15.1 Functions and Their Functionalities - MX100/Visual Basic.
15.1 Functions and Their Functionalities - MX100/Visual Basic.
15.1 Functions and Their Functionalities - MX100/Visual Basic.NET - 15 MX100 for Extended API - Visual Basic.NET - Retrieval Functions Measured Data Data Name Data value Data status values Alarm (presence/absence) Measured val Double integer String Time No.
15.1 Functions and Their Functionalities - MX100/Visual Basic.
15.1 Functions and Their Functionalities - MX100/Visual Basic.NET - 15 Network Information Data MX100 for Extended API - Visual Basic.
15.1 Functions and Their Functionalities - MX100/Visual Basic.NET - Status Data Data Name Unit status value Valid number of FIFOs Backup (presence or absence) FIFO FIFO status value Interval type CF CF status type Size Remaining capacity Status return time No.
15.1 Functions and Their Functionalities - MX100/Visual Basic.
15.2 Programming - MX100/Visual Basic.NET Declaration of Functions and Constants To use functions, and constants for Visual Basic.NET, they must be declared in advance. The following methods of declaration statements are available. Declaration Statements Adding the module file for Visual Basic.NET (DAQMX100.vb) to the project is equivalent to declaring all functions and constants.
15.2 Programming - MX100/Visual Basic.NET - 15 Retrieval of the Measured Data MX100 for Extended API - Visual Basic.NET - Program Example 1 Module Module1 Public Sub Meas() Dim comm As Integer Dim rc As Integer Dim value As Integer 'connect comm = openMX100("192.168.1.
15.2 Programming - MX100/Visual Basic.NET - FIFO Stop rc = measStopMX100(comm) Stops the FIFO. Comm. cut rc = closeMX100(comm) Drops the connection. Reference The sample program is completed by executing measDaraChMX100 only once. Each time measDataChMX100 is executed, the measurement point advances by one, and the next data is set as the current status. When the last stored measurement point is reached, the next retrievable amount of data is retrieved.
15.2 Programming - MX100/Visual Basic.NET - 15 Retrieval of Setup Data and Configuration MX100 for Extended API - Visual Basic.NET - Program Example 2 Module Module1 Public Sub Item() Dim rc As Integer Dim comm As Integer Dim i As Integer Dim strItem As String Dim lenItem As Integer Dim realLen As Integer lenItem = 512 strItem = Space(lenItem) 'connect comm = openMX100("192.168.1.
15.2 Programming - MX100/Visual Basic.NET - Communication Connection comm = openMX100("192.168.1.12", rc) The IP address of the MX100 is specified. This statement implicitly specifies the communication constant DAQMX_COMMPORT (communication port number of the MX100). Getting the Setup Data Collectively rc = getItemAllMX100(comm) Gets all items of the MX100 setup data collectively and stores in the setup data field.
Chapter 16 MX100 for Extended API - C# - 16.1 Functions and Their Functionalities - MX100/C# 16 There are two types, status transition functions and retrieval functions. Status retrieval functions control the MX100. When measured data is retrieved with the data transition function, the measured data advances by only one interval’s worth of data (the status of the extension API changes). The retrieval function returns the parameter value.
16.1 Functions and Their Functionalities - MX100/C# - Control Functions Function Set date/time Current time Set backup valid/invalid Format of the CF card Unit Reconfigure Initialize Reset alarm (alarm ACK) 7-segment LED display Initialize stored data Specify channel Specify FIFO FIFO Function Stop DAQMX100. setDateTimeNowMX100 Continue DAQMX100. switchBackupMX100 Stop DAQMX100. formatCFMX100 Stop DAQMX100. reconstructMX100 Stop DAQMX100. initSetValueMX100 Stop DAQMX100. ackAlarmMX100 Continue DAQMX100.
16.1 Functions and Their Functionalities - MX100/C# - Setup Change Functions Range Settings Function Skip DC voltage input Thermocouple input RTD Digital input Resistance Strain AO PWM Difference computation between channels Remote RRJC Pulse Communication FIFO Stop Stop Stop Stop Stop Stop Stop Stop Stop Stop Stop Stop Stop Function DAQMX100. setRangMX100 DAQMX100. setRangMX100 DAQMX100. setRangMX100 DAQMX100. setRangMX100 DAQMX100. setRangMX100 DAQMX100. setRangMX100 DAQMX100. setRangMX100 DAQMX100.
16.1 Functions and Their Functionalities - MX100/C# - Module Settings Function Interval type A/D integral time type FIFO Stop Stop Function DAQMX100. setIntervalMX100 DAQMX100. setIntegralMX100 FIFO Stop Stop Stop Function DAQMX100. setUnitNoMX100 DAQMX100. setUnitTempMX100 DAQMX100. setCFWriteModeMX100 Function Output type Selected value FIFO Stop Stop Pulse interval integer multiple Stop Class and Member Function DAQMX100. setOutputTypeMX100 DAQMX100. setChoiceMX100 DAQMX100.
16.1 Functions and Their Functionalities - MX100/C# - Data Manipulation Functions DO Data FIFO Continue Continue Continue Continue Continue Continue Function DAQMX100. createDOMX100 DAQMX100. deleteDOMX100 DAQMX100. changeDOMX100 DAQMX100. copyDOMX100 DAQMX100. commandDOMX100 DAQMX100. switchDOMX100 FIFO Continue Continue Continue Continue Continue Continue Function DAQMX100. createAOPWMMX100 DAQMX100. deleteAOPWMMX100 DAQMX100. changeAOPWMMX100 DAQMX100. changeAOPWMValueMX100 DAQMX100.
16.1 Functions and Their Functionalities - MX100/C# - Retrieval Functions Function FIFO Status Continue System configuration data Continue Setup data Continue Output data DO data Continue AO/PWM data Continue Trans output data Channel information data Continue Measured data FIFO value Continue (Specify channel) Instantaneous Continue value Measured data FIFO value Continue (specify FIFO) Instantaneous Continue value Initial balance data Continue Output channel data Continue Function DAQMX100.
16.1 Functions and Their Functionalities - MX100/C# - Retrieval Functions 16 Measured Data Function DAQMX100. dataValueMX100 DAQMX100. dataStatusMX100 DAQMX100. dataAlarmMX100 DAQMX100. dataDoubleValueMX100 DAQMX100. dataStringValueMX100 DAQMX100. dataTimeMX100 DAQMX100. dataMilliSecMX100 DAQMX100. dataYearMX100 DAQMX100. dataMonthMX100 DAQMX100. dataDayMX100 DAQMX100. dataHourMX100 DAQMX100. dataMinuteMX100 DAQMX100. dataSecondMX100 DAQMX100.
16.1 Functions and Their Functionalities - MX100/C# - Channel Setup Data Data Name Channel status (valid/invalid) Decimal point position Channel kind Range type Scale type Unit name Tag Comment AI/DI/AO/ Span Min value PWM Max value AI/DI Scale Min value Max val Data val Measval Data val Meas val Data val Meas val Data val Meas val Function DAQMX100. channelValidMX100 DAQMX100. channelPointMX100 DAQMX100. channelKindMX100 DAQMX100. channelRangeMX100 DAQMX100. channelScaleTypeMX100 DAQMX100.
16.1 Functions and Their Functionalities - MX100/C# - Network Information Data Function DAQMX100. toNetHostMX100 DAQMX100. netAddressMX100 DAQMX100. netPortMX100 DAQMX100. netSubmaskMX100 DAQMX100.
16.1 Functions and Their Functionalities - MX100/C# - Status Data Data Name Unit status value Valid number of FIFOs Backup (presence or absence) FIFO FIFO status value Interval type CF CF status type Size Remaining capacity Status return time No. of seconds Milliseconds Year Month Day Hour Minute Second Function DAQMX100. statusUnitMX100 DAQMX100. statusFIFONumMX100 DAQMX100. statusBackupMX100 DAQMX100. statusFIFOMX100 DAQMX100. statusFIFOIntervalMX100 DAQMX100. statusCFMX100 DAQMX100.
16.1 Functions and Their Functionalities - MX100/C# - User Data Data Name DO data Gets the data values created by the user with data manipulation functions. Utilities Function/Data Name Remaining dataRetrieve by channel number Retrieve by FIFO Error Get MX-specific error Get the error message string Get the error message string maximum length Get no.
16.2 Programming - MX100/C# - Declaration of Functions and Constants To use functions and constants for C#, they must be declared in advance. The following methods of declaration statements are available. Declaration Statements Adding the module file for C# (DAQMX100.cs) to the project is equivalent to declaring all functions and constants.
16.2 Programming - MX100/C# - Retrieval of the Measured Data Program Example 1 using System; using System.Text; using System.Runtime.InteropServices; 16 MX100 for Extended API - C# - namespace MeasCS { class Class1 { [STAThread] static void Main(string[] args) { int rc; Encoding enc = Encoding.GetEncoding ("ascii"; String address = "192.168.1.12"; //connect int comm = DAQMX100.openMX100(enc.GetBytes(address), out rc); //get rc = DAQMX100.measStartMX100(comm); rc = DAQMX100.
16.2 Programming - MX100/C# - Retrieval of the Measured Data of Channel 1 rc = DAQMX100.measDataChMX100(comm, 1); The amount of retrievable measured data from channel 1 of the MX100 is retrieved and stored in the field. The first measurement point is set as the current status. Retrieval of Measured Values int val = DAQMX100.dataValueMX100(comm, 1); Retrieves the measured values of the current status of channel 1 from the field where the measured data is stored. FIFO Stop rc = DAQMX100.
16.2 Programming - MX100/C# - Retrieval of Setup Data and Configuration Program Example 2 using System; using System.Text; using System.Runtime.InteropServices; 16 IM MX190-01E 16-15 MX100 for Extended API - C# - namespace ItemCS { class Class1 { [STAThread] static void Main(string[] args) { int rc; int lenItem = 512; byte[] strItem = new byte[lenItem]; int realLen; Encoding enc = Encoding.GetEncoding ("ascii"; String address = "192.168.1.12"; //connect int comm = DAQMX100.openMX100(enc.
16.2 Programming - MX100/C# - Description Overview The program is an example of reading and writing all setup items. The following four actions are executed. • Gets the setup data from the MX100 collectively. • Retrieves the setup data of the setup data field by item. • Writes the setup data in the setup data field by item. • Sends the setup data to the MX100 collectively. Each item is retrieved and written from the first number to the end number.
Chapter 17 Functions for the MX100 (Extended API) - Visual C/Visual Basic/Visual Basic.NET/C# - 17.1 Details of Function - MX00 (Visual C/Visual Basic/ Visual Basic.NET/C#) - Status Transition Functions This section describes the MX100 functions that are used in C and Visual Basic. The functions are listed in alphabetical order by the function name. 17 For information about the MX100, see appendix 1. Most functions return an error number as a return value. Error number 0 is returned if there is no error.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions ackAlarmMX100 Syntax int ackAlarmMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function ackAlarmMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function ackAlarmMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions changeAOPWMMX100 Syntax int changeAOPWMMX100(DAQMX100 daqmx100, int idAOPWM, int aopwmNo, int bValid, int iAOPWMValue); Declaration Parameters daqmx100 Specify the device descriptor. idAOPWM aopwmNo Specify the AO/PWM data identifier. Specify the AO/PWM data number. bValid iAOPWMValue Specify valid/invalid using a Boolean value. Specify the output data value.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions changeAOPWMValueMX100 Syntax int changeAOPWMValueMX100(DAQMX100 daqmx100, int idAOPWM, int aopwmNo, int bValid, double realValue); Declaration Visual Basic Public Declare Function changeAOPWMValueMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal idAOPWM As Double, ByVal aopwmNo As Long, ByVal bValid As Long, ByVal realValue As Doouble) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions changeBalanceMX100 Syntax int changeBalanceMX100(DAQMX100 daqmx100, int idBalance, int balanceNo, int bValid, int iValue); Declaration Parameters daqmx100 idBalance Specify the device descriptor. Specify the initial balance data identifier. balanceNo bValid Specify the initial balance data number. Specify valid/invalid using a Boolean value. iValue Specify the initial balance value.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions changeDOMX100 Syntax int changeDOMX100(DAQMX100 daqmx100, int idDO, int doNo, int bValid, int bONOFF); Declaration Visual Basic Public Declare Function changeDOMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal idDO As Long, ByVal doNo As Long, ByVal bValid As Long, ByVal bONOFF As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions changeTransmitMX100 Syntax int changeTransmitMX100(DAQMX100 daqmx100, int idTrans, int aopwmNo, int iTransmit); Declaration Parameters daqmx100 Specify the device descriptor. idTrans aopwmNo Specify the transmission output data identifier. Specify the AO/PWM data number. iTransmit Specify the transmission status.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions clearBalanceMX100 Syntax int clearBalanceMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function clearBalanceMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function clearBalanceMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions closeMX100 Syntax int closeMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Disconnects the communication using the specified device descriptor. • When the communication is disconnected, the value of the device descriptor is meaningless. • After disconnection, do not use the value of the device descriptor. Return value Returns an error number.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions commandAOPWMMX100 Syntax int commandAOPWMMX100(DAQMX100 daqmx100, int idAOPWM); Declaration Visual Basic Public Declare Function commandAOPWMMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal idAOPWM As Long) As Long Visual Basic.NET Public Declare Ansi Function commandAOPWMMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal idAOPWM As Integer) As Integer C# [DllImport("DAQMX100.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions commandBalanceMX100 Syntax int commandBalanceMX100(DAQMX100 daqmx100, int idBalance); Declaration Parameters daqmx100 idBalance Specify the device descriptor. Specify the initial balance data identifier. Description Sends the initial balance data of the specified initial balance data identifier. Return value Returns an error number. Error: Not descriptor No device descriptor.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions commandDOMX100 Syntax int commandDOMX100(DAQMX100 daqmx100, int idDO); Declaration Visual Basic Public Declare Function commandDOMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal idDO As Long) As Long Visual Basic.NET Public Declare Ansi Function commandDOMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal idDO As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions commandTransmitMX100 Syntax int commandTransmitMX100(DAQMX100 daqmx100, int idTrans); Declaration Parameters daqmx100 idTrans Specify the device descriptor. Specify the transmission output data identifier. Description Sends the transmission output data of the specified transmission output data identifier. Return value Returns an error number. Error: Not descriptor No device descriptor.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions copyAOPWMMX100 Syntax int copyAOPWMMX100(DAQMX100 daqmx100, int idAOPWM, int idAOPWMSrc); Declaration Visual Basic Public Declare Function copyAOPWMMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal idAOPWM As Long, ByVal idAOPWMSrc As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions copyBalanceMX100 Syntax int copyBalanceMX100(DAQMX100 daqmx100, int idBalance, int idBalanceSrc); Declaration Parameters daqmx100 idBalance Specify the device descriptor. Specify the initial balance data identifier of the copy destination. idBalanceSrc Specify the initial balance data identifier of the copy source.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions copyDOMX100 Syntax int copyDOMX100(DAQMX100 daqmx100, int idDO, int idDOSrc); Declaration Visual Basic Public Declare Function copyDOMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal idDO As Long, ByVal idDOSrc As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions copyTransmitMX100 Syntax int copyTransmitMX100(DAQMX100 daqmx100, int idTrans, int idTransSrc); Declaration Parameters daqmx100 idTrans Specify the device descriptor. Specify the transmission output data identifier of the copy idTransSrc destination. Specify the transmission output data identifier of the copy source.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions createAOPWMMX100 Syntax int createAOPWMMX100(DAQMX100 daqmx100, int * errCode); Declaration Visual Basic Public Declare Function createAOPWMMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByRef errCode As Long) As Long Visual Basic.NET Public Declare Ansi Function createAOPWMMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByRef errCode As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions createBalanceMX100 Syntax int createBalanceMX100(DAQMX100 daqmx100, int * errCode); Declaration Parameters daqmx100 Specify the device descriptor. errorCode Specify the destination where the error number is to be returned. Description Creates new initial balance data. • Returns the initial balance data identifier as a return value. • Returns a negative number if unsuccessful.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions createDOMX100 Syntax int createDOMX100(DAQMX100 daqmx100, int * errorCode); Declaration Visual Basic Public Declare Function createDOMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByRef errorCode As Long) As Long Visual Basic.NET Public Declare Ansi Function createDOMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByRef errorCode As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions createTransmitMX100 Syntax int createTransmitMX100(DAQMX100 daqmx100, int * errCode); Declaration Parameters daqmx100 Specify the device descriptor. errorCode Specify the destination where the error number is to be returned. Description Creates new transmission output data. • Returns the transmission output data identifier as a return value. • Returns a negative number if unsuccessful.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions deleteAOPWMMX100 Syntax int deleteAOPWMMX100(DAQMX100 daqmx100, int idAOPWM); Declaration Visual Basic Public Declare Function deleteAOPWMMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal idAOPWM As Long) As Long Visual Basic.NET Public Declare Ansi Function deleteAOPWMMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal idAOPWM As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions deleteBalanceMX100 Syntax int deleteBalanceMX100(DAQMX100 daqmx100, int idBalance); Declaration Parameters daqmx100 Specify the device descriptor. idBalance Specify the initial balance data identifier. Description Deletes the initial balance data of the specified initial balance data identifier.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions deleteDOMX100 Syntax int deleteDOMX100(DAQMX100 daqmx100, int idDO); Declaration Visual Basic Public Declare Function deleteDOMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal idDO As Long) As Long Visual Basic.NET Public Declare Ansi Function deleteDOMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal idDO As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions deleteTransmitMX100 Syntax int deleteTransmitMX100(DAQMX100 daqmx100, int idTrans); Declaration Parameters daqmx100 Specify the device descriptor. idTrans Specify the transmission output data identifier. Description Deletes the transmission output data of the specified transmission output data identifier.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions displaySegmentMX100 Syntax int displaySegmentMX100(DAQMX100 daqmx100, int dispPattern0, int dispPattern1, int dispType, int dispTime); Declaration Visual Basic Public Declare Function displaySegmentMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, dispPattern0 As Long, dispPattern1 As Long, dispType As Long, dispTime As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions formatCFMX100 Syntax int formatCFMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function formatCFMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function formatCFMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions getItemAllMX100 Syntax int getItemAllMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function getItemAllMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function getItemAllMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions initBalanceMX100 Syntax int initBalanceMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Executes initial balancing. Return value Returns an error number. Error: Not descriptor No device descriptor. Reference CDAQMX100::initBalance IM MX190-01E 17-29 17 Functions for the MX100 (Extended API) - Visual C/Visual Basic/Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions initDataChMX100 Syntax int initDataChMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function initDataChMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function initDataChMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions initDataFIFOMX100 Syntax int initDataFIFOMX100(DAQMX100 daqmx100, int fifoNo); Declaration Parameters daqmx100 Specify the device descriptor. fifoNo Specify the FIFO number. Description Initializes the measured data of the specified FIFO number. • Retrieval of measured data starts from the top of the FIFO.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions initItemMX100 Syntax int initItemMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function initItemMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function initItemMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions initSetValueMX100 Syntax int initSetValueMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Initializes settings. Return value Returns an error number. Error: Not descriptor No device descriptor. Reference CDAQMX100::initSetValue IM MX190-01E 17-33 17 Functions for the MX100 (Extended API) - Visual C/Visual Basic/Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions measDataChMX100 Syntax int measDataChMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function measDataChMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function measDataChMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions measDataFIFOMX100 Syntax int measDataFIFOMX100(DAQMX100 daqmx100, int fifoNo); Declaration Parameters daqmx100 Specify the device descriptor. fifoNo Specify the FIFO number. Description Retrieves the measured data of the specified FIFO number. • If the constant for “Specify all FIFO numbers” is specified for the FIFO numbers, all FIFOs are processed. • Advances one measurement point only.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions measInstChMX100 Syntax int measInstChMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function measInstChMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function measInstChMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions measInstFIFOMX100 Syntax int measInstFIFOMX100(DAQMX100 daqmx100, int fifoNo); Declaration Parameters daqmx100 Specify the device descriptor. fifoNo Specify the FIFO number. Description Retrieve the instantaneous value of the specified FIFO number. • If the constant for “Specify all FIFO numbers” is specified for the FIFO numbers, all FIFOs are processed. • Performs other status changes.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions measStartMX100 Syntax int measStartMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function measStartMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Auto Function measStartMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions measStopMX100 Syntax int measStopMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function measStopMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function measStopMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions openMX100 Syntax DAQMX100 openMX100(const char * strAddress, int * errorCode); Declaration Visual Basic Public Declare Function openMX100 Lib "DAQMX100"(ByVal strAddress As String, ByRef errorCode As Long) As Long Visual Basic.NET Public Declare Ansi Function openMX100 Lib "DAQMX100"(ByVal strAddress As String, ByRef errorCode As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions readItemMX100 Syntax int readItemMX100(DAQMX100 daqmx100, int itemNo, char * strItem, int lenItem, int * realLen); Declaration Parameters daqmx100 Specify the device descriptor. itemNo strItem Specify the setup item number. Specify the field where the string is to be stored. lenItem realLen Specify the byte size of the field where the string is to be stored.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions reconstructMX100 Syntax int reconstructMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function reconstructMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function reconstructMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions sendConfigMX100 Syntax int sendConfigMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Sends the stored setup data. Return value Returns an error number. Error: Not descriptor No device descriptor. Reference CDAQMX100::sendConfig IM MX190-01E 17-43 17 Functions for the MX100 (Extended API) - Visual C/Visual Basic/Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setAlarmMX100 Syntax int setAlarmMX100(DAQMX100 daqmx100, int chNo, int levelNo, int iAlarmType, int value); Declaration Visual Basic Public Declare Function setAlarmMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal levelNo As Long, ByVal iAlarmType As Long, ByVal value As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setAlarmValueMX100 Syntax int setAlarmValueMX100(DAQMX100 daqmx100, int chNo, int levelNo, int iAlarmType, int valueON, int valueOFF); Declaration Parameters daqmx100 Specify the device descriptor. chNo levelNo Specify the channel number. Specify the alarm level. iAlarmType valueON Specify the alarm type. Specify the threshold level (ON value) for alarm activation.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setBurnoutMX100 Syntax int setBurnoutMX100(DAQMX100 daqmx100, int chNo, int iBurnout); Declaration Visual Basic Public Declare Function setBurnoutMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal iBurnout As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setCFWriteModeMX100 Syntax int setCFWriteModeMX100(DAQMX100 daqmx100, int iCFWriteMode); Declaration Parameters daqmx100 Specify the device descriptor. iCFWriteMode Specify the CF write mode. Description Sets the CF write mode. Return value Returns an error number. Error: Not descriptor No device descriptor.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setChatFilterMX100 Syntax int setChatFilterMX100(DAQMX100 daqmx100, int chNo, int bChatFilter); Declaration Visual Basic Public Declare Function setChatFilterMX100 Lib "DAQMX100" (ByVal daqmx100 As Long, ByVal chNo As Long, ByVal bChatFilter As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setChCommentMX100 Syntax int setChCommentMX100(DAQMX100 daqmx100, int chNo, const char * strComment); Declaration Parameters daqmx100 chNo Specify the device descriptor. Specify the channel number. strTag Specify the comment. Description Sets the comment to the specified channel number. • The specified string is, in general, an ASCII string. Return value Returns an error number.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setChDELTAMX100 Syntax int setChDELTAMX100(DAQMX100 daqmx100, int chNo, int refChNo, int iRange); Declaration Visual Basic Public Declare Function setChDELTAMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal refChNo As Long, ByVal iRange As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setChKindMX100 Syntax int setChKindMX100(DAQMX100 daqmx100, int chNo, int iKind, int refChNo); Declaration Parameters daqmx100 chNo Specify the device descriptor. Specify the channel number. iKind refChNo Specify the channel type. Specify the reference channel using a channel number. Description Sets the channel type to the specified channel numbers.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setChoiceMX100 Syntax int setChoiceMX100(DAQMX100 daqmx100, int outputNo, int idleChoice, int errorChoice, int presetValue); Declaration Visual Basic Public Declare Function setChoiceMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal outputNo As Long, ByVal idleChoice As Long, ByVal errorChoice As Long, ByVal presetValue As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setChRRJCMX100 Syntax int setChRRJCMX100(DAQMX100 daqmx100, int chNo, int refChNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo refChNo Specify the channel number. Specify the reference channel using a channel number. Description Sets the remote RJC on the specified channel number. • The span and alarm are set to the default values. Return value Returns an error number.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setChTagMX100 Syntax int setChTagMX100(DAQMX100 daqmx100, int chNo, const char * strTag); Declaration Visual Basic Public Declare Function setChTagMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal strTag As String) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setChUnitMX100 Syntax int setChUnitMX100(DAQMX100 daqmx100, int chNo, const char * strUnit); Declaration Parameters daqmx100 chNo Specify the device descriptor. Specify the channel number. strUnit Specify the unit name. Description Sets the unit name to the specified channel number. • The specified string is, in general, an ASCII string. Return value Returns an error number.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setDateTimeNowMX100 Syntax int setDateTimeNowMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function setDateTimeNowMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function setDateTimeNowMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setDeenergizeMX100 Syntax int setDeenergizeMX100(DAQMX100 daqmx100, int doNo, int bDeenergize); Declaration Parameters daqmx100 doNo Specify the device descriptor. Specify the data number. bDeenergize Specify de-energize using a valid/invalid value. Description Sets de-energize on the specified DO data number of the specified DO channel. Return value Returns an error number.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setDoubleAlarmMX100 Syntax int setDoubleAlarmMX100(DAQMX100 daqmx100, int chNo, int levelNo, int iAlarmType, double value); Declaration Visual Basic Public Declare Function setDoubleAlarmMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal levelNo As Long, ByVal iAlarmType As Long, ByVal value As Double) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setDoubleAlarmValueMX100 Syntax int setDoubleAlarmValueMX100(DAQMX100 daqmx100, int chNo, int levelNo, int iAlarmType, double valueON, double valueOFF) Declaration Parameters daqmx100 chNo Specify the device descriptor. Specify the channel number. levelNo iAlarmType Specify the alarm level. Specify the alarm type. valueON valueOFF Specify the threshold level (ON value) for alarm activation.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setDoubleChoiceMX100 Syntax int setDoubleChoiceMX100(DAQMX100 daqmx100, int outputNo, int idleChoice, int errorChoice, double presetValue); Declaration Visual Basic Public Declare Function setDoubleChoiceMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal outputNo As Long, ByVal idleChoice As Long, ByVal errorChoice As Long, ByVal presetValue As Double) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setDoubleHisterisysMX100 Syntax int setDoubleHisterisysMX100(DAQMX100 daqmx100, int chNo, int levelNo, double histerisys); Declaration Parameters daqmx100 Specify the device descriptor. chNo levelNo Specify the channel number. Specify the alarm level. histerisys Specify the hysteresis. Description Sets the hysteresis for the alarm level of the specified channel number.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setDoubleScaleMX100 Syntax int setDoubleScaleMX100(DAQMX100 daqmx100, int chNo, double scaleMin, double scaleMax, int scalePoint); Declaration Visual Basic Public Declare Function setDoubleScaleMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal scaleMin As Double, ByVal scaleMax As Double, ByVal scalePoint As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setDoubleSpanMX100 Syntax int setDoubleSpanMX100(DAQMX100 daqmx100, int chNo, double spanMin, double spanMax); Declaration Parameters daqmx100 chNo Specify the device descriptor. Specify the channel number. spanMin spanMax Specify the span minimum. Specify the span maximum. Description Sets the span to the specified channel number.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setFilterMX100 Syntax int setFilterMX100(DAQMX100 daqmx100, int chNo, int iFilter); Declaration Visual Basic Public Declare Function setFilterMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal iFilter As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setHisterisysMX100 Syntax int setHisterisysMX100(DAQMX100 daqmx100, int chNo, int levelNo, int histerisys); Declaration Parameters daqmx100 Specify the device descriptor. chNo levelNo Specify the channel number. Specify the alarm level. histerisys Specify the hysteresis. Description Sets the hysteresis for the alarm level of the specified channel number.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setHoldMX100 Syntax int setHoldMX100(DAQMX100 daqmx100, int doNo, int bHold); Declaration Visual Basic Public Declare Function setHoldMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal doNo As Long, ByVal bHold As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setIntegralMX100 Syntax int setIntegralMX100(DAQMX100 daqmx100, int moduleNo, int iIntegral); Declaration Parameters daqmx100 moduleNo Specify the device descriptor. Specify the module number. iIntegral Specify the type of A/D integral time. Description Sets the A/D integral time type on the module of the specified module number. Return value Returns an error number.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setIntervalMX100 Syntax int setIntervalMX100(DAQMX100 daqmx100, int moduleNo, int iInterval); Declaration Visual Basic Public Declare Function setIntervalMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal moduleNo As Long, ByVal iInterval As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setItemAllMX100 Syntax int setItemAllMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Sends the setup data collectively. Return value Returns an error number. Error: Not descriptor No device descriptor. Reference CDAQMX100::setItemAll IM MX190-01E 17-69 17 Functions for the MX100 (Extended API) - Visual C/Visual Basic/Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setOutputTypeMX100 Syntax int setOutputTypeMX100(DAQMX100 daqmx100, int outputNo, int iOutput); Declaration Visual Basic Public Declare Function setOutputTypeMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal outputNo As Long, ByVal iOutput As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setPulseTimeMX100 Syntax int setPulseTimeMX100(DAQMX100 daqmx100, int outputNo, int pulseTime); Declaration Parameters daqmx100 outputNo Specify the device descriptor. Specify the output channel (PWM data number). pulserTime Specify the integer multiple of the pulse interval. Description Sets the integer multiple of the pulse interval on the specified channel number.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setRangeMX100 Syntax int setRangeMX100(DAQMX100 daqmx100, int chNo, int iRange); Declaration Visual Basic Public Declare Function setRangeMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal iRange As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setRefAlarmMX100 Syntax int setRefAlarmMX100(DAQMX100 daqmx100, int doNo, int refChNo, int levelNo, int bValid); Declaration Parameters daqmx100 Specify the device descriptor. doNo refChNo Specify the data number. Specify the reference channel using a channel number. levelNo bValid Specify the alarm level. Specify the Boolean value.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setRJCTypeMX100 Syntax int setRJCTypeMX100(DAQMX100 daqmx100, int chNo, int iRJCType, int volt); Declaration Visual Basic Public Declare Function setRJCTypeMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal iRJCType As Long, ByVal volt As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setScaleMX100 Syntax int setScaleMX100(DAQMX100 daqmx100, int chNo, int scaleMin, int scaleMax, int scalePoint); Declaration Parameters daqmx100 Specify the device descriptor. chNo scaleMin Specify the channel number. Specify the scale minimum. scaleMax scalePoint Specify the scale maximum. Specify the decimal point position for scaling.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setSpanMX100 Syntax int setSpanMX100(DAQMX100 daqmx100, int chNo, int spanMin, int spanMax); Declaration Visual Basic Public Declare Function setSpanMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal spanMin As Long, ByVal spanMax As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setUnitNoMX100 Syntax int setUnitNoMX100(DAQMX100 daqmx100, int unitNo); Declaration Parameters daqmx100 Specify the device descriptor. unitNo Specify the unit number. Description Sets the unit number. Return value Returns an error number. Error: Not descriptor No device descriptor.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions setUnitTempMX100 Syntax int setUnitTempMX100(DAQMX100 daqmx100, int iTempUnit); Declaration Visual Basic Public Declare Function setUnitTempMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal iTempUnit As Long) As Long Visual Basic.NET Public Declare Ansi Function setUnitTempMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal iTempUnit As Integer) As Integer C# [DllImport("DAQMX100.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions switchBackupMX100 Syntax int switchBackupMX100(DAQMX100 daqmx100, int bBackup); Declaration Parameters daqmx100 Specify the device descriptor. bBackup Specify the Boolean value. Description Sets backup. Return value Returns an error number. Error: Not descriptor No device descriptor.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions switchDOMX100 Syntax int switchDOMX100(DAQMX100 daqmx100, int idDO, int bONOFF); Declaration Visual Basic Public Declare Function switchDOMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal idDO As Long, ByVal bONOFF As Long) As Long Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions switchTransmitMX100 Syntax int switchTransmitMX100(DAQMX100 daqmx100, int idTrans, int iTransmit); Declaration Parameters daqmx100 idTrans Specify the device descriptor. Specify the transmission output data identifier. iTransmit Specify the transmission status. Description Sends the transmission output data of the specified transmission output data identifier.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions updateAOPWMDataMX100 Syntax int updateAOPWMDataMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function updateAOPWMDataMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function updateAOPWMDataMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions updateBalanceMX100 Syntax int updateBalanceMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function updateBalanceMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function updateBalanceMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions updateConfigMX100 Syntax int updateConfigMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function updateConfigMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function updateConfigMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions updateDODataMX100 Syntax int updateDODataMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Updates the stored DO data. Return value Returns an error number. Error: Not descriptor No device descriptor. Reference CDAQMX100::updateDOData IM MX190-01E 17-85 17 Functions for the MX100 (Extended API) - Visual C/Visual Basic/Visual Basic.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions updateInfoChMX100 Syntax int updateInfoChMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function updateInfoChMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function updateInfoChMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions updateOutputMX100 Syntax int updateOutputMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Updates the stored output channel data. Return value Returns an error number. Error: Not descriptor No device descriptor.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions updateStatusMX100 Syntax int updateStatusMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function updateStatusMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function updateStatusMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions updateSystemMX100 Syntax int updateSystemMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Updates the stored system configuration data. Return value Returns an error number. Error: Not descriptor No device descriptor.
17.1 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions writeItemMX100 Syntax int writeItemMX100(DAQMX100 daqmx100, int itemNo, const char * strItem); Declaration Visual Basic Public Declare Function writeItemMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal itemNo As Long, ByVal strItem As String, ByVal) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/ Visual Basic.NET/C#) - Retrieval Functions This section describes the MX100 functions that are used in C and Visual Basic. The functions are listed in alphabetical order by the function name. 17 Most functions return an error number as a return value. Error number 0 is returned if there is no error. See page v “Conventions Used in This Manual” for more information about return values.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions addressPartMX100 Syntax int addressPartMX100(unsigned int address, int index); Declaration Visual Basic Public Declare Function addressPartMX100 Lib "DAQMX100"(ByVal address As Long, ByVal index As Long) As Long Visual Basic.NET Public Declare Ansi Function addressPartMX100 Lib "DAQMX100"(ByVal address As Integer, ByVal index As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions alarmDoubleHisterisysMX100 Syntax double alarmDoubleHisterisysMX100(DAQMX100 daqmx100, int chNo, int levelNo); Declaration Parameters daqmx100 chNo Specify the device descriptor. Specify the channel number. levelNo Specify the alarm level. Description Gets the specified channel number and alarm level hysteresis from the stored current channel setting data.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions alarmDoubleValueOFFMX100 Syntax double alarmDoubleValueOFFMX100(DAQMX100 daqmx100, int chNo, int levelNo); Declaration Visual Basic Public Declare Function alarmDoubleValueOFFMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal levelNo As Long) As Double Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions alarmDoubleValueONMX100 Syntax double alarmDoubleValueONMX100(DAQMX100DAQMX100 daqmx100, int chNo, int levelNo); Declaration Parameters daqmx100 chNo Specify the device descriptor. Specify the channel number. levelNo Specify the alarm level. Description Gets the specified channel number and alarm level alarm value (ON) from the stored current channel setting data.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions alarmHisterisysMX100 Syntax int alarmHisterisysMX100(DAQMX100 daqmx100, int chNo, int levelNo); Declaration Visual Basic Public Declare Function alarmHisterisysMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal levelNo As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions alarmMaxLengthMX100 Syntax int alarmMaxLengthMX100(void); Declaration Description Gets the maximum length of the alarm type. • The return value does not include the terminator. Return value Returns the length of the string. Reference CDAQMXDataInfo::getMaxLenAlarmName IM MX190-01E 17-97 17 Functions for the MX100 (Extended API) - Visual C/Visual Basic/Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions alarmTypeMX100 Syntax int alarmTypeMX100(DAQMX100 daqmx100, int chNo, int levelNo); Declaration Visual Basic Public Declare Function alarmTypeMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal levelNo As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions alarmValueOFFMX100 Syntax int alarmValueOFFMX100(DAQMX100 daqmx100, int chNo, int levelNo); Declaration Parameters daqmx100 chNo Specify the device descriptor. Specify the channel number. levelNo Specify the alarm level. Description Gets the specified channel number and alarm level alarm value (OFF) from the stored current channel setting data.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions alarmValueONMX100 Syntax int alarmValueONMX100(DAQMX100 daqmx100, int chNo, int levelNo); Declaration Visual Basic Public Declare Function alarmValueONMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal levelNo As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelBalanceValidMX100 Syntax int channelBalanceValidMX100(DAQMX100 daqmx100, int balanceNo); Declaration Parameters daqmx100 balanceNo Specify the device descriptor. Specify the initial balance data number. Description Gets valid/invalid for the specified initial balance data number from the stored current channel setting data. • If it does not exist, Invalid is returned.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelBalanceValueMX100 Syntax int channelBalanceValueMX100(DAQMX100 daqmx100, int balanceNo); Declaration Visual Basic Public Declare Function channelBalanceValueMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal balanceNo As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelBurnoutMX100 Syntax int channelBurnoutMX100(DAQMX100 daqmx100, int chNo); Declaration Long) As Long Lib As Integer) daqmx100, int Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the specified channel number and burnout type from the stored current channel setting data. • If it does not exist, Undetected is returned.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelChatFilterMX100 Syntax int channelChatFilterMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function channelChatFilterMX100 Lib "DAQMX100" (ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function channelChatFilterMX100 Lib "DAQMX100" (ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelDeenergizeMX100 Syntax int channelDeenergizeMX100(DAQMX100 daqmx100, int doNo); Declaration Parameters daqmx100 Specify the device descriptor. doNo Specify the data number. Description Gets the de-energize Boolean for the specified DO data number from the stored current channel setting data. • If it does not exist, Invalid is returned. Return value Returns a Boolean value.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelDisplayMaxMX100 Syntax double channelDisplayMaxMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function channelDisplayMaxMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Double Visual Basic.NET Public Declare Ansi Function channelDisplayMaxMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Double C# [DllImport("DAQMX100.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelDisplayMinMX100 Syntax double channelDisplayMinMX100(DAQMX100 daqmx100, int chNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the specified channel number and display minimum value from the stored current channel information data. • Returns 0.0 if it does not exist. Return value Returns the display minimum value.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelDoublePresetValueMX100 Syntax double channelDoublePresetValueMX100(DAQMX100 daqmx100, int outputNo); Declaration Visual Basic Public Declare Function channelDoublePresetValueMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal outputNo As Long) As Double Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelDoubleScaleMaxMX100 Syntax double channelDoubleScaleMaxMX100(DAQMX100 daqmx100, int chNo); Declaration Parameters daqmx100 chNo Specify the device descriptor. Specify the channel number. Description Gets the specified channel number and scale maximum value from the stored current channel setting data. • The return value is a floating point number including the decimal point position. • Returns 0.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelDoubleScaleMinMX100 Syntax double channelDoubleScaleMinMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function channelDoubleScaleMaxMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Double Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelDoubleSpanMaxMX100 Syntax double channelDoubleSpanMaxMX100(DAQMX100 daqmx100, int chNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the specified channel number and span maximum value from the stored current channel setting data. • The return value is a floating point number including the decimal point position. • Returns 0.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelDoubleSpanMinMX100 Syntax double channelDoubleSpanMinMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function channelDoubleSpanMinMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Double Visual Basic.NET Public Declare Ansi Function channelDoubleSpanMinMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Double C# [DllImport("DAQMX100.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelErrorChoiceMX100 Syntax int channelErrorChoiceMX100(DAQMX100 daqmx100, int outputNo); Declaration Long) As Lib As daqmx100, Parameters daqmx100 Specify the device descriptor. outputNo Specify the output channel data number. Description Gets selection value during error for the specified output channel data number from the stored current channel setting data.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelFIFOIndexMX100 Syntax int channelFIFOIndexMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function channelFIFOIndexMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function channelFIFOIndexMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelFIFONoMX100 Syntax int channelFIFONoMX100(DAQMX100 daqmx100, int chNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the FIFO number of the specified channel number from the stored current channel information data. • Returns a negative value if it does not exist. Return value Returns the FIFO number.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelFilterMX100 Syntax int channelFilterMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function channelFilterMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function channelFilterMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelHoldMX100 Syntax int channelHoldMX100(DAQMX100 daqmx100, int doNo); Declaration Parameters daqmx100 Specify the device descriptor. doNo Specify the data number. Description Gets the hold Boolean for the specified DO data number from the stored current channel setting data. • If it does not exist, Invalid is returned. Return value Returns a Boolean value.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelIdleChoiceMX100 Syntax int channelIdleChoiceMX100(DAQMX100 daqmx100, int outputNo); Declaration Visual Basic Public Declare Function channelIdleChoiceMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal outputNo As Long) As Long Visual Basic.NET Public Declare Ansi Function channelIdleChoiceMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal outputNo As Integer) As Integer C# [DllImport("DAQMX100.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelKindMX100 Syntax int channelKindMX100(DAQMX100 daqmx100, int chNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the channel type of the specified channel number from the stored current channel setting. • If it does not exist, “Unused” is returned. Return value Returns the channel type.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelNumberMX100 Syntax int channelNumberMX100(DAQMX100 daqmx100, int fifoNo, int fifoIndex); Declaration Visual Basic Public Declare Function channelNumberMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal fifoNo As Long, ByVal fifioIndex As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelOutputTypeMX100 Syntax int channelOutputTypeMX100(DAQMX100 daqmx100, int outputNo); Declaration Parameters daqmx100 Specify the device descriptor. outputNo Specify the output channel data number. Description Gets output type for the specified output channel data number from the stored current channel setting data. • If it does not exist, “No output” is returned.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelPointMX100 Syntax int channelPointMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function channelPointMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function channelPointMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelPresetValueMX100 Syntax int channelPresetValueMX100(DAQMX100 daqmx100, int outputNo); Declaration Long) As Lib As daqmx100, Parameters daqmx100 Specify the device descriptor. outputNo Specify the output channel data number. Description Gets the user specified output value for the specified output channel data number from the stored current channel setting data.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelPulseTimeMX100 Syntax int channelPulseTimeMX100(DAQMX100 daqmx100, int outputNo); Declaration Visual Basic Public Declare Function channelPulseTimeMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal outputNo As Long) As Long Visual Basic.NET Public Declare Ansi Function channelPulseTimeMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal outputNo As Integer) As Integer C# [DllImport("DAQMX100.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelRangeMX100 Syntax int channelRangeMX100(DAQMX100 daqmx100, int chNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the range type of the specified channel number from the stored current channel setting. • If it does not exist, the SKIP (unused) range type gets the same handling. See the channel status.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelRealMaxMX100 Syntax double channelRealMaxMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function channelRealMaxMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Double Visual Basic.NET Public Declare Ansi Function channelRealMaxMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Double C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelRealMinMX100 Syntax double channelRealMinMX100(DAQMX100 daqmx100, int chNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the actual range minimum value of the specified channel number from the stored current channel information data. • Returns 0.0 if it does not exist. Return value Returns the actual range minimum value.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelRefAlarmMX100 Syntax int channelRefAlarmMX100(DAQMX100 daqmx100, int doNo, int refChNo, int levelNo); Declaration Visual Basic Public Declare Function channelRefAlarmMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal doNo As Long, ByVal refChNo As Long, ByVal levelNo As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelRefChNoMX100 Syntax int channelRefChNoMX100(DAQMX100 daqmx100, int chNo); Declaration Long) As Long Lib As Integer) daqmx100, int Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the reference channel number of the specified channel number from the stored current channel setting data.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelRJCTypeMX100 Syntax int channelRJCTypeMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function channelRJCTypeMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Visual Basic.NET Public Declare Ansi Function channelRJCTypeMX100 "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelRJCVoltMX100 Syntax int channelRJCVoltMX100(DAQMX100 daqmx100, int chNo); Declaration Long) As Long Lib As Integer) daqmx100, int Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the RJC voltage value of the specified channel number from the stored current channel setting data. • Returns 0 if it does not exist.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelScaleMaxMX100 Syntax int channelScaleMaxMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function channelScaleMaxMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function channelScaleMaxMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelScaleMinMX100 Syntax int channelScaleMinMX100(DAQMX100 daqmx100, int chNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the scale minimum value of the specified channel number from the stored current channel setting data. • The return value is an integer excluding the decimal point position. • Returns 0 if it does not exist.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelScaleTypeMX100 Syntax int channelScaleTypeMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function channelScaleTypeMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function channelScaleTypeMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelSpanMaxMX100 Syntax int channelSpanMaxMX100(DAQMX100 daqmx100, int chNo); Declaration Long) As Long Lib As Integer) daqmx100, int Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the span maximum value of the specified channel number from the stored current channel setting data.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelSpanMinMX100 Syntax int channelSpanMinMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function channelSpanMinMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Visual Basic.NET Public Declare Ansi Function channelSpanMinMX100 "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelValidMX100 Syntax int channelValidMX100(DAQMX100 daqmx100, int chNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the channel status of the specified channel number from the stored current channel setting data as a Boolean. • If it does not exist, Invalid is returned. Return value Returns a Boolean value.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions currentAOPWMValidMX100 Syntax int currentAOPWMValidMX100(DAQMX100 daqmx100, int aopwmNo); Declaration Visual Basic Public Declare Function currentAOPWMValidMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal aopwmNo As Long Visual Basic.NET Public Declare Ansi Function currentAOPWMValidMX100 "DAQMX100"(ByVal daqmx100 As Integer, ByVal aopwmNo Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions currentAOPWMValueMX100 Syntax int currentAOPWMValueMX100(DAQMX100 daqmx100, int aopwmNo); Declaration Long) As Lib As daqmx100, Parameters daqmx100 Specify the device descriptor. aopwmNo Specify the AO/PWM data number. Description Gets the output data value of the specified AO/PWM data number from the stored current AO/PWM data. • Returns 0 if it does not exist.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions currentBalanceResultMX100 Syntax int currentBalanceResultMX100(DAQMX100 daqmx100, int balanceNo); Declaration Visual Basic Public Declare Function currentBalanceResultMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal balanceNo As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions currentBalanceValidMX100 Syntax int currentBalanceValidMX100(DAQMX100 daqmx100, int balanceNo); Declaration Parameters daqmx100 balanceNo Specify the device descriptor. Specify the initial balance data number. Description Gets the Invalid/Valid Boolean value for the specified initial balance data number from the stored current initial balance data. • If it does not exist, Invalid is returned.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions currentBalanceValueMX100 Syntax int currentBalanceValueMX100(DAQMX100 daqmx100, int balanceNo); Declaration Visual Basic Public Declare Function currentBalanceValueMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal balanceNo As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions currentDoubleAOPWMValueMX100 Syntax double currentDoubleAOPWMValueMX100(DAQMX100 daqmx100, int aopwmNo); Declaration Parameters daqmx100 aopwmNo Specify the device descriptor. Specify the AO/PWM data number. Description Gets the actual output value of the output data value of the specified AO/PWM data number from the stored current AO/PWM data. • Returns 0.0 if it does not exist.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions currentDOValidMX100 Syntax int currentDOValidMX100(DAQMX100 daqmx100, int doNo); Declaration Visual Basic Public Declare Function currentDOValidMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal doNo As Visual Basic.NET Public Declare Ansi Function currentDOValidMX100 "DAQMX100"(ByVal daqmx100 As Integer, ByVal doNo As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions currentDOValueMX100 Syntax int currentDOValueMX100(DAQMX100 daqmx100, int doNo); Declaration Long) As Long Lib As Integer) daqmx100, int Parameters daqmx100 Specify the device descriptor. doNo Specify the data number. Description Gets ON/OFF for the specified DO data number from the stored current DO data as a Boolean value. • If it does not exist, Invalid is returned.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions currentTransmitMX100 Syntax int currentTransmitMX100(DAQMX100 daqmx100, int aopwmNo); Declaration Visual Basic Public Declare Function currentTransmitMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal aopwmNo As Long) As Long Visual Basic.NET Public Declare Ansi Function currentTransmitMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal aopwmNo As Integer) As Integer C# [DllImport("DAQMX100.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataAlarmMX100 Syntax int dataAlarmMX100(DAQMX100 daqmx100, int chNo, int levelNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo levelNo Specify the channel number. Specify the alarm level. Description Gets the valid/invalid value of the alarm corresponding to the alarm level for the specified channel number from the stored current measured data.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataDayMX100 Syntax int dataDayMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function dataDayMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function dataDayMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataDoubleValueMX100 Syntax double dataDoubleValueMX100(DAQMX100 daqmx100, int chNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the measured value of the specified channel number from the stored current measured data. • Returns 0.0 if it does not exist.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataHourMX100 Syntax int dataHourMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function dataHourMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function dataHourMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataMilliSecMX100 Syntax int dataMilliSecMX100(DAQMX100 daqmx100, int chNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the milliseconds of the specified channel number from the stored current time information data. • Returns 0 if it does not exist. Return value Returns the milliseconds value.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataMinuteMX100 Syntax int dataMinuteMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function dataMinuteMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function dataMinuteMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataMonthMX100 Syntax int dataMonthMX100(DAQMX100 daqmx100, int chNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the month of the specified channel number from the stored current time information data. • The month is a number from 1 to 12. • Returns 0 if it does not exist. Return value Returns the month value.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataNumChMX100 Syntax int dataNumChMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function dataNumChMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function dataNumChMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataNumFIFOMX100 Syntax int dataNumFIFOMX100(DAQMX100 daqmx100, int fifoNo); Declaration Parameters daqmx100 Specify the device descriptor. fifoNo Specify the FIFO number. Description Gets the specified number of remaining data from the current status data of the specified FIFO number from among the data that is acquired and stored by a data retrieval function.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataSecondMX100 Syntax int dataSecondMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function dataSecondMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function dataSecondMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataStatusMX100 Syntax int dataStatusMX100(DAQMX100 daqmx100, int chNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the data status value of the specified channel number from the stored current measured data. • If it does not exist, “Unknown status” is returned. Return value Returns the data status value.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataStringValueMX100 Syntax int dataStringValueMX100(DAQMX100 daqmx100, int chNo, char * strValue, int lenValue); Declaration Visual Basic Public Declare Function dataStringValueMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal strValue As String, ByVal lenValue As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataTimeMX100 Syntax int dataTimeMX100(DAQMX100 daqmx100, int chNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the seconds of the specified channel number from the stored current time information data. • This is the number of seconds from the reference date/time (Jan. 1, 1970). • Returns 0 if it does not exist.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataValidMX100 Syntax int dataValidMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function dataValidMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function dataValidMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataValueMX100 Syntax int dataValueMX100(DAQMX100 daqmx100, int chNo); Declaration Parameters daqmx100 Specify the device descriptor. chNo Specify the channel number. Description Gets the data value of the specified channel number from the stored current measured data. • Returns 0 if it does not exist. Return value Returns the data value.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataYearMX100 Syntax int dataYearMX100(DAQMX100 daqmx100, int chNo); Declaration Visual Basic Public Declare Function dataYearMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function dataYearMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions errorMaxLengthMX100 Syntax int errorMaxLengthMX100(void); Declaration Description Gets the maximum length of the error message string. • The return value does not include the terminator. Return value Returns the length of the string. Reference CDAQMX100::getMaxLenErrorMessage IM MX190-01E 17-163 17 Functions for the MX100 (Extended API) - Visual C/Visual Basic/Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions getAlarmNameMX100 [Visual C only] Syntax const char * getAlarmNameMX100(int iAlarmType); Parameters iAlarmType Specify the alarm type. Description Gets the string corresponding to the specified alarm type. • If it does not exist, returns the pointer to the string corresponding to “No alarm.” Return value Returns a pointer to the string.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions getChannelCommentMX100 [Visual C only] Syntax const char * getChannelCommentMX100(DAQMX100 daqmx100, int chNo); Parameters Specify the device descriptor. Specify the channel number. 17 Description Gets the specified channel number and comment from the stored current channel setting data. • Returns NULL if it does not exist. Return value Returns a pointer to the string.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions getChannelTagMX100 [Visual C only] Syntax const char * getChannelTagMX100(DAQMX100 daqmx100, int chNo); Parameters daqmx100 chNo Specify the device descriptor. Specify the channel number. Description Gets the specified channel number and tag from the stored current channel setting data. • Returns NULL if it does not exist. Return value Returns a pointer to the string.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions getChannelUnitMX100 [Visual C only] Syntax const char * getChannelUnitMX100(DAQMX100 daqmx100, int chNo); Parameters daqmx100 chNo Specify the device descriptor. Specify the channel number. 17 Gets the specified channel number and unit name from the stored current channel setting data. • Returns NULL if it does not exist. Return value Returns a pointer to the string.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions getErrorMessageMX100 [Visual C only] Syntax const char * getErrorMessageMX100(int errorCode); Parameters errorCode Specify the error number. Description Gets the error message string corresponding to the specified error number. • Returns a pointer to the string [Unknown] if it does not exist. Return value Returns a pointer to the string.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions getModuleSerialMX100 [Visual C only] Syntax const char * getModuleSerialMX100(DAQMX100 daqmx100, int moduleNo); Parameters Specify the device descriptor. Specify the module number. 17 Functions for the MX100 (Extended API) - Visual C/Visual Basic/Visual Basic.NET/C# - daqmx100 moduleNo Description Gets the serial number of the specified module number from the stored current system configuration data.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions getNetHostMX100 [Visual C only] Syntax const char * getNetHostMX100(DAQMX100 daqmx100); Parameters daqmx100 Specify the device descriptor. Description Gets the host name from the stored current network information data. • Returns NULL if it does not exist. Return value Returns a pointer to the string.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions getUnitPartNoMX100 [Visual C only] Syntax const char * getUnitPartNoMX100(DAQMX100 daqmx100); Parameters daqmx100 Specify the device descriptor. 17 Description Functions for the MX100 (Extended API) - Visual C/Visual Basic/Visual Basic.NET/C# - Gets the part number from the stored current system configuration data. • Returns NULL if it does not exist. Return value Returns a pointer to the string.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions getUnitSerialMX100 [Visual C only] Syntax const char * getUnitSerialMX100(DAQMX100 daqmx100); Parameters daqmx100 Specify the device descriptor. Description Gets the unit’s serial number from the stored current system configuration data. • Returns NULL if it does not exist. Return value Returns a pointer to the string.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions itemErrorMX100 Syntax int itemErrorMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Gets the setup item number on which an error was last detected. • If it does not exist, “Unknown” is returned. Return value Returns the setting item number.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions itemMaxLengthMX100 Syntax int itemMaxLengthMX100(void); Declaration Visual Basic Public Declare Function itemMaxLengthMX100 Lib "DAQMX100"() As Long Visual Basic.NET Public Declare Ansi Function itemMaxLengthMX100 Lib "DAQMX100"() As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions lastErrorMX100 Syntax int lastErrorMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Gets the MX-specific error received in the last communication. • Returns 0 if it does not exist. Return value Returns the MX-specific error.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions moduleChNumMX100 Syntax int moduleChNumMX100(DAQMX100 daqmx100, int moduleNo); Declaration Visual Basic Public Declare Function moduleChNumMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal moduleNo As Long) As Long Visual Basic.NET Public Declare Ansi Function moduleChNumMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal moduleNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions moduleFIFONoMX100 Syntax int moduleFIFONoMX100(DAQMX100 daqmx100, int moduleNo); Declaration Parameters daqmx100 Specify the device descriptor. moduleNo Specify the module number. Description Gets the FIFO number of the specified module number from the stored current system configuration data. • Returns a negative number if it does not exist. Return value Returns the FIFO number.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions moduleIntegralMX100 Syntax int moduleIntegralMX100(DAQMX100 daqmx100, int moduleNo); Declaration Visual Basic Public Declare Function moduleIntegralMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal moduleNo As Long) As Long Visual Basic.NET Public Declare Ansi Function moduleIntegralMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal moduleNo As Integer) As Integer C# [DllImport("DAQMX100.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions moduleIntervalMX100 Syntax int moduleIntervalMX100(DAQMX100 daqmx100, int moduleNo); Declaration Parameters daqmx100 Specify the device descriptor. moduleNo Specify the module number. Description Gets the interval type of the specified module number from the stored current system configuration data. • Returns 0 if it does not exist. Return value Returns the interval type.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions moduleRealTypeMX100 Syntax int moduleRealTypeMX100(DAQMX100 daqmx100, int moduleNo); Declaration Visual Basic Public Declare Function moduleRealTypeMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal moduleNo As Long) As Long Visual Basic.NET Public Declare Ansi Function moduleRealTypeMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal moduleNo As Integer) As Integer C# [DllImport("DAQMX100.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions moduleStandbyTypeMX100 Syntax int moduleStandbyTypeMX100(DAQMX100 daqmx100, int moduleNo); Declaration Parameters daqmx100 Specify the device descriptor. moduleNo Specify the module number. Description Gets the startup module type of the specified module number from the stored current system configuration data. • If it does not exist, “No module” is returned. Return value Returns the module type.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions moduleTerminalMX100 Syntax int moduleTerminalMX100(DAQMX100 daqmx100, int moduleNo); Declaration Visual Basic Public Declare Function moduleTerminalMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal moduleNo As Long) As Long Visual Basic.NET Public Declare Ansi Function moduleTerminalMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal moduleNo As Integer) As Integer C# [DllImport("DAQMX100.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions moduleTypeMX100 Syntax int moduleTypeMX100(DAQMX100 daqmx100, int moduleNo); Declaration Parameters daqmx100 Specify the device descriptor. moduleNo Specify the module number. Description Gets the module type of the specified module number from the stored current system configuration data. • If it does not exist, “No module” is returned. Return value Returns the module type.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions moduleValidMX100 Syntax int moduleValidMX100(DAQMX100 daqmx100, int moduleNo); Declaration Visual Basic Public Declare Function moduleValidMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal moduleNo As Long) As Long Visual Basic.NET Public Declare Ansi Function moduleValidMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal moduleNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions moduleVersionMX100 Syntax int moduleVersionMX100(DAQMX100 daqmx100, int moduleNo); Declaration Parameters daqmx100 Specify the device descriptor. moduleNo Specify the module number. Description Gets the module version of the specified module number from the stored current system configuration data. • Returns 0 if it does not exist. Return value Returns the version.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions netAddressMX100 Syntax unsigned int netAddressMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function netAddressMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function netAddressMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions netGatewayMX100 Syntax unsigned int netGatewayMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Gets the Gateway address from the stored current network information data. • Returns 0 if it does not exist. Return value Returns the Gateway address.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions netPortMX100 Syntax unsigned int netPortMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function netPortMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function netPortMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions netSubmaskMX100 Syntax unsigned int netSubmaskMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Gets the subnet mask from the stored current network information data. • Returns 0 if it does not exist. Return value Returns the subnet mask.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions rangePointMX100 Syntax int rangePointMX100(DAQMX100 daqmx100, int iRange); Declaration Visual Basic Public Declare Function rangePointMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal iRange As Long) As Long Visual Basic.NET Public Declare Ansi Function rangePointMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal iRange As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions revisionAPIMX100 Syntax const int revisionAPIMX100(void); Declaration Description Gets the revision number of this API. Return value Returns the revision number. Reference CDAQMX100::getRevisionAPIMX IM MX190-01E 17-191 17 Functions for the MX100 (Extended API) - Visual C/Visual Basic/Visual Basic.NET/C# - Visual Basic Public Declare Function revisionAPIMX100 Lib "DAQMX100"() As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusBackupMX100 Syntax int statusBackupMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function statusBackupMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function statusBackupMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusCFMX100 Syntax int statusCFMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function statusCFMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function statusCFMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusCFRemainMX100 Syntax int statusCFRemainMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function statusCFRemainMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function statusCFRemainMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusCFSizeMX100 Syntax int statusCFSizeMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Gets the size of the CF from the stored current status data. • The unit is KB. • Returns 0 if it does not exist. Return value Returns the size.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusDayMX100 Syntax int statusDayMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function statusDayMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function statusDayMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusFIFOIntervalMX100 Syntax int statusFIFOIntervalMX100(DAQMX100 daqmx100, int fifoNo); Declaration Parameters daqmx100 Specify the device descriptor. fifoNo Specify the FIFO number. Description Gets the interval type of the specified FIFO number from the stored current status data. • Returns 0 if it does not exist. Return value Returns the interval type.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusFIFOMX100 Syntax int statusFIFOMX100(DAQMX100 daqmx100, int fifoNo); Declaration Visual Basic Public Declare Function statusFIFOMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal fifoNo As Long) As Long Visual Basic.NET Public Declare Ansi Function statusFIFOMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal fifoNo As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusFIFONumMX100 Syntax int statusFIFONumMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function statusFIFONumMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function statusFIFONumMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusHourMX100 Syntax int statusHourMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function statusHourMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function statusHourMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusMilliSecMX100 Syntax int statusMilliSecMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Gets the milliseconds from the stored current status data. • Returns 0 if it does not exist. Return value Returns the milliseconds value.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusMinuteMX100 Syntax int statusMinuteMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function statusMinuteMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function statusMinuteMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusMonthMX100 Syntax int statusMonthMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Gets the month from the stored current status data. • Converts the number of seconds from the reference date/time and returns the result. • The month is a number from 1 to 12. • Returns 0 if it does not exist. Return value Returns the month value.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusSecondMX100 Syntax int statusSecondMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function statusSecondMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function statusSecondMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusTimeMX100 Syntax int statusTimeMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Gets the seconds from the stored current status data. • This is the number of seconds from the reference date/time (Jan. 1, 1970). • Returns 0 if it does not exist. Return value Returns seconds.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusUnitMX100 Syntax int statusUnitMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function statusUnitMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function statusUnitMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusYearMX100 Syntax int statusYearMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Gets the year from the stored current status data. • Converts the number of seconds from the reference date/time and returns the result. • The year is a 4-digit number. • Returns 0 if it does not exist. Return value Returns the year value.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toAlarmNameMX100 Syntax int toAlarmNameMX100(int iAlarmType, char * strAlarm, int lenAlarm); Declaration Visual Basic Public Declare Function toAlarmNameMX100 Lib "DAQMX100"(ByVal iAlarmType As Long, ByVal strAlarm As String, ByVal lenAlarm As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toAOPWMValueMX100 Syntax int toAOPWMValueMX100(double realValue, int iRangeAOPWM); Declaration Parameters realValue Specify the actual output value. iRangeAOPWM Specify the range type. Description Converts the actual output values to AO/PWM data output data values according to the specified range type. • Valid range types are AO and PWM. • Returns 0 if it does not exist.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toChannelCommentMX100 Syntax int toChannelCommentMX100(DAQMX100 daqmx100, int chNo, char * strComment, int lenComment); Declaration Visual Basic Public Declare Function toChannelCommentMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal strComment As String, ByVal lenComment As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toChannelTagMX100 Syntax int toChannelTagMX100(DAQMX100 daqmx100, int chNo, char * strTag, int lenTag); Declaration Parameters daqmx100 chNo Specify the device descriptor. Specify the channel number. strTag lenTag Specify the field where the string is to be stored. Specify the byte size of the field where the string is to be stored.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toChannelUnitMX100 Syntax int toChannelUnitMX100(DAQMX100 daqmx100, int chNo, char * strUnit, int lenUnit); Declaration Visual Basic Public Declare Function toChannelUnitMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal chNo As Long, ByVal strUnit As String, ByVal lenUnit As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toDoubleValueMX100 Syntax double toDoubleValueMX100(int dataValue, int point); Declaration Parameters dataValue Specify the data value. point Specify the decimal point position. Description Generates the measured value from the specified data value and decimal point position. Return value Returns the measured value as a double-precision floating number.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toErrorMessageMX100 Syntax int toErrorMessageMX100(int errorCode, char * errStr, int errLen); Declaration Visual Basic Public Declare Function toErrorMessageMX100 Lib "DAQMX100"(ByVal errorCode As Long, ByVal errStr As String, ByVal errLen As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toItemNameMX100 Syntax int toItemNameMX100(int itemNo, char * strItem, int lenItem); Declaration Parameters itemNo Specify the setup item number. strItem lenItem Specify the field where the string is to be stored. Specify the byte size of the field where the string is to be stored. Description Stores the name string corresponding to the specified setup item number to the specified field.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toItemNoMX100 Syntax int toItemNoMX100(const char * strItem); Declaration Visual Basic Public Declare Function toItemNoMX100 Lib "DAQMX100"(ByVal strItem As String) As Long Visual Basic.NET Public Declare Ansi Function toItemNoMX100 Lib "DAQMX100"(ByVal strItem As String) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toModuleSerialMX100 Syntax int toModuleSerialMX100(DAQMX100 daqmx100, int moduleNo, char * strSerial, int lenSerial); Declaration Parameters daqmx100 Specify the device descriptor. moduleNo strSerial Specify the module number. Specify the field where the string is to be stored. lenSerial Specify the byte size of the field where the string is to be stored.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toNetHostMX100 Syntax int toNetHostMX100(DAQMX100 daqmx100, char * strHost, int lenHost); Declaration Visual Basic Public Declare Function toNetHostMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal strHost As String, ByVal lenHost As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toRealValueMX100 Syntax double toRealValueMX100(int iAOPWMValue, int iRangeAOPWM); Declaration Parameters iAOPWMValue Specify the output data value. iRangeAOPWM Specify the range type. Description Converts the output data of AO/PWM data to actual output values according to the specified range type. • Valid range types are AO and PWM. • Returns 0.0 if it does not exist.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toStringValueMX100 Syntax int toStringValueMX100(int dataValue, int point, char * strValue, int lenValue); Declaration Visual Basic Public Declare Function toStringValueMX100 Lib "DAQMX100"(ByVal dataValue As Long, ByVal point As Long, ByVal strValue As String, ByVal lenValue As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toStyleVersionMX100 Syntax int toStyleVersionMX100(int style) Declaration Visual Basic Public Declare Function toStyleVersionMX100 Lib "DAQMX100"(ByVal style As Long) As Long Visual Basic.NET Public Declare Ansi Function toStyleVersionMX100 Lib "DAQMX100"(ByVal style As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toUnitPartNoMX100 Syntax int toUnitPartNoMX100(DAQMX100 daqmx100, char * strPartNo, int lenPartNo); Declaration Visual Basic Public Declare Function toUnitPartNoMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal strPartNo As String, ByVal lenPartNo As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toUnitSerialMX100 Syntax int toUnitSerialMX100(DAQMX100 daqmx100, char * strSerial, int lenSerial); Declaration Parameters daqmx100 strSerial Specify the device descriptor. Specify the field where the string is to be stored. lenSerial Specify the byte size of the field where the string is to be stored. Description Gets the unit’s serial number from the stored current system configuration data.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions unitCFWriteModeMX100 Syntax int unitCFWriteModeMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function unitCFWriteModeMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function unitCFWriteModeMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions unitFrequencyMX100 Syntax int unitFrequencyMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function unitFrequencyMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function unitFrequencyMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions unitMACMX100 Syntax int unitMACMX100(DAQMX100 daqmx100, int index); Declaration Visual Basic Public Declare Function unitMACMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal index As Long) As Long Visual Basic.NET Public Declare Ansi Function unitMACMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer, ByVal index As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions unitNoMX100 Syntax int unitNoMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Gets the unit number from the stored current system configuration data. • Returns 0 if it does not exist. Return value Returns the unit number.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions unitOptionMX100 Syntax int unitOptionMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function unitOptionMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function unitOptionMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions unitStyleMX100 Syntax int unitStyleMX100(DAQMX100 daqmx100); Declaration Parameters daqmx100 Specify the device descriptor. Description Gets the style from the stored current system configuration data. • Returns 0 if it does not exist. Return value Returns the style value.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions unitTempMX100 Syntax int unitTempMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function unitTempMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function unitTempMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions unitTypeMX100 Syntax int unitTypeMX100(DAQMX100 daqmx100); Declaration Visual Basic Public Declare Function unitTypeMX100 Lib "DAQMX100"(ByVal daqmx100 As Long) As Long Visual Basic.NET Public Declare Ansi Function unitTypeMX100 Lib "DAQMX100"(ByVal daqmx100 As Integer) As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions userAOPWMValidMX100 Syntax int userAOPWMValidMX100(DAQMX100 daqmx100, int idAOPWM, int aopwmNo); Declaration Visual Basic Public Declare Function userAOPWMValidMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal idAOPWM As Long, ByVal aopwmNo As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions userAOPWMValueMX100 Syntax int userAOPWMValueMX100(DAQMX100 daqmx100, int idAOPWM, int aopwmNo); Declaration Parameters daqmx100 idAOPWM Specify the device descriptor. Specify the AO/PWM data identifier. aopwmNo Specify the AO/PWM data number. Description Gets the output data value of the specified AO/PWM data number from the AO/ PWM data of the specified AO/PWM data identifier.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions userBalanceValidMX100 Syntax int userBalanceValidMX100(DAQMX100 daqmx100, int idBalance, int balanceNo); Declaration Visual Basic Public Declare Function userBalanceValidMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal idBalance As Long, ByVal balanceNo As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions userBalanceValueMX100 Syntax int userBalanceValueMX100(DAQMX100 daqmx100, int idBalance, int balanceNo); Declaration Parameters daqmx100 idBalance Specify the device descriptor. Specify the initial balance data identifier. balanceNo Specify the initial balance data number.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions userDoubleAOPWMValueMX100 Syntax double userDoubleAOPWMValueMX100(DAQMX100 daqmx100, int idAOPWM, int aopwmNo); Declaration Visual Basic Public Declare Function userDoubleAOPWMValueMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal idAOPWM As Long, ByVal aopwmNo As Long) As Double Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions userDOValidMX100 Syntax int userDOValidMX100(DAQMX100a daqmx100, int idDO, int doNo); Declaration Parameters daqmx100 Specify the device descriptor. idDO doNo Specify the DO data identifier. Specify the DO data number. Description Gets valid/invalid of the specified DO data number from the DO data of the specified DO data identifier as a Boolean value. • If it does not exist, Invalid is returned.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions userDOValueMX100 Syntax int userDOValueMX100(DAQMX100 daqmx100, int idDO, int doNo); Declaration Visual Basic Public Declare Function userDOValueMX100 Lib "DAQMX100"(ByVal daqmx100 As Long, ByVal idDO As Long, ByVal doNo As Long) As Long Visual Basic.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions userTransmitMX100 Syntax int userTransmitMX100(DAQMX100 daqmx100, int idTrans, int aopwmNo); Declaration Parameters daqmx100 idTrans Specify the device descriptor. Specify the transmission output data identifier. aopwmNo Specify the AO/PWM data number.
17.2 Details of Function - MX00 (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions versionAPIMX100 Syntax const int versionAPIMX100(void); Declaration Visual Basic Public Declare Function versionAPIMX100 Lib "DAQMX100"() As Long Visual Basic.NET Public Declare Ansi Function versionAPIMX100 Lib "DAQMX100"() As Integer C# [DllImport("DAQMX100.dll" CharSet=CharSet.Auto, EntryPoint="versionAPIMX100")] public static extern int versionAPIMX100(); Description Gets the version number of this API.
Chapter 18 MX100 Constants and Types for Extended API - Visual Basic - 18.1 Overview of the MX100 Constants This Extended API provides the following types of constants. The data types below are provided. In Visual C/Visual C++, the constants from chapter 6 are inherited. Also, constants and range type constants have been added for the Extended API. See section 18.2. The constants for Visual Basic and Visual Basic.NET/C# are listed in section 18.2.
18.1 Overview of the MX100 Constants Type Range types Reference range Skip DC voltage range types TC range types RTD (1 mA) range RTD (2 mA) range RTD (other ) range Resistance range Digital input (DI) range Digital input (DI) detailed ranges Strain range AO range PWM range 18-2 Description Page See the measurement range of the channels undergoing difference between channels computation for the measurement range of the reference channel. Not used 20 mV, etc. Type R, etc. Pt100, etc. Pt100, etc.
18.2 MX100 Constants This section describes the mnemonic and the meaning of the constants. For the details on the MX100 functions, see the relevant user’s manual. Visual C/Visual C++ Constants 18 Constant Mnemonic Description DAQMX_LIST_ALL DAQMX_LIST_CURRENT Specifies all data identifiers. Specifies the current data when copying. See also “Constants” in section 6.2. Range Types This Extended API defines bits that differentiate between the specially-defined ranges and the existing ranges.
18.2 MX100 Constants Constants for Visual Basic and Visual Basic.NET/C# This section describes the mnemonics for and meanings of the constants. For the details on the MX100 functions, see the relevant user’s manual. In C#, it is the constant data for the DAQMX100 class. Prefix each constant with CDAQMX100. (Ex.: CDAQMX100.DAQMX_COMMPORT). Numbers Mnemonic DAQMX100_NUMMODULE DAQMX100_NUMCHANNEL DAQMX100_NUMDO DAQMX100_NUMFIFO DAQMX100_NUMALARM Description The number of modules. The number of channels.
18.2 MX100 Constants Constants Mnemonic DAQMX100_INSTANTANEOUS DAQMX100_REFCHNO_ALL DAQMX100_LEVELNO_ALL DAQMX100_DONO_ALL DAQMX100_SEGMENTNO_ALL Boolean Value (valid/invalid) Mnemonic DAQMX100_VALID_OFF DAQMX100_VALID_ON Description Invalid (OFF) value. Valid (ON) value.
18.2 MX100 Constants Alarm Types ◊ indicates a space.
18.
18.
18.
18.
18.
18.2 MX100 Constants Digital Input (DI) Range Types The detailed range of digital input is used for the digital input range. If specification is made regardless of the module range, the following is used. Mnemonic DAQMX_RANGE_DI_LEVEL DAQMX_RANGE_DI_CONTACT Description Level Setting range 0: Less than 2.4 V, 1: Greater than or equal to 2.4 V Contact input 0: open, 1: close Skip You can specify the following definition for the special range setting.
18.2 MX100 Constants TC Ranges DAQMX100_RANGE_TC_XK Description Setting range R 0.0 to 1760.0°C S 0.0 to 1760.0°C B 0.0 to 1820.0°C K –200.0 to 1370.0°C E –200.0 to 800.0°C J –200.0 to 1100.0°C T –200.0 to 400.0°C N 0.0 to 1300.0°C W 0.0 to 2315.0°C L –200.0 to 900.0°C U –200.0 to 400.0°C KpAu7Fe 0.0 to 300.0K PLATINEL 0.0 to 1400.0°C PR40-20 0.0 to 1900.0°C NiNiMo 0.0 to 1310.0°C WRe3-25 0.0 to 2400.0°C W/WRe26 0.0 to 2400.0°C Type-N(AWG14) 0.0 to 1300.0°C XK –200.0 to 600.
18.
18.2 MX100 Constants RTD (2 mA) Ranges Description Pt100 DAQMX100_RANGE_RTD_2MAJPT JPt100 DAQMX100_RANGE_RTD_2MAPTH DAQMX100_RANGE_RTD_2MAPT50 Pt100 :High resolution JPt100 :High resolution Pt50 DAQMX100_RANGE_RTD_2MACU10GE CU10:GE DAQMX100_RANGE_RTD_2MACU10LN Cu10:L&N DAQMX100_RANGE_RTD_2MACU10WEED Cu10:WEED DAQMX100_RANGE_RTD_2MACU10BAILEY Cu10:BAILEY DAQMX100_RANGE_RTD_2MAJ263B J263*B DAQMX100_RANGE_RTD_2MACU10A392 Cu10 at 20°C a=0.00392 Cu10 at 20°C a=0.00393 Cu25 at 0°C a=0.
18.2 MX100 Constants Mnemonic DAQMX100_RANGE_RTD_2MACU10WEEDH DAQMX100_RANGE_RTD_2MACU10BAILEYH DAQMX100_RANGE_RTD_2MAPTN DAQMX100_RANGE_RTD_2MAJPTN DAQMX100_RANGE_RTD_2MACU100G DAQMX100_RANGE_RTD_2MACU50G DAQMX100_RANGE_RTD_2MACU10G Description Setting range Cu10:WEED –200.0 to 300.0°C :High resolution –328.0 to 572.0°F Cu10:BAILEY –200.0 to 300.0°C :High resolution –328.0 to 572.0°F Pt100 –200.0 to 250.0°C :high noise resistance –328.0 to 482.0°F Jpt100 –200.0 to 250.0°C :high noise resistance –328.
18.2 MX100 Constants Digital Input (DI) Detailed Range Types Mnemonic DAQMX100_RANGE_DI_LEVEL_AI DAQMX100_RANGE_DI_CONTACT_AI4 DAQMX100_RANGE_DI_CONTACT_AI10 DAQMX100_RANGE_DI_CONTACT_AI30 DAQMX100_RANGE_DI_LEVEL_DI5V* DAQMX100_RANGE_DI_LEVEL_DI24V * Separate name for DAQMX100_RANGE_DI_LEVEL_DI. Defined to differentiate from 24 V. Strain Ranges Mnemonic DAQMX100_RANGE_STRAIN_2K Description 2000 µSTR DAQMX100_RANGE_STRAIN_20K 20000 µSTR DAQMX100_RANGE_STRAIN_200K 200000 µSTR Setting range –2000.
18.
18.3 MX100 Setting Item Numbers See section 6.3.
18.4 MX100 Types Detailed Explanation of Types DAQMX100 Handled as a Long type in Visual Basic. Handled as an int type on the API before R3.01 and a void* type on the API R3.01 or later in Visual C++/Visual C. Handled as an integer type in Visual Basic.NET. Handled as the int type in C#. Callback Type Callback type Description Add prefix “DLL” to the function name and write in uppercase.
Chapter 19 DARWIN for Extended API - Visual C++ - 19.1 DARWIN Class The extended API consists of the following additional API classes. CDAQHandler • CDAQDARWIN CDAQDA100 CDAQDA100Reader CDAQDARWINDataBuffer : Class common to the MX100 and the DARWIN. : Class dedicated to the MX100. : Class added for the DA100 (extended API) : Class added for the DA100 for reader (loading istantaneous value data) 19 The extension API handler class. CDAQDA100Reader The handler class for loading instantaneous value data.
19.2 Correspondence between the Functions and Class/Member Functions - DARWIN This section indicates functions and classes that this extension API supports. Note This extension API provides a portion of the functions common to the DARWIN series instruments. Model-specific functions, setup functions of the setup mode, and A/D calibration functions are not given. The functions can be added by using the commands of the DARWIN communication function.
19.
19.2 Correspondence between the Functions and Class/Member Functions - DARWIN - Data Retrieval Functions Function Meas data Meas ch (inst value) Comp ch Ch info Meas ch data Comp ch System configuration data Report status Setup data Declare Op.
19.
19.2 Correspondence between the Functions and Class/Member Functions - DARWIN - Status Data Data Name Status byte Retrieve code type (binary/ASCII code) Report status Class and Member Function CDAQDA100:: getByte CDAQDA100:: getCode CDAQDA100:: getReport Utilities Function/Data Name Meas val Chng to double integer Convert into string.
19.3 Programming - DARWIN/Visual C++ Adding the Path to the Include File Add the path of the include file (DAQDA100.h) to the project. The method of adding the include file varies depending on the environment used. Declaration in the Source File Write the declaration in the source file. #include "DAQDA100.h" 19 Note Library Designation Adds libraries (DAQDA100.lib, DAQDARWIN.lib, and DAQHandler.lib) to the project. The method of adding the include file varies depending on the environment used.
19.3 Programming - DARWIN/Visual C++ - Retrieval of the Measured Data Program Example ////////////////////////////////////////////////////////////// // DA100 sample for measurement #include #include "DAQDA100.h" ////////////////////////////////////////////////////////////// int main(int argc, char* argv[]) { int rc; //return code CDAQDA100 daqda100; //class int value; //connect rc = daqda100.open("192.168.1.11"); //get rc = daqda100.measInstCh(0, 1); value = ((daqda100.
19.3 Programming - DARWIN/Visual C++ - Comm. cut rc = daqda100.close(); Drops the connection.
19.4 Functions and Class Members for Loading Instantaneous Value Data This section indicates the correspondence between the functions that are supported by the instantaneous value loading functions and the class. There are two types of functions, status transition functions and retrieval functions. Status transition functions control DARWIN.
19.
19.
19.5 Program for Loading Instantaneous Value Data - DARWIN/Visual C++ Adding the Path to the Include File Add the path of the include file (DAQDA100Reader.h) to the project. The method of adding the include file varies depending on the environment used. Declaration in the Source File Write the declaration in the source file. #include "DAQDA100Reader.h" 19 Note Library Designation Adds libraries (DAQDA100.lib, DAQDARWIN.lib, and DAQHandler.lib) to the project.
19.5 Program for Loading Instantaneous Value Data - DARWIN/Visual C++ - Retrieval of the Measured Data Program Example ////////////////////////////////////////////////////////////// // DA100 sample for measurement #include #include "DAQDA100Reader.h" ////////////////////////////////////////////////////////////// int main(int argc, char* argv[]) { int rc; //return code CDAQDA100 daqda100; //class int value; //connect rc = daqda100.open("192.168.1.11"); //get rc = daqda100.
19.5 Program for Loading Instantaneous Value Data - DARWIN/Visual C++ - Comm. cut rc = daqda100.close(); Drops the connection.
19.6 Details of the DARWIN Class The classes are listed in alphabetical order by the class name. CDAQDA100 Class • CDAQHandler • CDAQDARWIN • CDAQDA100 This class communicates with DARWIN, and stores the retrieved data. The following data can be stored. • Status bytes • System configuration data • Channel information data • Time information data • Measured data When each function is executed, the data is updated as necessary. Also, the user can update the data explicitly.
19.6 Details of the DARWIN Class Setup Functions setRange setChDELTA Sets the range. Sets difference computation between channels. setChRRJC setChUnit Sets remote RJC. Sets the unit name. setChAlarm Sets the alarm value. Data Retrieval Functions measInstCh mathInstCh Gets the measured data of the measurement channel. Gets the measured data of the computation channel. measInfoCh Gets the channel information data of the measurement channel.
19.6 Details of the DARWIN Class Utilities isObject Checks an object. • Inherited Members See CDAQHandler.
19.6 Details of the DARWIN Class Utilities chNumMax chNumMaxReport Gets the number of channels. Gets the number of report channels. getVersionDA100DLL getRevisionDA100DLL Gets the version number of the DLL. Gets the revision number of the DLL. • Inherited Members See CDAQHandler. m_comm m_nRemainSize receive receiveRemain send See CDAQDARWIN. checkAck getVersionDLL getRevisionDLL startTalker 19 DARWIN for Extended API - Visual C++ Private Members None.
19.6 Details of the DARWIN Class CDAQDA100::CDAQDA100 Syntax CDAQDA100(void); CDAQDA100(const char * strAddress, unsigned int uiPort = DAQDARWIN_COMMPORT, nt * errCode = NULL); virtual ~CDAQDA100(void); Parameters strAddress uiPort Specify the IP address as a string. Specify the port number. errCode Specify the destination where the error number is to be returned. Description Constructs or destructs an object. When constructing, the data member is initialized.
19.6 Details of the DARWIN Class CDAQDA100::chNumMaxReport Syntax virtual int chNumMaxReport(void); Description Retrieves the maximum number of channels when the channel type is report. For the DR130, the value is not correct because identification cannot be made. Override if necessary. Return value Returns the maximum number of channels. CDAQDA100::getByte 19 DARWIN for Extended API - Visual C++ Syntax int getByte(void); Description Gets the value of the status byte field from the data member.
19.6 Details of the DARWIN Class CDAQDA100::getClassDataBuffer Syntax CDAQDARWINDataBuffer * getClassDataBuffer(int chType, int chNo); Parameters chType Specify the channel type. chNo Specify the channel number. Description Gets various kinds of information data of the specified channel from the data member. Returns NULL if it does not exist. Return value Returns a pointer to the object.
19.6 Details of the DARWIN Class CDAQDA100::getData Syntax virtual int getData(int chType, int chNo, CDAQDateTime & cDateTime, CDAQDataInfo & cDataInfo); Parameters chType Specify the channel type. chNo cDateTime Specify the channel number. Specify the destination where the time information data is cDataInfo to be returned. Specify the destination where the measured data is to be returned.
19.6 Details of the DARWIN Class CDAQDA100::getInstChASCII Syntax int getInstChASCII(int sChType, int sChNo, int eChType, int eChNo); Parameters sChType Specify the start channel type. sChNo eChType Specify the start channel number. Specify the end channel type. eChNo Specify the end channel number. Description Gets the measured data in ASCII mode. The specified data is stored in the data member. Return value Returns an error number.
19.6 Details of the DARWIN Class CDAQDA100::getReport Syntax int getReport(void); Description Gets the report status field from the data member. Return value Returns the report status. CDAQDA100::getRevisionDA100DLL 19 Syntax DARWIN for Extended API - Visual C++ static const int getRevisionDA100DLL(void); Description Gets the revision number of this DLL. Return value Returns the revision number of this DLL.
19.6 Details of the DARWIN Class CDAQDA100::isObject Syntax virtual int isObject(const char * classname = "CDAQDA100"; Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited. If parameters are omitted, checks whether it is this class. Classes that inherit this class must be overridden in order to check their own classes. Returns true (valid) if the class was inherited. Otherwise, returns false (invalid).
19.6 Details of the DARWIN Class CDAQDA100::mathInstCh Syntax virtual int mathInstCh(int chNo = DAQDA100_CHNO_ALL); Parameters chNo Specify the channel number. Description Gets the measured data of the specified computation channel. If the channel number is set to the constant for “specify all channel numbers,” all computation channels are processed. Return value 19 Returns an error number.
19.6 Details of the DARWIN Class CDAQDA100::measInfoCh Syntax virtual int measInfoCh(int chType = DAQDA100_CHTYPE_MEASALL, int chNo = DAQDA100_CHNO_ALL); Parameters chType Specify the channel type. chNo Specify the channel number. Description Gets the channel information data of the specified channel. The specified data is stored in the various channel information fields of the data member.
19.6 Details of the DARWIN Class CDAQDA100::measInstCh Syntax virtual int measInstCh(int chType = DAQDA100_CHTYPE_MEASALL, int chNo = DAQDA100_CHNO_ALL); Parameters chType Specify the channel type. chNo Specify the channel number. Description Gets the measured data of the specified channel. The specified data is stored in the various channel information fields of the data member.
19.6 Details of the DARWIN Class CDAQDA100::reconstruct Syntax int reconstruct(void); Description Executes the “System reconfiguration” system control type. Updates the status if successful. Return value Returns an error number. Reference initSystem updateAll CDAQDA100::setChAlarm Syntax int setChAlarm(int chType, int chNo, int levelNo, int iAlarmType = DAQDARWIN_ALARM_NONE, int value = 0, int relayType = 0, int relayNo = 0); Parameters chType chNo Specify the channel type.
19.6 Details of the DARWIN Class CDAQDA100::setChDELTA Syntax int setChDELTA(int chType, int chNo, int refChNo, int spanMin = 0, int spanMax = 0); Parameters chType chNo Specify the channel type. Specify the channel number. refChNo spanMin Specify the channel number of the reference channel. Specify the left value of the span. spanMax Specify the right value of the span. Description 19 Sets the difference computation for the specified reference channels.
19.6 Details of the DARWIN Class CDAQDA100::setChRRJC Syntax int setChRRJC(int chType, int chNo, int refChNo, int spanMin = 0, int spanMax = 0); Parameters chType chNo pecify the channel type. Specify the channel number. refChNo spanMin Specify the channel number of the reference channel. Specify the left value of the span. spanMax Specify the right value of the span. Description Sets the remote RJC for the specified reference channel.
19.6 Details of the DARWIN Class CDAQDA100::setChUnit Syntax int setChUnit(int chType, int chNo, const char * strUnit); Parameters chType chNo Specify the channel type. Specify the channel number. strUnit Specify the unit name using a string. Description Sets the specified unit name. If the channel type is set to the constant for “Specify all measurement channel types,” all subunits are processed. Updates the status if successful. Return value Returns an error number.
19.6 Details of the DARWIN Class CDAQDA100::setRange Syntax int setRange(int chType, int chNo, int iRange, int spanMin = 0, int spanMax = 0, int scaleMin = 0, int scaleMax = 0, int scalePoint = 0, int bFilter = DAQDARWIN_VALID_OFF, int iItem = DAQDARWIN_POWERITEM_P1, int iWire = DAQDARWIN_WIRE_1PH2W); Parameters chType chNo Specify the channel type. Specify the channel number. iRange spanMin Specify the range type. Specify the left value of the span.
19.6 Details of the DARWIN Class CDAQDA100::switchCode Syntax int switchCode(int iCode); Parameters iCode Gets the retrieve code type. Description Stores the specified value in the retrieve code type field of the data member. Updates the status if successful. Return value Returns an error number. Reference 19 updateRenew DARWIN for Extended API - Visual C++ CDAQDA100::switchCompute Syntax int switchCompute(int iCompute); Parameters iCompute Specify the computation.
19.6 Details of the DARWIN Class CDAQDA100::switchReport Syntax int switchReport(int iReportRun); Parameters iReportRun Specify the report execution type. Description Executes the specified report execution type. Updates the status if successful. Return value Returns an error number. Reference reporting updateRenew CDAQDA100::talkCalibrationChData Syntax int talkCalibrationChData(int chType = DAQDA100_CHTYPE_MEASALL, int chNo = DAQDA100_CHNO_ALL); Parameters chType Specify the channel type.
19.6 Details of the DARWIN Class CDAQDA100::talkOperationChData Syntax int talkOperationChData(int chType = DAQDA100_CHTYPE_MEASALL, int chNo = DAQDA100_CHNO_ALL); Parameters chType chNo Specify the channel type. Specify the channel number. Description Executes declaration of the retrieval of the setup data of operation mode on the specified channels. If the channel type is set to the constant for “Specify all measurement channel types,” all subunits are processed.
19.6 Details of the DARWIN Class CDAQDA100::updateAll Syntax int updateAll(void); Description Updates all information data of the data member. Gets the System configuration data, channel information data, and status byte and stores it. Return value Returns an error number. Reference updateChInfo updateRenew updateSystemConfig CDAQDA100::updateChInfo Syntax int updateChInfo(void); Description Updates all channel information data. Return value Returns an error number.
19.6 Details of the DARWIN Class CDAQDA100::updateReportStatus Syntax int updateReportStatus(void); Description Gets the report status. Stores the retrieved data in the report status field of the data member. Return value Returns an error number. Reference getReportStatus 19 CDAQDA100::updateStatus DARWIN for Extended API - Visual C++ Syntax int updateStatus(void); Description Gets the status byte. Stores the retrieved status byte in the data status field of the data member.
19.6 Details of the DARWIN Class CDAQDA100 Reader Class CDAQHandler • CDAQDARWIN • CDAQDA100 • CDAQDA100Reader This class communicates with DARWIN to load instantaneous value data and stores the retrieved data. This class uses instantaneous value data loading commands to override the channel information data and measured data retrieval functions. The following data can be stored.
19.
19.6 Details of the DARWIN Class Private Members None. Member Functions (Alphabetical Order) CDAQDA100Reader::CDAQDA100Reader Syntax CDAQDA100Reader(void); CDAQDA100Reader(const char * strAddress, unsigned int uiPort = DAQDA100READER_DATAPORT, int * errCode = NULL); virtual ~CDAQDA100Reader(void); Parameters strAddress Specify the IP address as a string. uiPort errCode Specify the port number. Specify the destination where the error number is to be returned.
19.6 Details of the DARWIN Class CDAQDA100Reader::getInfoCh Syntax virtual int getInfoCh(int sChType, int sChNo, int eChType, int eChNo); Parameters sChType sChNo Specify the start channel type. Specify the start channel number. eChType eChNo Specify the end channel type. Specify the end channel number. Description Gets the channel information data of the specified channel range. The specified data is stored in the data member. 19 Return value Returns an error number.
19.6 Details of the DARWIN Class CDAQDA100Reader::isObject Syntax virtual int isObject(const char * classname = "CDAQDA100Reader"; Parameters classname Specify the class name using a string. Description Checks whether the specified class name was inherited. If parameters are omitted, checks whether it is this class. Classes that inherit this class must be overridden in order to check their own classes. Returns true (valid) if the class was inherited. Otherwise, returns false (invalid).
19.6 Details of the DARWIN Class CDAQDA100Reader::measInstCh Syntax virtual int measInstCh(int chType = DAQDA100_CHTYPE_MEASALL, int chNo = DAQDA100_CHNO_ALL); Parameters chType chNo Specify the channel type. Specify the channel number. Description Gets the measured data of the specified channel. The specified data is stored in the various channel information fields of the data member. If the channel type is set to the constant for “Specify all measurement channel types,” all subunits are processed.
19.6 Details of the DARWIN Class CDAQDARWINDataBuffer Class This class stores each type of information for each channel of the DARWIN in a group. The following data can be stored. • Channel information data • Time information data • Setup data Public Members Construct/Destruct CDAQDARWINDataBuffer Constructs an object. ~CDAQDARWINDataBuffer Destructs an object. Member Data Manipulation initialize getClassDARWINChInfo Initializes the data member. Gets the channel information data.
19.6 Details of the DARWIN Class Member Functions (Alphabetical Order) CDAQDARWINDataBuffer::CDAQDARWINDataBuffer Syntax CDAQDARWINDataBuffer(void); virtual ~CDAQDARWINDataBuffer(void); Description Constructs or destructs an object. When constructing, the data member is initialized.
19.6 Details of the DARWIN Class CDAQDARWINDataBuffer::initialize Syntax virtual void initialize(void); Description Initializes the data member. The default value as a general rule is 0. Sets the association with the channel information data of the measured data.
19.6 Details of the DARWIN Class CDAQDARWINDataBuffer::setDataInfo Syntax void setDataInfo(CDAQDARWINDataInfo & cDARWINDataInfo); Parameters cDARWINDataInfo Specify the measured data. Description Copies the specified data to the data member. The association with the channel information data becomes the data member of this class.
Chapter 20 DARWIN for Extended API - Visual C - 20.1 Functions and Their Functionalities - DARWIN/ Visual C This section indicates the correspondence between the functionalities that the extension API supports and the Visual C functions. Note This extension API provides a portion of the functions common to the DARWIN series instruments. Model-specific functions, setup functions of the setup mode, and A/D calibration functions are not given.
20.
20.1 Functions and Their Functionalities - DARWIN/Visual C - Data Retrieval Functions Function Measured data Meas ch (instantaneous value) Comp ch Channel Meas ch information data Comp ch System configuration data Report status Setup data Declar.
20.
20.
20.2 Programming - DARWIN/Visual C Adding the Path to the Include File Add the path of the include file (DAQDA100.h) to the project. The method of adding the include file varies depending on the environment used. Declaration in the Source File Write the declaration in the source file. #include "DAQDA100.h" Note The include file of the common section (DAQHandler.h, DAQDARWIN.h) is referenced from the include file described above. Thus, declaration for it is not necessary.
20.2 Programming - DARWIN/Visual C - Retrieval of the Measured Data Program Example IM MX190-01E 20-7 20 DARWIN for Extended API - Visual C - ////////////////////////////////////////////////////////////// // DA100 sample for measurement #include #include "DAQDA100.
20.2 Programming - DARWIN/Visual C - Description Overview Retrieves instantaneous values of the measured data from channel 1 of DARWIN subunit number 0 and stores them in the field. Reads the measured values and concludes the process. Communication Connection comm = openDA100("192.168.1.11", &rc); The IP address of the DARWIN is specified. This statement specifies the communication constant for the DARWIN communication port number.
20.3 Correspondence between Functions for Instantaneouce Value Data Loading and Functions - DARWIN/Visual C This section indicates the correspondence between the functionalities that the extension API supports and the Visual C functions. Note This extension API provides a portion of the functions common to the DARWIN series instruments. Model-specific functions, setup functions of the setup mode, and A/D calibration functions are not given.
20.
20.4 Program for Loading Instantaneous Value Data - DARWIN/Visual C Adding the Path to the Include File Add the path of the include file (DAQDA100.h) to the project. The method of adding the include file varies depending on the environment used. Declaration in the Source File Write the declaration in the source file. #include "DAQDA100Reader.h" Note The include files of the common section (DAQHandler.h, DAQDARWIN, and DAQDA100) are referenced from the include file described above.
20.4 Program for Loading Instantaneous Value Data - DARWIN/Visual C - Retrieval of the Measured Data Program Example ////////////////////////////////////////////////////////////// // DA100Reaer sample for measurement #include #include "DAQDA100Reader.
20.4 Program for Loading Instantaneous Value Data - DARWIN/Visual C - Description Overview Retrieves instantaneous values of the measured data from channel 1 of DARWIN subunit number 0 and stores them in the field. Reads the measured values and concludes the process. Communication Connection comm = openDA100Reader("192.168.1.11", &rc); The IP address of the DARWIN is specified. This statement specifies the communication constant for the port number for loading the instantaneous value data.
Chapter 21 DARWIN for Extended API - Visual Basic - 21.1 Correspondence between the Functions and Class/Member Functions - DARWIN/Visual Basic This section indicates the correspondence between the functionalities that the extension API supports and the Visual Basic functions. Note This extension API provides a portion of the functions common to the DARWIN series instruments. Model-specific functions, setup functions of the setup mode, and A/D calibration functions are not given.
21.
21.
21.
21.
21.2 Programming - DARWIN/Visual Basic Declaration of Types, Functions, and Constants To use types, functions, and constants for Visual Basic, they must be declared in advance. The following methods of declaration statements are available. Statement of All Declarations Adding the standard module library file for Visual Basic (DAQDA100.bas) to the project is equivalent to declaring all types, functions, and constants.
21.2 Programming - DARWIN/Visual Basic - Retrieval of the Measured Data Program Example Attribute VB_Name = "Module1" Public Sub Main() 'connect comm = openDA100("192.168.1.11", rc) 'get rc = measInstChDA100(comm, 0, 1) value = dataValueDA100(comm, 0, 1) 'disconnect rc = closeDA100(comm) End Sub Description Overview Retrieves instantaneous values of the measured data from channel 1 of DARWIN subunit number 0 and stores them in the field. Reads the measured values and concludes the process.
21.3 Correspondence between Functions for Instantaneous Value Data Loading and Member Functions - DARWIN/Visual Basic This section indicates the correspondence between the functionalities that the extension API supports and the Visual Basic functions. Note This extension API provides a portion of the functions common to the DARWIN series instruments. Model-specific functions, setup functions of the setup mode, and A/D calibration functions are not given.
21.
21.4 Program for Loading Instantaneous Value Data - DARWIN/Visual Basic To use types, functions, and constants for Visual Basic, they must be declared in advance. The following methods of declaration statements are available. Statement of All Declarations Adding the standard module library file for Visual Basic (DAQDA100Reader.bas) to the project is equivalent to declaring all types, functions, and constants.
21.4 Program for Loading Instantaneous Value Data - DARWIN/Visual Basic - Retrieval of the Measured Data Program Example Attribute VB_Name = "Module1" Public Sub Main() 'connect comm = openDA100Reader("192.168.1.11", rc) 'get rc = measInstChDA100Reader(comm, 0, 1) Value = dataValueDA100Reader(comm, 0, 1) 'disconnect rc = closeDA100Reader(comm) End Sub Description Overview Retrieves instantaneous values of the measured data from channel 1 of DARWIN subunit number 0 and stores them in the field.
Chapter 22 DARWIN for Extended API - Visual Basic.NET - 22.1 Functions and Their Functionalities - DARWIN/ Visual Basic.NET This section indicates functions and classes that this extension API supports. Note This extension API provides a portion of the functions common to the DARWIN series instruments. Model-specific functions, setup functions of the setup mode, and A/D calibration functions are not given. The functions can be added by using the commands of the DARWIN communication function.
22.1 Functions and Their Functionalities - DARWIN/Visual Basic.
22.1 Functions and Their Functionalities - DARWIN/Visual Basic.
22.1 Functions and Their Functionalities - DARWIN/Visual Basic.
22.1 Functions and Their Functionalities - DARWIN/Visual Basic.
22.2 Programming - DARWIN/Visual Basic.NET Statement of Declarations Adding the module for Visual Basic.NET to the project is equivalent to declaring all functions and constants.
22.2 Programming - DARWIN/Visual Basic.NET - Retrieval of the Measured Data Program Example Module Module1 Public Sub Meas() Dim comm As Integer Dim rc As Integer Dim value As Integer 'connect comm = openDA100("192.168.1.11", rc) 'get rc = measInstChDA100(comm, 0, 1) value = dataValueDA100(comm, 0, 1) 'disconnect rc = closeDA100(comm) End sub End Module Description Overview Retrieves instantaneous values of the measured data from channel 1 of DARWIN subunit number 0 and stores them in the field.
22.3 Correspondence between Functions for Instantaneous Value Data Loading and Functions - DARWIN/Visual Basic.NET This section indicates the correspondence between the functionalities that the extension API supports and the Visual C functions. Note This extension API provides a portion of the functions common to the DARWIN series instruments. Model-specific functions, setup functions of the setup mode, and A/D calibration functions are not given.
22.
22.4 Program for Loading Instantaneous Value Data -DARWIN/Visual Basic.NETDeclaration Statements Adding the module for Visual Basic.NET to the project is equivalent to declaring all functions and constants.
22.4 Program for Loading Instantaneous Value Data -DARWIN/Visual Basic.NET- Retrieval of the Measured Data Program Example Module Module1 Public Sub Meas() Dim comm As Integer Dim rc As Integer Dim value As Integer 'connect comm = openDA100Reader("192.168.1.
Chapter 23 DARWIN for Extended API - C# - 23.1 Functions and Their Functionalities - DARWIN/ C# This section indicates functions that this extension API supports. Note This extension API provides a portion of the functions common to the DARWIN series instruments. Model-specific functions, setup functions of the setup mode, and A/D calibration functions are not given. The functions can be added by using the commands of the DARWIN communication function.
23.1 Functions and Their Functionalities - DARWIN/C# - Control Functions Function Switch operation mode Retrieve code type Switch (binary/ASCII code) Reconfigure Initialize settings Reset alarms Set date/time (current) Calculation start/stop Report start/stop Establish setup mode Command DS - Function DAQDA100. switchModeDA100 DAQDA100. switchCodeDA100 RS RC AR SD EX DR XE DAQDA100. reconstructDA100 DAQDA100. initSetValueDA100 DAQDA100. ackAlarmDA100 DAQDA100. setDateTimeNowDA100 DAQDA100.
23.1 Functions and Their Functionalities - DARWIN/C# - List of Data Retrieval Functions Function Measured Data (Inst val) Channel info data Meas ch Comp ch Meas ch Comp ch System configuration data Report status Setup data Declare Op Sngl spec mode Specify rng Setup Sngl spec Mode Specify rng Calibrate Sngl spec Mode Specify rng Get data by lines Command TS, FM TS, FM TS, LF TS, LF TS,CF TS,RF Function DAQDA100. measInstChDA100 DAQDA100. mathInstChDA100 DAQDA100. measInfoChDA100 DAQDA100.
23.1 Functions and Their Functionalities - DARWIN/C# - Retrieval Functions Measured Data Data Name Data value Data status values Alarm (presence/absence) Measured Dbl intg values String Time Year Month Day Hour Minute Second Alarm type Function DAQDA100. dataValueDA100 DAQDA100. dataStatusDA100 DAQDA100. dataAlarmDA100 DAQDA100. dataDoubleValueDA100 DAQDA100. dataStringValueDA100 DAQDA100. dataYearDA100 DAQDA100. dataMonthDA100 DAQDA100. dataDayDA100 DAQDA100. dataHourDA100 DAQDA100.
23.1 Functions and Their Functionalities - DARWIN/C# - Utilities Function/Data Name Meas val Chnge to dbl intg Convert into string Alarm Alarm type string Get max length of alarm string The version number of this API The revision number of this API Error Error message string Get the length of the error message string Class and Member Function DAQDA100. toDoubleValueDA100 DAQDA100.toStringValueDA100 DAQDA100. toAlarmNameDA100 DAQDA100. alarmMaxLengthDA100 DAQDA100. versionAPIDA100 DAQDA100.
23.2 Programming - DARWIN/C# Declaration Statements Adding the class file C# to the project is equivalent to declaring all functions and constants.
23.2 Programming - DARWIN/C# - Retrieval of the Measured Data Program Example using System; using System.Text; using System.Runtime.InteropServices; namespace MeasCS { class Class1 { [STAThread] static void Main(string[] args) { int rc; Encoding enc = Encoding.GetEncoding ("ascii"); String address = "192.168.1.11"; //connect int comm = DAQDA100.openDA100(enc.GetBytes(address), out rc); //get rc = DAQDA100.measInstChDA100(comm, 0, 1); int val = DAQDA100.dataValueDA100(comm, 0, 1); //disconnect DAQDA100.
23.2 Programming - DARWIN/C# - Reading Measured Values int val = DAQDA100.dataValueDA100(comm, 0, 1); Reads the measured value of channel 1 of subunit number 0 from the field where the measured data is stored. Comm. cut DAQDA100.closeDA100(comm); Drops the connection.
23.3 Correspondence between Functions and Instantaneous Value Data Loading Functions DARWIN/VIsual C# This section indicates functions that this extension API supports. Note This extension API provides a portion of the functions common to the DARWIN series instruments. Model-specific functions, setup functions of the setup mode, and A/D calibration functions are not given. The functions can be added by using the commands of the DARWIN communication function.
23.3 Correspondence between Functions and Instantaneous Value Data Loading Functions - DARWIN/VIsual C# - Retrieval Functions Measured Data Data Name Data value Data status values Alarm (presence/absence) Measured Double integer value String Time Year Month Day Hour Minute Second Milliseconds Alarm type Function DAQDA100Reader. dataValueDA100Reader DAQDA100Reader. dataStatusDA100Reader DAQDA100Reader. dataAlarmDA100Reader DAQDA100Reader. dataDoubleValueDA100Reader DAQDA100Reader.
23.4 Program for Loading Instantaneous Value Data -DARWIN/C#Declaration Statements Adding the class file (DAQDA100Reader.cs) C# to the project is equivalent to declaring all functions and constants.
23.4 Program for Loading Instantaneous Value Data -DARWIN/C#- Retrieval of the Measured Data Program Example using System; using System.Text; using System.Runtime.InteropServices; namespace MeasCS { class Class1 { [STAThread] static void Main(string[] args) { int rc; Encoding enc = Encoding.GetEncoding ("ascii"); String address = "192.168.1.11"; //connect int comm = DAQDA100Reader.openDA100Reader(enc.GetBytes(address), out rc); //get rc = DAQDA100Reader.
23.4 Program for Loading Instantaneous Value Data -DARWIN/C#- Reading Measured Values int val = DAQDA100Reader.dataValueDA100Reader(comm, 0, 1); Reads the measured value of channel 1 of subunit number 0 from the field where the measured data is stored. Comm. cut DAQDA100Reader.closeDA100Reader(comm); Drops the connection.
Chapter 24 DARWIN for Extended API - Visual C/Visual Basic/Visual Basic.NET/C# - 24.1 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Status Transition Functions This section describes the DARWIN functions that are used in Visual C, Visual Basic, Visual Basic.NET, and C#. The functions are listed in alphabetical order by the function name. For DARWIN terminology, see appendix 2. Most functions return an error number as a return value.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions ackAlarmDA100 Syntax int ackAlarmDA100(DAQDA100 daqda100); Declaration Visual Basic Public Declare Function ackAlarmDA100 Lib "DAQDA100"(ByVal daqda100 As Long) As Long Visual Basic.NET Public Declare Ansi Function ackAlarmDA100 Lib "DAQDA100"(ByVal daqda100 As Integer) As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions closeDA100 Syntax int closeDA100(DAQDA100 daqda100); Declaration Parameters daqda100 Specify the device descriptor. Description Disconnects the communication using the specified device descriptor. • When the communication is disconnected, the value of the device descriptor is meaningless. • After disconnection, do not use the value of the device descriptor. Return value Returns an error number.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions establishDA100 Syntax int establishDA100(DAQDA100 daqda100, int iSetup); Declaration Visual Basic Public Declare Function establishDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal iSetup As Long) As Long Visual Basic.NET Public Declare Ansi Function establishDA100 Lib "DAQDA100"(ByVal daqda100 As Integer, ByVal iSetup As Integer) As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions getSetDataByLineDA100 Syntax int getSetDataByLineDA100(DAQDA100 daqda100, char * strLine, int maxLine, int * lenLine, int * pFlag); Declaration Parameters daqda100 strLine Specify the device descriptor. Specify the field where the string received by lines is to be stored. maxLine Specify the byte size of the field where the string received by lines is to be stored.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions initSetValueDA100 Syntax int initSetValueDA100(DAQDA100 daqda100); Declaration Visual Basic Public Declare Function initSetValueDA100 Lib "DAQDA100"(ByVal daqda100 As Long) As Long Visual Basic.NET Public Declare Ansi Function initSetValueDA100 Lib "DAQDA100"(ByVal daqda100 As Integer) As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions mathInfoChDA100 Syntax int mathInfoChDA100(DAQDA100 daqda100, int chNo); Declaration Parameters daqda100 Specify the device descriptor. chNo Specify the channel number. Description Gets the channel information data of the specified computation channel range. • If the constant for “Specify all channel numbers”is specified for the channel numbers, all computatino channels are processed.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions mathInstChDA100 Syntax int mathInstChDA100(DAQDA100 daqda100, int chNo); Declaration Visual Basic Public Declare Function mathInstChDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function mathInstChDA100 Lib "DAQDA100"(ByVal daqda100 As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions measInfoChDA100 Syntax int measInfoChDA100(DAQDA100 daqda100, int chType, int chNo); Declaration Parameters daqda100 chType Specify the device descriptor. Specify the channel type. chNo Specify the channel number. Description Gets the channel information data of the specified measurement channel (specified with the channel type and channel number).
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions measInstChDA100 Syntax int measInstChDA100(DAQDA100 daqda100, int chType, int chNo); Declaration Visual Basic Public Declare Function measInstChDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function measInstChDA100 Lib "DAQDA100"(ByVal daqda100 As Integer, ByVal chType As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQDA100.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions openDA100 Syntax DAQDA100 openDA100(const char * strAddress, int * errorCode); Declaration Parameters strAddress errorCode Specify the IP address as a string. Specify the destination where the error number is to be returned. Description Connects to the device with the address specified by the parameters. • Creates a device descriptor and returns the value as a return value.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions receiveByteDA100 Syntax int receiveByteDA100(DAQDA100 daqda100, unsigned char * byteData, int maxData, int * lenData) ); Declaration Visual Basic Public Declare Function receiveByteDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByRef byteData As Byte, ByVal maxData As Long, ByRef lenData As Long) As Long Visual Basic.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions receiveLineDA100 Syntax int receiveLineDA100(DAQDA100 daqda100, char * strLine, int maxLine, int * lenLine); Declaration Parameters daqda100 strLine Specify the device descriptor. Specify the field where the received string is to be stored. maxLine Specify the byte size of the field where the received string is to be stored. lenLine Specify the destination where the byte size of the actual string received is returned.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions reconstructDA100 Syntax int reconstructDA100(DAQDA100 daqda100); Declaration Visual Basic Public Declare Function reconstructDA100 Lib "DAQDA100"(ByVal daqda100 As Long) As Long Visual Basic.NET Public Declare Ansi Function reconstructDA100 Lib "DAQDA100"(ByVal daqda100 As Integer) As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions runCommandDA100 Syntax int runCommandDA100(DAQDA100 daqda100, const char * strCmd); Declaration Parameters daqda100 Specify the device descriptor. strCmd Specify the command message to be sent. Description Sends the specified command message and terminator and receives the response. • This function adds a terminator to the command message at the time of transmission.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions sendLineDA100 Syntax int sendLineDA100(DAQDA100 daqda100, const char * strLine); Declaration Visual Basic Public Declare Function sendLineDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal strLine As String) As Long Visual Basic.NET Public Declare Ansi Function sendLineDA100 Lib "DAQDA100"(ByVal daqda100 As Integer, ByVal strLine As String) As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions sendTriggerDA100 Syntax int sendTriggerDA100(DAQDA100 daqda100); Declaration Parameters daqda100 Specify the device descriptor. Description Sends a trigger command (ESC T), and receives the response. Return value Returns an error number. Error: Not descriptor No device descriptor. Reference CDAQDA100::sendTrigger DARWIN for Extended API - Visual C/Visual Basic/Visual Basic.
24.1 Details of Functions - DARWIN (VC/VB/VB.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions Description Sets the specified alarm (alarm level and alarm type) and alarm value to the specified channel (specified by channel type and channel number). • If the channel type is set to the constant for “Specify all measurement channel types,”all subunits are processed. • If the alarm level is set to the constant for ìSpecify all alarm level numbers,”all alarm levels within the channels are processed.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions setChDELTADA100 Syntax int setChDELTADA100(DAQDA100 daqda100, int chType, int chNo, int refChNo, int spanMin, int spanMax); Declaration Visual Basic Public Declare Function setChDELTADA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chType As Long, ByVal chNo As Long, ByVal refChNo As Long, ByVal spanMin As Long, ByVal spanMax As Long) As Long Visual Basic.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions setChRRJCDA100 Syntax int setChRRJCDA100(DAQDA100 daqda100, int chType, int chNo, int refChNo, int spanMin, int spanMax); Declaration Parameters daqda100 chType Specify the device descriptor. Specify the channel type. chNo refChNo Specify the channel number. Specify the channel number of the reference channel. spanMin spanMax Specify the left value of the span. Specify the right value of the span.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions setChUnitDA100 Syntax int setChUnitDA100(DAQDA100 daqda100, int chType, int chNo, const char * strUnit); Declaration Visual Basic Public Declare Function setChUnitDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chType As Long, ByVal chNo As Long, ByVal strUnit As String) As Long Visual Basic.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions setDateTimeNowDA100 Syntax int setDateTimeNowDA100(DAQDA100 daqda100); Declaration Parameters daqda100 Specify the device descriptor. Description Sets the current date/time of the PC. • The status is updated at the end of the process. • This function executes the SD command of the DARWIN communication function. Return value Returns an error number. Error: Not descriptor No device descriptor.
24.1 Details of Functions - DARWIN (VC/VB/VB.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions Description Sets the specified range type on the specified channel (specified under channel type and channel number). • If the channel type is set to the constant for “Specify all measurement channel types,”all subunits are processed. • With the span and scale specification, if the left and right values are the same, they are considered omitted. • The filter specification is only valid for the pulse range.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions switchCodeDA100 Syntax int switchCodeDA100(DAQDA100 daqda100, int iCode); Declaration Visual Basic Public Declare Function switchCodeDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal iCode As Long) As Long Visual Basic.NET Public Declare Ansi Function switchCodeDA100 Lib "DAQDA100"(ByVal daqda100 As Integer, ByVal iCode As Integer) As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions switchComputeDA100 Syntax int switchComputeDA100(DAQDA100 daqda100, int iCompute); Declaration Parameters daqdarwin Specify the device descriptor. iCompute Specify the computation. Description Starts/stops computation. • Valid with the computation function. • The status is updated at the end of the process. • This function executes the EX command of the DARWIN communication function.
hira4.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions switchModeDA100 Syntax int switchModeDA100(DAQDA100 daqda100, int iMode); Declaration Visual Basic Public Declare Function switchModeDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal iMode As Long) As Long Visual Basic.NET Public Declare Ansi Function switchModeDA100 Lib "DAQDA100"(ByVal daqda100 As Integer, ByVal iMode As Integer) As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions talkCalibrationChDataDA100 Syntax int talkCalibrationChDataDA100(DAQDA100 daqda100, int chType, int chNo); Declaration Parameters daqda100 chType Specify the device descriptor. Specify the channel type. chNo Specify the channel number. Description Executes declaration of the retrieval of the setup data of A/D calibration mode on the specified channel (specified by channel type and number).
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions talkCalibrationDataDA100 Syntax int talkCalibrationDataDA100(DAQDA100 daqda100, int startChType, int startChNo, int endChType, int endChNo); Declaration Visual Basic Public Declare Function talkCalibrationDataDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal startChType As Long, ByVal startChNo As Long, ByVal endChType As Long, ByVal endChNo As Long) As Long Visual Basic.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions talkOperationChDataDA100 Syntax int talkOperationChDataDA100(DAQDA100 daqda100, int chType, int chNo); Declaration Parameters daqda100 chType Specify the device descriptor. Specify the channel type. chNo Specify the channel number. Description Executes declaration of the retrieval of the setup data of operation mode on the specified channel (specified by channel type and number).
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions talkOperationDataDA100 Syntax int talkOperationDataDA100(DAQDA100 daqda100, int startChType, int startChNo, int endChType, int endChNo); Declaration Visual Basic Public Declare Function talkOperationDataDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal startChType As Long, ByVal startChNo As Long, ByVal endChType As Long, ByVal endChNo As Long) As Long Visual Basic.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions talkSetupChDataDA100 Syntax int talkSetupChDataDA100(DAQDA100 daqda100, int chType, int chNo); Declaration Parameters daqda100 chType Specify the device descriptor. Specify the channel type. chNo Specify the channel number. Description Executes declaration of the retrieval of the setup data of the setup mode of the specified channel (specified by channel type and number).
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions talkSetupDataDA100 Syntax int talkSetupDataDA100(DAQDA100 daqda100, int startChType, int startChNo, int endChType, int endChNo); Declaration Visual Basic Public Declare Function talkSetupDataDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal startChType As Long, ByVal startChNo As Long, ByVal endChType As Long, ByVal endChNo As Long) As Long Visual Basic.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions updateReportStatusDA100 Syntax int updateReportStatusDA100(DAQDA100 daqda100); Declaration DARWIN for Extended API - Visual C/Visual Basic/Visual Basic.NET/C# - Visual Basic Public Declare Function updateReportStatusDA100 Lib "DAQDA100"(ByVal daqda100 As Long) As Long Visual Basic.NET Public Declare Ansi Function updateReportStatusDA100 Lib "DAQDA100"(ByVal daqda100 As Integer) As Integer C# [DllImport("DAQDA100.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions updateStatusDA100 Syntax int updateStatusDA100(DAQDA100 daqda100); Declaration Visual Basic Public Declare Function updateStatusDA100 Lib "DAQDA100"(ByVal daqda100 As Long) As Long Visual Basic.NET Public Declare Ansi Function updateStatusDA100 Lib "DAQDA100"(ByVal daqda100 As Integer) As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.1 Details of Functions - DARWIN (VC/VB/VB.NET/C#) - Status Transition Functions updateSystemConfigDA100 Syntax int updateSystemConfigDA100(DAQDA100 daqda100); Declaration DARWIN for Extended API - Visual C/Visual Basic/Visual Basic.NET/C# - Visual Basic Public Declare Function updateSystemConfigDA100 Lib "DAQDA100"(ByVal daqda100 As Long) As Long Visual Basic.NET Public Declare Ansi Function updateSystemConfigDA100 Lib "DAQDA100"(ByVal daqda100 As Integer) As Integer C# [DllImport("DAQDA100.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions This section describes the DARWIN functions that are used in Visual C, Visual Basic, Visual Basic.NET, and C#. The functions are listed in alphabetical order by the function name. For details on constants and types, see chapter 25. For DARWIN terminology, see appendix 2.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions alarmMaxLengthDA100 Syntax int alarmMaxLengthDA100(void); Declaration Description Gets the maximum length of the alarm type. • The return value does not include the terminator. Return value Returns the length of the string. Reference CDAQDARWINDataInfo::getMaxLenAlarmName DARWIN for Extended API - Visual C/Visual Basic/Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions alarmTypeDA100 Syntax int alarmTypeDA100(DAQDA100 daqda100, int chType, int chNo, int levelNo); Declaration Visual Basic Public Declare Function alarmTypeDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chType As Long, ByVal chNo As Long, ByVal levelNo As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelPointDA100 Syntax int channelPointDA100(DAQDA100 daqda100, int chType, int chNo); Visual Basic Public Declare Function channelPointDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions channelStatusDA100 Syntax int channelStatusDA100(DAQDA100 daqda100, int chType, int chNo); Declaration Visual Basic Public Declare Function channelStatusDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataAlarmDA100 Syntax int dataAlarmDA100(DAQDA100 daqda100, int chType, int chNo, int levelNo); Visual Basic Public Declare Function dataAlarmDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chType As Long, ByVal chNo As Long, ByVal levelNo As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataDayDA100 Syntax int dataDayDA100(DAQDA100 daqda100, int chType, int chNo); Declaration Visual Basic Public Declare Function dataDayDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataDoubleValueDA100 Syntax double dataDoubleValueDA100(DAQDA100 daqda100, int chType, int chNo); Visual Basic Public Declare Function dataDoubleValueDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chType As Long, ByVal chNo As Long) As Double Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataHourDA100 Syntax int dataHourDA100(DAQDA100 daqda100, int chType, int chNo); Declaration Visual Basic Public Declare Function dataHourDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataMinuteDA100 Syntax int dataMinuteDA100(DAQDA100 daqda100,int chType,int chNo); Declaration Parameters daqda100 chType Specify the device descriptor. Specify the channel type. chNo Specify the channel number. Description Gets the minutes of the specified channel (channel type and number) from the stored time information data. • The minute is a number from 0 to 59. • Returns 0 if it does not exist.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataMonthDA100 Syntax int dataMonthDA100(DAQDA100 daqda100, int chType, int chNo); Declaration Visual Basic Public Declare Function dataMonthDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataSecondDA100 Syntax int dataSecondDA100(DAQDA100 daqda100, int chType, int chNo); Declaration Parameters daqda100 Specify the device descriptor. chType chNo Specify the channel type. Specify the channel number. Description Gets the seconds of the specified channel (channel type and number) from the stored time information data. • The second is a number from 0 to 59.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataStatusDA100 Syntax int dataStatusDA100(DAQDA100 daqda100, int chType, int chNo); Declaration Visual Basic Public Declare Function dataStatusDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataStringValueDA100 Syntax int dataStringValueDA100(DAQDA100 daqda100, int chType, int chNo, char * strValue, int lenValue); Visual Basic Public Declare Function dataStringValueDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chType As Long, ByVal chNo As Long, ByVal strValue As String, ByVal lenValue As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataValueDA100 Syntax int dataValueDA100(DAQDA100 daqda100, int chType, int chNo); Declaration Visual Basic Public Declare Function dataValueDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions dataYearDA100 Syntax int dataYearDA100(DAQDA100 daqda100, int chType, int chNo); Declaration Parameters daqda100 Specify the device descriptor. chType chNo Specify the channel type. Specify the channel number. Description Gets the year of the specified channel (channel type and number) from the stored time information data. • The year is a 4-digit number. • Returns 0 if it does not exist.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions errorMaxLengthDA100 Syntax int errorMaxLengthDA100(void); Declaration Visual Basic Public Declare Function errorMaxLengthDA100 Lib "DAQDA100"() As Long Visual Basic.NET Public Declare Ansi Function errorMaxLengthDA100 Lib "DAQDA100"() As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions getAlarmNameDA100 [Visual C only] Syntax const char * getAlarmNameDA100(int iAlarmType); Parameters Specify the alarm type. Description Gets the string corresponding to the specified alarm type. • If it does not exist, returns the pointer to the string corresponding to “No alarm.” Return value Returns a pointer to the string.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions getChannelUnitDA100 [Visual C only] Syntax const char * getChannelUnitDA100(DAQDA100 daqda100, int chType, int chNo); Parameters daqda100 chType Specify the device descriptor. Specify the channel type. chNo Specify the channel number. Description Gets the unit name of the specified channel (channel type and number) from the stored channel information data. • Returns NULL if it does not exist.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions getErrorMessageDA100 [Visual C only] Syntax const char * getErrorMessageDA100(int errCode); Parameters Specify the error number. DARWIN for Extended API - Visual C/Visual Basic/Visual Basic.NET/Visual C# - errCode Description Gets the error message string corresponding to the specified error number. • Returns a pointer to the string [Unknown] if it does not exist.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions getModuleNameDA100 [Visual C only] Syntax const char * getModuleNameDA100(DAQDA100 daqda100, int unitNo, int slotNo); Parameters daqda100 unitNo Specify the device descriptor. Specify the unit number. slotNo Specify the slot number. Description Gets the module name in the position indicated by the specified unit number and slot number from the stored system configuration data.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions moduleCodeDA100 Syntax int moduleCodeDA100(DAQDA100 daqda100, int unitNo, int slotNo); Visual Basic Public Declare Function moduleCodeDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal unitNo As Long, ByVal slotNo As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions revisionAPIDA100 Syntax const int revisionAPIDA100(void); Declaration Visual Basic Public Declare Function revisionAPIDA100 Lib "DAQDA100"() As Long Visual Basic.NET Public Declare Ansi Function revisionAPIDA100 Lib "DAQDA100"() As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusByteDA100 Syntax int statusByteDA100(DAQDA100 daqda100); Declaration Parameters daqda100 Specify the device descriptor. Description Gets the stored status byte. • If it does not exist, returns “the value when all status bytes are invalid.” Return value Returns the status byte. Reference CDAQDA100::getByte DARWIN for Extended API - Visual C/Visual Basic/Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusCodeDA100 Syntax int statusCodeDA100(DAQDA100 daqda100); Declaration Visual Basic Public Declare Function statusCodeDA100 Lib "DAQDA100"(ByVal daqda100 As Long) As Long Visual Basic.NET Public Declare Ansi Function statusCodeDA100 Lib "DAQDA100"(ByVal daqda100 As Integer) As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions statusReportDA100 Syntax int statusReportDA100(DAQDA100 daqda100); Declaration Parameters daqda100 Specify the device descriptor. Description Gets the stored report status. • If it does not exist, returns “All Invalid.” Return value Returns the report status. Reference CDAQDA100::getReport DARWIN for Extended API - Visual C/Visual Basic/Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toAlarmNameDA100 Syntax int toAlarmNameDA100(int iAlarmType,char * strAlarm,int lenAlarm); Declaration Visual Basic Public Declare Function toAlarmNameDA100 Lib "DAQDA100"(ByVal iAlarmType As Long, ByVal strAlarm As String, ByVal lenAlarm As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toChannelUnitDA100 Syntax int toChannelUnitDA100(DAQDA100 daqda100, int chType, int chNo, char * strUnit, int lenUnit); Visual Basic Public Declare Function toChannelUnitDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal chType As Long, ByVal chNo As Long, ByVal strUnit As String, ByVal lenUnit As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toDoubleValueDA100 Syntax double toDoubleValueDA100(int dataValue, int point); Declaration Visual Basic Public Declare Function toDoubleValueDA100 Lib "DAQDA100"(ByVal dataValue As Long, ByVal point As Long) As Double Visual Basic.NET Public Declare Ansi Function toDoubleValueDA100 Lib "DAQDA100"(ByVal dataValue As Integer, ByVal point As Integer) As Double C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toErrorMessageDA100 Syntax int toErrorMessageDA100(int errCode, char * errStr, int errLen); Visual Basic Public Declare Function toErrorMessageDA100 Lib "DAQDA100"(ByVal errCode As Long, ByVal errStr As String, ByVal errLen As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toModuleNameDA100 Syntax int toModuleNameDA100(DAQDA100 daqda100, int unitNo, int slotNo, char * strName, int lenName); Declaration Visual Basic Public Declare Function toModuleNameDA100 Lib "DAQDA100"(ByVal daqda100 As Long, ByVal unitNo As Long, ByVal slotNo As Long, ByVal strName As String, ByVal lenName As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions toStringValueDA100 Syntax int toStringValueDA100(int dataValue, int point, char * strValue, int lenValue); Visual Basic Public Declare Function toStringValueDA100 Lib "DAQDA100"(ByVal dataValue As Long, ByVal point As Long, ByVal strValue As String, ByVal lenValue As Long) As Long Visual Basic.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions unitIntervalDA100 Syntax double unitIntervalDA100(DAQDA100 daqda100); Declaration Visual Basic Public Declare Function unitIntervalDA100 Lib "DAQDA100"(ByVal daqda100 As Long) As Double Visual Basic.NET Public Declare Ansi Function unitIntervalDA100 Lib "DAQDA100"(ByVal daqda100 As Integer) As Double C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions unitValidDA100 Syntax int unitValidDA100(DAQDA100 daqda100, int unitNo); Declaration Parameters daqda100 Specify the device descriptor. unitNo Specify the unit number. Description Gets valid/invalid of the specified unit number from the stored system configuration data as a Boolean value. • If it does not exist, Invalid is returned. Return value Returns a Boolean value.
24.2 Details of Functions - DARWIN (Visual C/Visual Basic/Visual Basic.NET/C#) - Retrieval Functions versionAPIDA100 Syntax const int versionAPIDA100(void); Declaration Visual Basic Public Declare Function versionAPIDA100 Lib "DAQDA100"() As Long Visual Basic.NET Public Declare Ansi Function versionAPIDA100 Lib "DAQDA100"() As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.3 Details of Functions for Instantaneous Value Loading - DARWIN (Visual C/Visual Basic/ Visual Basic.NET/C#) - Status Transition Functions Basic, Visual Basic.NET, and C# when using the instantaneous value data loading port. Most functions return an error number as a return value. Error number 0 is returned if there is no error. DARWIN for Extended API - Visual C/Visual Basic/Visual Basic.
24.3 Details of Functions for Instantaneous Value Loading - DARWIN- Status Transition Functions closeDA100Reader Syntax int closeDA100Reader(DAQDA100READER daqda100); Declaration Visual Basic Public Declare Function closeDA100Reader Lib "DAQDA100"(ByVal daqda100Reader As Long) As Long Visual Basic.NET Public Declare Ansi Function closeDA100Reader Lib "DAQDA100"(ByVal daqda100Reader As Integer) As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.3 Details of Functions for Instantaneous Value Loading - DARWIN- Status Transition Functions mathInfoChDA100Reader Syntax int mathInfoChDA100Reader(DAQDA100READER daqda100reader, int chNo); Visual Basic Public Declare Function mathInfoChDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chNo As Long) As Long Visual Basic.NET Public Declare Ansi Function mathInfoChDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Integer, ByVal chNo As Integer) As Integer C# [DllImport("DAQDA100.
24.3 Details of Functions for Instantaneous Value Loading - DARWIN- Status Transition Functions mathInstChDA100Reader Syntax int mathInstChDA100Reader(DAQDA100READER daqda100reader, int chNo); Declaration Visual Basic Public Declare Function mathInstChDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chNo As Long) As Long Visual Basic.
24.3 Details of Functions for Instantaneous Value Loading - DARWIN- Status Transition Functions measInfoChDA100Reader Syntax int measInfoChDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo); Visual Basic Public Declare Function measInfoChDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.3 Details of Functions for Instantaneous Value Loading - DARWIN- Status Transition Functions measInstChDA100Reader Syntax int measInstChDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo); Declaration Visual Basic Public Declare Function measInstChDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.3 Details of Functions for Instantaneous Value Loading - DARWIN- Status Transition Functions openDA100Reader Syntax DAQDA100READER openDA100Reader(const char * strAddress, int * errorCode); Visual Basic Public Declare Function openDA100Reader Lib "DAQDA100"(ByVal strAddress As String, ByRef errorCode As Long) As Long Visual Basic.NET Public Declare Ansi Function openDA100Reader Lib "DAQDA100"(ByVal strAddress As String, ByRef errorCode As Integer) As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.4 Details of Instantaneous Value Loading Functions - DARWIN (Visual C/Visual Basic/ Visual Basic.NET/C#) - Status Transition Functions This section describes the DARWIN functions that are used in Visual C, Visual Basic, Visual Basic.NET, and C# when using the instantaneous value data loading port.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions alarmMaxLengthDA100Reader Syntax int alarmMaxLengthDA100Reader(void); Declaration DARWIN for Extended API - Visual C/Visual Basic/Visual Basic.NET/Visual C# Visual Basic Public Declare Function alarmMaxLengthDA100Reader Lib "DAQDA100"() As Long Visual Basic.NET Public Declare Ansi Function alarmMaxLengthDA100Reader Lib "DAQDA100"() As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions alarmTypeDA100Reader Syntax int alarmTypeDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo, int levelNo); Declaration Visual Basic Public Declare Function alarmTypeDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long, ByVal levelNo As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions channelPointDA100Reader Syntax int channelPointDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo); Visual Basic Public Declare Function channelPointDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions channelStatusDA100Reader Syntax int channelStatusDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo); Declaration Visual Basic Public Declare Function channelStatusDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions dataAlarmDA100Reader Syntax int dataAlarmDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo, int levelNo); Visual Basic Public Declare Function dataAlarmDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long, ByVal levelNo As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions dataDayDA100Reader Syntax int dataDayDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo); Declaration Visual Basic Public Declare Function dataDayDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions dataDoubleValueDA100Reader Syntax double dataDoubleValueDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo); Visual Basic Public Declare Function dataDoubleValueDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long) As Double Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions dataHourDA100Reader Syntax int dataHourDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo); Declaration Visual Basic Public Declare Function dataHourDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions dataMilliSecDA100Reader Syntax int dataMilliSecDA100Reader(DAQDA100READER daqda100redaer, int chType, int chNo); Visual Basic Public Declare Function dataMilliSecDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions dataMinuteDA100Reader Syntax int dataMinuteDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo); Declaration Visual Basic Public Declare Function dataMinuteDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions dataMonthDA100Reader Syntax int dataMonthDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo); Visual Basic Public Declare Function dataMonthDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions dataSecondDA100Reader Syntax int dataSecondDA100Reader(DAQDA100READER daqda100redaer, int chType, int chNo); Declaration Visual Basic Public Declare Function dataSecondDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions dataStatusDA100Reader Syntax int dataStatusDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo); Visual Basic Public Declare Function dataStatusDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions dataStringValueDA100Reader Syntax int dataStringValueDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo, char * strValue, int lenValue); Declaration Visual Basic Public Declare Function dataStringValueDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long, ByVal strValue As String, ByVal lenValue As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions dataValueDA100Reader Syntax int dataValueDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo); Visual Basic Public Declare Function dataValueDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions dataYearDA100Reader Syntax int dataYearDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo); Declaration Visual Basic Public Declare Function dataYearDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions errorMaxLengthDA100Reader Syntax int errorMaxLengthDA100Reader(void); Declaration DARWIN for Extended API - Visual C/Visual Basic/Visual Basic.NET/Visual C# Visual Basic Public Declare Function errorMaxLengthDA100Reader Lib "DAQDA100"() As Long Visual Basic.NET Public Declare Ansi Function errorMaxLengthDA100Reader Lib "DAQDA100"() As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions getAlarmNameDA100Reader [Visual C only] Syntax const char * getAlarmNameDA100Reader(int iAlarmType); Parameters iAlarmType Specify the alarm type. Description Gets the string corresponding to the specified alarm type. • If it does not exist, returns the pointer to the string corresponding to ìNo alarm.” Return value Returns a pointer to the string.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions getChannelUnitDA100Reader [Visual C only] Syntax const char * getChannelUnitDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo); daqda100Reader chType Specify the device descriptor. Specify the channel type. chNo Specify the channel number. Description Gets the unit name of the specified channel (channel type and number) from the stored channel information data.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions getErrorMessageDA100Reader [Visual C only] Syntax const char * getErrorMessageDA100Reader(int errCode); Parameters errCode Specify the error number. Description Gets the error message string corresponding to the specified error number. • Returns a pointer to the string [Unknown] if it does not exist. Return value Returns a pointer to the string.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions revisionAPIDA100Reader Syntax const int revisionAPIDA100Reader(void); Declaration DARWIN for Extended API - Visual C/Visual Basic/Visual Basic.NET/Visual C# Visual Basic Public Declare Function revisionAPIDA100Reader Lib "DAQDA100"() As Long Visual Basic.NET Public Declare Ansi Function revisionAPIDA100Reader Lib "DAQDA100"() As Integer C# [DllImport("DAQDA100.dll" CharSet=CharSet.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions toAlarmNameDA100Reader Syntax int toAlarmNameDA100Reader(int iAlarmType, char * strAlarm, int lenAlarm); Declaration Visual Basic Public Declare Function toAlarmNameDA100Reader Lib "DAQDA100"(ByVal iAlarmType As Long, ByVal strAlarm As String, ByVal lenAlarm As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions toChannelUnitDA100Reader Syntax int toChannelUnitDA100Reader(DAQDA100READER daqda100reader, int chType, int chNo, char * strUnit, int lenUnit); Visual Basic Public Declare Function toChannelUnitDA100Reader Lib "DAQDA100"(ByVal daqda100reader As Long, ByVal chType As Long, ByVal chNo As Long, ByVal strUnit As String, ByVal lenUnit As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions toDoubleValueDA100Reader Syntax double toDoubleValueDA100Reader(int dataValue, int point); Declaration Visual Basic Public Declare Function toDoubleValueDA100Reader Lib "DAQDA100"(ByVal dataValue As Long, ByVal point As Long) As Double Visual Basic.NET Public Declare Ansi Function toDoubleValueDA100Reader Lib "DAQDA100"(ByVal dataValue As Integer, ByVal point As Integer) As Double C# [DllImport("DAQDA100.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions toErrorMessageDA100Reader Syntax int toErrorMessageDA100Reader(int errCode, char * errStr, int errLen); Visual Basic Public Declare Function toErrorMessageDA100Reader Lib "DAQDA100"(ByVal errCode As Long, ByVal errStr As String, ByVal errLen As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions toStringValueDA100Reader Syntax int toStringValueDA100Reader(int dataValue, int point, char * strValue, int lenValue); Declaration Visual Basic Public Declare Function toStringValueDA100Reader Lib "DAQDA100"(ByVal dataValue As Long, ByVal point As Long, ByVal strValue As String, ByVal lenValue As Long) As Long Visual Basic.
24.4 Details of Instantaneous Value Loading Functions - DARWIN - Status Transition Functions versionAPIDA100Reader Syntax const int versionAPIDA100Reader(void); Declaration Description Gets the version number of this API. Return value Returns the version number. Reference CDAQDA100Reader::getVersionAPI DARWIN for Extended API - Visual C/Visual Basic/Visual Basic.NET/Visual C# Visual Basic Public Declare Function versionAPIDA100Reader Lib "DAQDA100"() As Long Visual Basic.
Chapter 25 DARWIN for Extended API Constants and Types 25.1 Overview of the DARWIN Constants This Extended API provides the following types of constants. In Visual C/Visual C++, the constants from chapter 11.1 are inherited. Also, constants, retrieval code types, range types, and skip range constants have been added for the Extended API. See section 25.2. The constants for Visual Basic and Visual Basic.NET/C# are listed in section 25.2.
25.2 DARWIN Constants This section describes the mnemonics for and the meanings of the constants. For DARWIN terminology, see appendix 2. Visual C/Visual C++ Constants In Visual C/Visual C++, the constants from chapter 11.2 are inherited. The following constants have been added.
25.2 DARWIN Constants DC Voltage Range Types Mnemonic DAQDA100_RANGE_VOLT_20MV DAQDA100_RANGE_VOLT_60MV DAQDA100_RANGE_VOLT_200MV DAQDA100_RANGE_VOLT_2V DAQDA100_RANGE_VOLT_6V DAQDA100_RANGE_VOLT_20V DAQDA100_RANGE_VOLT_50V Description 20 mV 60 mV 200 mV 2V 6V 20 V 50 V Setting range –20.000 to 20.000 mV –60.00 to 60.00 mV –200.00 to 200.00 mV –2.0000 to 2.0000 V –6.000 to 6.000 V –20.000 to 20.000 V –50.00 to 50.00 V Description R S B K E J T N W L U KpAu7Fe Setting range 0.0 to 1760.0°C 0.0 to 1760.
25.2 DARWIN Constants Contact Input Ranges Mnemonic DAQDA100_RANGE_DI_LEVEL Description Voltage input DAQDA100_RANGE_DI_CONTACT Contact input Setting range 0: Less than 2.4 V, 1: Greater than or equal to 2.
25.2 DARWIN Constants Constants for Visual Basic and Visual Basic.NET/C# This section describes the mnemonics for and the meanings of the constants. For the details on the DARWIN functions, see the relevant user’s manual. In C#, it is the constant data for the DAQDA100 class. Prefix each constant with DAQDA100 (Ex.: DAQDA100.DAQDA100_NUMCHANNEL).
25.2 DARWIN Constants Maximum Value Mnemonic DAQDA100_MAXCHNAMELEN DAQDA100_MAXCHRANGLEN DAQDA100_MAXUNITLEN DAQDA100_MAXMODULELEN DAQDA100_MAXRELAYLEN DAQDA100_MAXDECIMALPOINT Description Maximum length of the channel name string. Maximum length of the channel range name string. Maximum length of the unit name string. Maximum length of the module name string. Maximum length of the relay name string. Same as maximum length of the channel name string.
25.2 DARWIN Constants Alarm Types ◊ indicates a space.
25.2 DARWIN Constants Talker Function Types Mnemonic DAQDA100_TALK_MEASUREDDATA DAQDA100_TALK_OPEDATA DAQDA100_TALK_CHINFODATA DAQDA100_TALK_SYSINFODATA DAQDA100_TALK_CALIBDATA DAQDA100_TALK_SETUPDATA DAQDA100_TALK_REPORTDATA Description Outputs measured and computed data Outputs the setup data of operation mode.
25.
25.2 DARWIN Constants Range Types The Extended API provides definitions for identifying unique ranges. It is synthesized with logical operations.
25.2 DARWIN Constants RTD Ranges Description Pt100:1mA Pt100:2mA JPt100:1mA JPt100:2mA Pt50:2mA Pt100:1mA-H Pt100:2mA-H JPt100:1mA-H JPt100:2mA-H Ni100:1mA-S Ni100:1mA-D Ni120:1mA Cu10:GE Cu10:L&N Cu10:WEED Cu10:BAILEY J263*B Setting range –200.0 to 600.0°C –200.0 to 250.0°C –200.0 to 550.0°C –200.0 to 250.0°C –200.0 to 550.0°C –140.00 to 150.00°C –70.00 to 70.00°C –140.00 to 150.00°C –70.00 to 70.00°C –200.0 to 250.0°C –60.0 to 180.0°C –70.0 to 200.0°C –200.0 to 300.0°C –200.0 to 300.0°C –200.0 to 300.
25.2 DARWIN Constants Power Monitor Ranges Mnemonic DAQDA100_RANGE_POWER_25V05A DAQDA100_RANGE_POWER_25V5A DAQDA100_RANGE_POWER_250V05A DAQDA100_RANGE_POWER_250V5A Description 25 V 0.5 A 25 V 5 A 250 V 0.5 A 250 V 5 A Setting range Voltage 25 V, current 0.5 A Voltage 25 V, current 5 A Voltage 250 V, current 0.5 A Voltage 250 V, current 5 A Description 20 mA Setting range -20.000-20.
25.
25.3 DARWIN Types DAQDA100 Type for storing the device descriptor for these functions. Handled as a Long type in Visual Basic and as int in Visual C. Handled as an Integer type in Visual Basic.NET. Handled as the int type in C#. Callback Type Type Callback type Description Add prefix “DLL” to the function name and write in uppercase. Example: callback type of the openDA100 function: DLLOPENDA100 The callback type is used to link the executable module (.dll) when using the Visual C.
25.4 Overview of DARWIN Constants for Loading Instantaneous Value Data The types of constants provided are listed below. Type Constants Numbers of items Maximum values Boolean values Communication constants Data status values Alarm types Channel types/relay types Unit numbers Description Channel numbers in the unit, etc. Number of subunits, etc. Max length of the channel name string, etc.
25.5 DARWIN Constants for Loading Instantaneous Value Data Visual C/Visual C++ Constants In Visual C/Visual C++, the constants from sections 11.2 and 25.2 are inherited. The following constants have been added. Communication Constants Mnemonic DAQDA100_DATAPORT 25-16 Description The instantaneous value data loading port number.
25.5 DARWIN Constants for Loading Instantaneous Value Data Constants for Visual Basic and Visual Basic.NET/C# This section describes the mnemonics for and the meanings of the constants. For the details on the DARWIN functions, see the relevant user’s manual. In C#, it is the constant data for the DAQDA100Reader class. Prefix each constant with DAQDA100Reader (Ex.: DAQDA100.Reader.DAQDA100READER_NUMCHANNEL).
25.5 DARWIN Constants for Loading Instantaneous Value Data Communication Constants Mnemonic DAQDA100READER_DATAPORT Description The instantaneous value data loading port number. Data Status Values Mnemonic DAQDA100READER_UNKNWON DAQDA100READER_DATA_NORMAL DAQDA100READER_DATA_DIFFINPUT DAQDA100READER_DATA_PLUSOVER DAQDA100READER_DATA_MINUSOVER DAQDA100READER_DATA_SKIP DAQDA100READER_DATA_ILLEGAL DAQDA100READER_DATA_ABNORMAL DAQDA100READER_DATA_NODATA DAQDA100READER_DATA_READER Description Unknown.
25.5 DARWIN Constants for Loading Instantaneous Value Data Channel/Relay types Mnemonic DAQDA100READER_CHTYPE_MAINUNIT DAQDA100READER_CHTYPE_STANDALONE DAQDA100READER_CHTYPE_MATHTYPE Description Value expressing the main unit of the expandable model. Value expressing the main unit of the standalone model. Same as subunit number 0. Value representing the computation.
25.6 DARWIN Types for Loading Instantaneous Value Data DAQDA100READER Type for storing the device descriptor for these functions. Handled as the Long type in Visual Basic and as int in Visual C. Handled as an Integer type in Visual Basic.NET. Handled as the int type in C#. Callback Type Type Callback type Description Add prefix “DLL” to the function name and write in uppercase.
Chapter 26 Error Messages 26.1 API Error Messages When a function fails during execution, an error number is returned. Below is a list of error numbers, message strings, and corrective actions. They are common to the MX100 and DARWIN. IM MX190-01E 26-1 26 Error Messages Error number Message string Description Corrective Action/Remarks 0 Success Completed normally. 1 Communication error Communication error occurred. Check the communication environment (address, cable, power to the device).
26.1 API Error Messages Error number Message string Description Corrective Action/Remarks 10 Not acknowledge Received an unsupported response. The response from the measurement instrument is different from the expected response. Check the transmitted command or the procedure. 11 Not support Specified an unsupported function. May have specified a value outside the range. Check the values of the parameters passed to the function. 12 Not data There is no data. Invalid input to the function.
26.2 MX100 - Specific Error Messages Below is a list of error values generated by the MX100, descriptions, and corrective actions. The function CDAQMX::getLastError or getLastErrorMX can be used to retrieve the value. With the extension API, a function (DAQMX100::getLastError or lastErrorMX100) can be used to retrieve the value. Value 0 1 2 3 4 6 7 8 9 10 11 12 13 14 255 256 IM MX190-01E 26-3 26 Error Messages 23 Description Corrective Action/Remarks No error.
Appendix Appendix 1 MX100 Terminology This section describes the terminology related to this software and the MX100. The main terms are listed in alphabetical order. For more details, see the MX100 user’s manual. 7-Segment LED Data indicating the display of the 7-segment LED. See the MXSegment structure. There are two 7-segment LEDs on the MX100. The two 7-segment LEDs must always be handled as a group. Display Format The display status of all segments are indicated using a display format value.
Appendix 1 MX100 Terminology Alarm Alarm function. See the MXAlarm structure. Alarm Level Alarm function ID number within the channel. It is an integer value between 1 and 2. Numbers are defined. Alarm Value The threshold level for alarm activation (the ON value). It is an integer value with the decimal point excluded. Hysteresis The difference between the alarm value and alarm OFF threshold value when assigning a width between the two. It is a positive integer value with the decimal point excluded.
Appendix 1 MX100 Terminology Backup Function used to record the measured data to the CF card when the communication is cut off. Channel The channel is represented by the channel type and channel number. Channel numbers are determined by the slot position on the unit and the terminal position of the module installed in that slot. Channel Name The name is created from the unit number and the channel number within the unit. Expressed with an integer. In the case of strings, a five-digit decimal (ex.
Appendix 1 MX100 Terminology Channel ID Information A value for identifying channels using channel setup data and channel information data. See the MXChID structure. It includes the following information. • Channel number • Decimal point position • Channel status (Boolean value) • Channel kind • Range type • Scale type • Unit name • Tag • Comment • Alarm Comment An arbitrary string of up to 30 bytes. The terminator is NULL. Tag An arbitrary string of up to 15 bytes. The terminator is NULL.
Appendix 1 MX100 Terminology Channel Setup Data Setup information for each channel. See the MXChConfig structure. The MXChConfigData structure includes all channels. It includes the channel identification information and the by-type settings for each channel. Data Identifier The value that identifies the data values created by the user with data manipulation functions of the extension API. It is an integer starting from 0. The above depends on the system. It is assigned for each data type.
Appendix 1 MX100 Terminology FIFO The operation of writing measured data to the FIFO buffer. On the MX100, the FIFO must be started to retrieve measured data. The user can specify the starting and stopping of the FIFO. The FIFO can also be set to auto control. In the case of the MX100, the FIFO is divided up by measurement interval type. Each type is identified by the FIFO number. The measurement interval and FIFO structure are as follows.
Appendix 1 MX100 Terminology Initial Balance Data Data that shows the initial balance values of strain channels. See the MXBalance structure. The MXBalanceData structure includes all channels. It consists of valid and invalid values, and the initial balance values. When data is retrieved, it is displayed as the valid and invalid values of the strain channels. When data is sent, only channels specified as valid are updated and sent.
Appendix 1 MX100 Terminology Measured Value The measured values are expressed using a data value and a decimal point position. The value with an engineering unit is obtained by using the data value and the decimal point position. Data Value A value that expresses the mantissa of the measured value as an integer value. Decimal Point Position A value that expresses the exponent of the measured value. It is an integer value between 0 and 4. Is -1 only for the strain range of 200000 µstrain.
Appendix 1 MX100 Terminology Output Channel Data Data that specifies the control method for output data using output channels (AO/ PWM channels). For details of the specified actions, see the “MX100 Data Acquisition Unit User’s Manual” (IM MX100-01E) and the “MX100 Standard Software User’s Manual” (IMMX180-01E). See MXOutput structure. The MXOutputData structure includes all channels. It is a portion of the setup data. It consists of the following items.
Appendix 1 MX100 Terminology Reference Channel Number The channel used as a reference for difference computations with AI/DI channels or for remote RJC with AI channels. It is the channel number of the transmission source for transmission output with AO/ PWM channels. Response For every request command there is a corresponding reply. For every request command there is a corresponding reply. The response is either of the following. • Processing was carried out normally.
Appendix 1 MX100 Terminology Setup Data Setup information of the MX100. See the MXConfigData structure. All setup data gets the basic settings, system configuration data, and status data and merges the information. For information about the items retrieved for each data, see the data structures for each item under “Type.” It consists of the following data.
Appendix 1 MX100 Terminology Unit Expresses the status when data is retrieved. Used to indicate the data terminator for data retrieval. Represents the status when the data is retrieved using the talker. A value synthesized through logical OR computations of the flag status. Unit Information A unit is a single system centering on a main module. It consists of the following items.
Appendix 2 DARWIN Terminology This section describes the terminology related to the API and the DARWIN. The main terms are listed in alphabetical order. For more details, see the DARWIN user’s manual. Alarm Alarm function. Alarm Level Alarm function ID number within the channel. It is an integer value between 1 and 4. Numbers are defined. Alarm Type For DARWIN, it is the alarm type indicated in the alarm type list. Alarm Value The value at which the alarm turns ON.
Appendix 2 DARWIN Terminology Channel The channel is represented by the channel type and channel number. DARWIN has measurement channels and computation channels. Measurement Channels Channels whose channel type represents the subunit number of the expandable model or the unit on the standalone model. It is the input position identifying number that determines the module connection position. The channel number is created from the slot number and the terminal number.
Appendix 2 DARWIN Terminology Channel Information Data Static information such as the channel type, channel number, and decimal point position for each channel. See the DarwinChInfo structure. The data can be retrieved using the output of the channel information data by the talker. Unit Name An arbitrary string of up to 6 bytes. Channel Status Uses a value that is common with the data status. See the data status value. Device Descriptor Value used to identify the measuring instrument.
Appendix 2 DARWIN Terminology Measurement Interval The measurement interval. The unit is seconds. Relay The relay is represented by the relay type and relay number. Relay Type A value used to identify the relay position and type. See Channel/Relay types. Either the main unit and subunit number of the expandable model, or internal switch. Relay Number Noncontinuous between relay types. It is an integer value between 1 and 60.
Appendix 2 DARWIN Terminology Status Byte A value indicating the status of the instrument. A value synthesized through logical OR computations of the status byte. System Configuration Data Unit and module information. See the DarwinSystemInfo structure. Unit Number A number identifying the unit in the system configuration. See Channel/Relay types. It is either the main unit or subunit number. On the standalone model, the only valid unit number is 0.
Appendix 2 DARWIN Terminology Time Information Data Date/Time data indicating the measurement time. Generally, this is the number of seconds from Jan. 1, 1970. See the DarwinDateTime structure. The milliseconds value is not used. Milliseconds is used when using the instantaneous value data loading communication port. Unit Expresses the status when data is retrieved. Used to indicate the data terminator for data retrieval. A value synthesized through logical OR computations of the flag status.
Appendix 3 Calculation of the MX100 Timeout Value The timeout value is the time until the saving of the data sampled at the measurement interval to the CF card is started when the connection is cut off. It is an integer greater than or equal to 60. The unit is seconds. The default value is 60 s. To save the sampled data to the CF card without dropouts when the communication is cut off, the data must be saved to the CF card before the unsaved data in the FIFO buffer is overwritten.
Appendix 4 API Revision History (R2.01) The following lists the additions and deletions that were made to functions for this API R2.01.
Appendix 4 API Revision History (R2.
Appendix 4 API Revision History (R2.
Appendix 4 API Revision History (R2.
Appendix 4 API Revision History (R2.
Appendix 4 API Revision History (R2.
Appendix 5 API Revision History (R3.01) The following lists the additions and changes that were made for this API R3.01.
Appendix 5 API Revision History (R3.
Appendix 5 API Revision History (R3.
Appendix 5 API Revision History (R3.
Appendix 5 API Revision History (R3.
Index Symbols .bas ..................................................................................... 1-5 .cs ....................................................................................... 1-5 .dll ....................................................................................... 1-5 .h ......................................................................................... 1-5 .lib ....................................................................................... 1-5 .txt ...........
Index CDAQDARWIN::setDateTime ........................................... 7-27 CDAQDARWIN::setDELTA ............................................... 7-27 CDAQDARWIN::setDI ....................................................... 7-28 CDAQDARWIN::setMA ..................................................... 7-29 CDAQDARWIN::setPOWER ............................................. 7-30 CDAQDARWIN::setPULSE .............................................. 7-31 CDAQDARWIN::setRRJC ......................................
Index IM MX190-01E CDAQMX::setTransmit ..................................................... 2-66 CDAQMX::setUserTime .................................................... 2-67 CDAQMX::startFIFO ......................................................... 2-67 CDAQMX::stopFIFO ......................................................... 2-67 CDAQMX::talkChData ...................................................... 2-68 CDAQMX::talkChInfo ........................................................
Index CDAQMX100::setOutputType ......................................... 12-52 CDAQMX100::setPulseTime .......................................... 12-52 CDAQMX100::setRange ................................................. 12-53 CDAQMX100::setRefAlarm ............................................ 12-54 CDAQMX100::setRJCType ............................................ 12-54 CDAQMX100::setScale .................................................. 12-55 CDAQMX100::setSpan .........................................
Index IM MX190-01E CDAQMXConfig::getItemError ........................................ 2-135 CDAQMXConfig::getRangePoint .................................... 2-136 CDAQMXConfig::getSpanPoint ...................................... 2-136 CDAQMXConfig::initialize ............................................... 2-136 CDAQMXConfig::initMXConfigData ................................ 2-137 CDAQMXConfig::isCorrect ............................................. 2-137 CDAQMXConfig::isObject ..........................
Index CDAQMXDOData::getDOONOFF .................................. 2-164 CDAQMXDOData::getDOValid ....................................... 2-165 CDAQMXDOData::getMXDO ......................................... 2-165 CDAQMXDOData::getMXDOData .................................. 2-165 CDAQMXDOData::initialize ............................................ 2-166 CDAQMXDOData::initMXDOData .................................. 2-166 CDAQMXDOData::isObject ............................................
Index IM MX190-01E Constants (MX100) ............................................................. 6-1 Contact Input (DI) Range .................................................. 11-7 Contact Input (DI) Ranges .............................................. 25-11 Contact Input Ranges ....................................................... 25-4 Control Functions ... 2-4, 3-1, 4-1, 7-3, 8-2, 9-2, 12-4, 13-2, 142, 15-2, 16-2, 19-3, 20-2, 21-2, 22-2, 23-2 Current Data ......................
Index getErrorMessageDARWIN ......................................... 10-9 getMaxLenAlarmNameDARWIN .............................. 10-10 getMaxLenErrorMessageDARWIN ........................... 10-11 getModuleNameDA100 [Visual C only] .................... 24-58 getReportStatusDARWIN ......................................... 10-12 getRevisionAPIDARWIN .......................................... 10-13 getSetDataByLineDA100 ............................................ 24-5 getSetDataByLineDARWIN ................
Index DO Data ......................................................................... App-5 DO Data Number ........................................................... App-5 E Enumeration Constants ............................................. 6-3, 11-2 error number ..................................................................... 26-1 Error Processing ................. 2-14, 3-12, 4-11, 7-12, 8-14, 9-10 Establish Setup Mode .......................................................
Index createBalanceMX100 ............................................... 17-19 createDOMX100 ....................................................... 17-20 createTransmitMX100 .............................................. 17-21 currentAOPWMValidMX100 ................................... 17-138 currentAOPWMValueMX100 .................................. 17-139 currentBalanceResultMX100 .................................. 17-140 currentBalanceValidMX100 ....................................
Index IM MX190-01E statusSecondMX100 .............................................. 17-204 statusTimeMX100 ................................................... 17-205 statusUnitMX100 .................................................... 17-206 statusYearMX100 ................................................... 17-207 stopFIFOMX ............................................................... 5-87 switchBackupMX100 ................................................ 17-79 switchDOMX100 ..........................
Index MX100 Class .......................................................... 2-37, 12-20 MX100 Class for API ........................................................... 2-1 MX100 Class for extended API ......................................... 12-1 MX100 Dedicated Class ..................................................... 2-1 MX100/DARWIN Common Class .............................. 2-1, 2-15 MXAlarm ........................................................................... 6-27 MXAOPWM ...................
Index Setting (Operation Mode) Functions19-3, 20-2, 21-2, 22-2, 232 Setup Change Functions ............. 12-5, 13-3, 14-3, 15-3, 16-3 Setup Data ................................................................... App-11 Setup Functions 2-5, 7-3, 8-2, 9-2, 12-4, 13-2, 14-2, 15-2, 16-2 Setup Item Numbers .................................................... App-10 Setup Items .............................................................. 15-6, 16-6 Skip .........................................................