ioLogik MXIO DLL API Reference Second Edition, June 2008 www.moxa.com/product © 2008 Moxa Inc., all rights reserved. Reproduction without permission is prohibited.
ioLogik MXIO DLL API Reference The software described in this manual is furnished under a license agreement, and may be used only in accordance with the terms of that agreement. Copyright Notice Copyright © 2008 Moxa Inc. All rights reserved. Reproduction without permission is prohibited. Trademarks Moxa is a registered trademark of Moxa Inc. All other trademarks or registered marks in this manual belong to their respective manufacturers.
Table of Contents Chapter 1. Overview ....................................................................................................1-1 What is the MXIO Linux Library? ....................................................................................... 1-2 Supported Platforms ............................................................................................................. 1-2 Supported I/O Modules .........................................................................................
Chapter 5. Modbus Command Sets ...........................................................................5-1 Chapter 6. Direct I/O Command Sets .........................................................................6-1 Digital Input Commands ...................................................................................................... 6-2 Digital Input Commands for ioLogik E2000, R2000 ........................................................... 6-3 Counter Commands for ioLogik E2000, R2000....
1 Chapter 1. Overview This reference introduces the MXIO Linux Library for Moxa’s ioLogik 4000, E2000, and R2000 remote I/O.
ioLogik MXIO DLL API Reference Overview What is the MXIO Linux Library? The MXIO Linux Library is a set of tools for programmers to use with Moxa’s ioLogik 4000, E2000, and R2000 remote I/O. Programmers can use the library when developing applications to manage I/O devices and obtain I/O data remotely over an Ethernet or RS-485 network. The MXIO Linux Library is designed for x86 platforms and Moxa’s UC-7100-LX, UC-7400-LX, and IA-240-LX line of embedded computers.
ioLogik MXIO DLL API Reference Function DI_Reads DI_Read DO_Reads DO_Writes DO_Read DO_Write DO_GetSafeValues DO_SetSafeValues DO_GetSafeValue DO_SetSafeValue AI_Reads AI_Read AI_ReadRaws AI_ReadRaw AO_Reads AO_Writes AO_Read AO_Write AO_ReadRaws AO_WriteRaws AO_ReadRaw AO_WriteRaw AO_GetSafeValues AO_SetSafeValues AO_GetSafeValue AO_SetSafeValue AO_GetSafeRaws AO_SetSafeRaws AO_GetSafeRaw AO_SetSafeRaw RTD_Reads RTD_Read RTD_ReadRaws RTD_ReadRaw RTD2K_ResetMin RTD2K_ResetMins RTD2K_ResetMax RTD2K_ResetMax
ioLogik MXIO DLL API Reference Function RTD2K_ReadMaxs RTD2K_GetStartStatus RTD2K_SetStartStatus RTD2K_GetStartStatuses RTD2K_SetStartStatuses RTD2K_GetSensorType RTD2K_SetSensorType RTD2K_GetSensorTypes RTD2K_SetSensorTypes RTD2K_GetEngUnit RTD2K_SetEngUnit RTD2K_GetEngUnits RTD2K_SetEngUnits RTD2K_GetMathPar RTD2K_SetMathPar RTD2K_GetMathPars RTD2K_SetMathPars TC_Reads TC_Read TC_ReadRaws TC_ReadRaw Module2K_GetSafeStatus Module2K_ClearSafeStatus Adp4K_ReadStatus Adp4K_ClearStatus Adp4K_ReadFirmwareRevi
ioLogik MXIO DLL API Reference Function Cnt2K_Clears Cnt2K_Read Cnt2K_Clear Cnt2K_GetOverflows Cnt2K_ClearOverflows Cnt2K_GetOverflow Cnt2K_ClearOverflow Cnt2K_GetFilters Cnt2K_SetFilters Cnt2K_GetFilter Cnt2K_SetFilter Cnt2K_GetStartStatuses Cnt2K_SetStartStatuses Cnt2K_GetStartStatus Cnt2K_SetStartStatus Cnt2K_GetTriggerTypes Cnt2K_SetTriggerTypes Cnt2K_GetTriggerType Cnt2K_SetTriggerType Cnt2K_GetPowerOnValues Cnt2K_SetPowerOnValues Cnt2K_GetPowerOnValue Cnt2K_SetPowerOnValue Cnt2K_GetSafeValues Cnt2K_S
ioLogik MXIO DLL API Reference Function Pulse2K_SetPowerOnValue Pulse2K_GetSafeValues Pulse2K_SetSafeValues Pulse2K_GetSafeValue Pulse2K_SetSafeValue AI2K_ReadMins AI2K_ReadMinRaws AI2K_ResetMins AI2K_ReadMin AI2K_ReadMinRaw AI2K_ResetMin AI2K_ReadMaxs AI2K_ReadMaxRaws AI2K_ResetMaxs AI2K_ReadMax AI2K_ReadMaxRaw AI2K_ResetMax AI2K_GetRanges AI2K_SetRanges AI2K_GetRange AI2K_SetRange AO2K_GetRanges AO2K_SetRanges AO2K_GetRange AO2K_SetRange AO2K_GetPowerOnValues AO2K_SetPowerOnValues AO2K_GetPowerOnValue AO
2 Chapter 2. Programming Flow The process used to obtain access to a remote I/O device on an ioLogik is similar for both Ethernet and serial interfaces. Five different scenarios are described below. The following topics are covered: Connecting to a Single Ethernet I/O Connecting to Multiple Ethernet I/O Connecting to a Single Serial I/O Connecting to Multiple RS-485 I/O Connecting to the ioLogik E2000 and Attached RS-485 I/O Modbus Command Sets vs.
ioLogik MXIO DLL API Reference Programming Flow Connecting to a Single Ethernet I/O The MXIO Linux Library establishes a data tunnel using Modbus commands to communicate with the Ethernet I/O. Access is usually established using TCP port number 502. ioLogik 4000 remote I/O IP: 192.168.8.1 Port: 502 ioLogik E2000 Ethernet I/O IP: 192.168.8.1 Port: 502 Three steps are required to access remote I/O data using the MXIO Linux Library. 1. Use MXEIO_Connect to connect to the Ethernet I/O using IP:Port (e.g.
ioLogik MXIO DLL API Reference Programming Flow Connecting to Multiple Ethernet I/O Before multiple Ethernet I/O can be accessed over the network, make sure that each I/O has a unique IP address. ioLogik 4000 remote I/O IP: 192.168.8.1 Port: 502 ioLogik E2000 Ethernet I/O IP: 192.168.8.2 Port: 502 Each Ethernet I/O needs a unique handle in order to be accessed. Use MXEIO_Connect to obtain the handle for each Ethernet I/O. Program Flow II. Connecting to Multiple Ethernet I/O.
ioLogik MXIO DLL API Reference Programming Flow Connecting to a Single Serial I/O ioLogik 4000 and R2000 I/O can be used in RS-485, RS-232 control networks. For access to I/O over RS-485 or RS-232, please pay attention to the following: z z z Your computer must be equipped with an RS-232 or RS-485 communication port. Make sure that the baudrate and communication parameters for the computer and the I/O are identical.
ioLogik MXIO DLL API Reference Programming Flow Connecting to Multiple RS-485 I/O In most real world applications, multiple RS-485 I/O are often connected to the same network. One RS-485 network can support up to 32 nodes. ioLogik 4000 remote I/O ID: 01 ioLogik E2000 Ethernet I/O ID: 32 Each serial I/O requires a unique handle. Make sure each serial I/O server already has its own handle before accessing the I/O points. Program Flow IV. Connecting Multiple Serial I/O.
ioLogik MXIO DLL API Reference Programming Flow Connecting to the ioLogik E2000 and Attached RS-485 I/O It is possible to combine Ethernet and RS-485 connections, as shown in the following figure. Program Flow V. Connecting to the ioLogik E2000 Ethernet I/O and Attached RS-485 I/O.
ioLogik MXIO DLL API Reference Programming Flow Modbus Command Sets vs. Direct I/O Command Sets The MXIO Library offers two options for accessing I/O data from ioLogik 4000, E2000, and R2000 I/O. Modbus Command Sets ioLogik 4000, E2000, and R2000 I/O use Modbus/TCP and Modbus/RTU to communicate with host computers. The MXIO Library includes Modbus command sets that use the Modbus protocol data format to access I/O data.
3 Chapter 3.
ioLogik MXIO DLL API Reference MXIO API Overview System Command Sets RS-485/RS-232 I/O Connect Commands Function Name MXSIO_OpenCommport MXSIO_CloseCommport MXSIO_Connect MXSIO_Disconnect Ethernet I/O Connect Commands Function Name MXEIO_Init MXEIO_Exit MXEIO_Connect MXEIO_Disconnect MXEIO_CheckConnection General Commands Function Name MXIO_GetDllVersion MXIO_GetDllBuildDate MXIO_GetModuleType MXIO_ReadFirmwareRevision MXIO_ReadFirmwareDate MXIO_Restart MXIO_Reset Special Commands for ioLogik E2000, R2
ioLogik MXIO DLL API Reference MXIO API Overview Modbus Command Sets Function Name MXIO_ReadCoils MXIO_WriteCoils MXIO_ReadRegs MXIO_WriteRegs Direct I/O Command Sets Digital Input Commands Function Name DI_Reads DI_Read Digital Input Commands for ioLogik E2000, R2000 Function Name DI2K_GetModes DI2K_SetModes DI2K_GetMode DI2K_SetMode DI2K_GetFilters DI2K_SetFilters DI2K_GetFilter DI2K_SetFilter Digital Input / Output Mode Commands for ioLogik E2000 Function Name DIO2K_GetIOMode DIO2K_SetIOMode DIO2K_G
ioLogik MXIO DLL API Reference MXIO API Overview Counter Commands for ioLogik E2000, R2000 Function Name Cnt2K_Reads Cnt2K_Clears Cnt2K_Read Cnt2K_Clear Cnt2K_GetOverflows Cnt2K_ClearOverflows Cnt2K_GetOverflow Cnt2K_ClearOverflow Cnt2K_GetFilters Cnt2K_SetFilters Cnt2K_GetFilter Cnt2K_SetFilter Cnt2K_GetStartStatuses Cnt2K_SetStartStatuses Cnt2K_GetStartStatus Cnt2K_SetStartStatus Cnt2K_GetTriggerTypes Cnt2K_SetTriggerTypes Cnt2K_GetTriggerType Cnt2K_SetTriggerType Cnt2K_GetPowerOnValues Cnt2K_SetPowerOn
ioLogik MXIO DLL API Reference MXIO API Overview Digital Output Commands for ioLogik E2000, R2000 Function Name DO2K_GetModes DO2K_SetModes DO2K_GetMode DO2K_SetMode DO2K_GetPowerOnValues DO2K_SetPowerOnValues DO2K_GetPowerOnValue DO2K_SetPowerOnValue Digital Output Commands for ioLogik 4000 Function Name DO4K_GetSafeActions DO4K_SetSafeActions DO4K_GetSafeAction DO4K_SetSafeAction Pulse Output Commands for ioLogik E2000, R2000 Function Name Pulse2K_GetSignalWidths Pulse2K_SetSignalWidths Pulse2K_GetSig
ioLogik MXIO DLL API Reference MXIO API Overview Analog Input Commands Function Name AI_Reads AI_Read AI_ReadRaws AI_ReadRaw Analog Input Commands for ioLogik E2000, R2000 Function Name AI2K_ReadMins AI2K_ReadMinRaws AI2K_ResetMins AI2K_ReadMin AI2K_ReadMinRaw AI2K_ResetMin AI2K_ReadMaxs AI2K_ReadMaxRaws AI2K_ResetMaxs AI2K_ReadMax AI2K_ReadMaxRaw AI2K_ResetMax AI2K_GetRanges AI2K_SetRanges AI2K_GetRange AI2K_SetRange Analog Output Commands Function Name AO_Reads AO_Writes AO_Read AO_Write AO_ReadRaws A
ioLogik MXIO DLL API Reference MXIO API Overview Analog Output Commands for ioLogik E2000, R2000 Function Name AO2K_GetRanges AO2K_SetRanges AO2K_GetRange AO2K_SetRange AO2K_GetPowerOnValues AO2K_SetPowerOnValues AO2K_GetPowerOnValue AO2K_SetPowerOnValue AO2K_GetPowerOnRaws AO2K_SetPowerOnRaws AO2K_GetPowerOnRaw AO2K_SetPowerOnRaw Analog Output Commands for ioLogik 4000 Function Name AO4K_GetSafeActions AO4K_SetSafeActions AO4K_GetSafeAction AO4K_SetSafeAction RTD Commands Function Name RTD_Reads RTD_Re
ioLogik MXIO DLL API Reference MXIO API Overview Function Name RTD2K_GetSensorType RTD2K_SetSensorType RTD2K_GetSensorTypes RTD2K_SetSensorTypes RTD2K_GetEngUnit RTD2K_SetEngUnit RTD2K_GetEngUnits RTD2K_GetMathPar RTD2K_SetMathPar RTD2K_GetMathPars RTD2K_SetMathPars Thermocouple Commands Function Name TC_Reads TC_Read TC_ReadRaws TC_ReadRaw Click&Go Logic Commands Function Name Logic2K_GetStartStatus Logic2K_SetStartStatus Active I/O Message Commands Function Name Message2K_Start Message2K_Stop 3-8
4 Chapter 4. System Command Sets System commands include functions that initialize the connection between a host computer and the I/O. In addition, system commands include functions for obtaining hardware and status information of the I/O itself.
ioLogik MXIO DLL API Reference System Commands Sets RS-232/RS-485 I/O Connect Commands MXSIO_OpenCommport This function opens the local COM port of the host computer with communication parameters. C/C++ int MXSIO_OpenCommport ( char DWORD BYTE DWORD int Arguments szCommport: Name of the common port, e.g., “ttyM0”. dwBaudrate: Baudrate, from 4,800 to 115,200 bps. Does not support 1200 or 2400 bps. bytDataFormat: Transmission data format.
ioLogik MXIO DLL API Reference MXSIO_Connect C/C++ Arguments System Commands Sets Based on the COM port handle or ioLogik E2000 handle, users must use this function to establish an I/O device handle for each RS-485 or RS-232 I/O. A COM port handle can connect one RS-232 I/O or up to 32 RS-485 I/O. int MXSIO_Connect ( int hCommport, BYTE bytUnitID, BYTE bytTransmissionMode, int *hConnection); hCommport: I/O over serial interface will get a serial handle.
ioLogik MXIO DLL API Reference System Commands Sets Ethernet I/O Connect Commands MXEIO_Init Initiate the socket, only for windows OS. C/C++ int MXEIO_Init (); Arguments None Return Value Succeed MXIO_OK. Fail Refer to Return Codes. MXEIO_Exit To terminates use of the socket, only for windows OS. C/C++ int MXEIO_Exit (); Arguments None Return Value None. MXEIO_Connect This function establishes a connection to the port of the Ethernet I/O.
ioLogik MXIO DLL API Reference System Commands Sets MXEIO_Disconnect This will close the connection with the Ethernet I/O; the handle will be invalid. C/C++ int MXEIO_Disconnect (int hConnection); Arguments hConnection: Handle of the connection. Return Value Succeed MXIO_OK. Fail Refer to Return Codes. This establishes a connection to the port of the Ethernet I/O. Once MXEIO_CheckConnection the connection is established, a handle will be returned for additional functions.
ioLogik MXIO DLL API Reference MXIO_GetModuleType System Commands Sets This function reports the model name of the network adapter and I/O modules. C/C++ int MXIO_GetModuleType ( int hConnection, BYTE bytSlot, WORD * wType); Arguments hConnection: I/O handle for a connection. bytSlot: Slot number of the I/O to be checked, from 0 to 32. The ioLogik 4000 network adapter’s slot number is always 0. This parameter is inactive for ioLogik E2000 and R2000 I/O. A pointer to the model name.
ioLogik MXIO DLL API Reference System Commands Sets MXIO_Restart This function is used to restart the I/O. C/C++ int MXIO_Restart ( int hConnection); Arguments hConnection: I/O handle for a connection. Return Value Succeed MXIO_OK. Fail Refer to Return Codes. MXIO_Reset This function is used to reset the I/O. C/C++ int MXIO_Reset ( int hConnection); Arguments hConnection: I/O handle for a connection. Return Value Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Adp4K_ReadStatus System Commands Sets This function code is used to read the status of the ioLogik 4000 adapter. C/C++ int Adp4K_ReadStatus ( int WORD WORD WORD WORD WORD Arguments hConnection: The handle for an I/O connection. wBusStatus: Stores the bus status in numerical format. The values are: 0: Normal Operation. 1: Bus Standby. 2: Bus Communication Fault. 3: Slot Configuration Failed. 4: No Expansion Slot.
ioLogik MXIO DLL API Reference System Commands Sets Adp4K_ClearStatus This function code is used to clear the status of the ioLogik 4000 adapters. C/C++ int Adp4K_ClearStatus ( int Arguments hConnection: Return Value Succeed MXIO_OK. Fail Refer to Return Codes. hConnection); The handle for an I/O connection. Adp4K_ReadFirmwareDate This function code is used to read the firmware release date.
5 Modbus Command Sets Chapter 5. Four basic Modbus commands are provided in the Modbus command set. However, you must refer to the Modbus reference table in ioAdmin to extract data from the Modbus packet. MXIO_ReadCoils This function reads the on/off status for a contiguous group of coils on the same I/O. C/C++ int MXIO_ReadCoils ( int BYTE WORD WORD BYTE Arguments hConnection: Handle for the I/O connection. bytCoilType: Coil type to be read. 1: read coils (output bit).
ioLogik MXIO DLL API Reference MXIO_WriteCoils Modbus Command Sets This function code is used to write the contiguous status of an I/O coils. C/C++ int MXIO_WriteCoils ( int WORD WORD BYTE Arguments hConnection: Handle for the I/O connection. wStartCoil: Specifies the starting coil to be written. The address is beginning at 0. wCount: The number of coils to be written. bytCoils: An array that stores the coil value; each byte holds eight coil values. Succeed MXIO_OK.
ioLogik MXIO DLL API Reference MXIO_WriteRegs Modbus Command Sets This function code is used to write the contents of a contiguous block of the I/O holding registers. C/C++ int MXIO_WriteRegs ( int hConnection, WORD wStartRegister, WORD wCount, WORD wRegister[ ]); Arguments hConnection: The handle for an I/O connection. wStartRegister: Specifies the starting register address. The address begins at 0. wCount: The number of coils to be written. wRegister: An array that stores the register values.
6 Chapter 6. Direct I/O Command Sets Direct I/O command sets provide an intuitive way to access the data for each channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Digital Input Commands DI_Reads This function code is used to read the status of a group of contiguous D/I channels. C/C++ int DI_Reads ( int BYTE BYTE BYTE DWORD Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. hConnection, bytSlot, bytStartChannel, bytCount, * dwValue); bytStartChannel: Specifies the starting channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Digital Input Commands for ioLogik E2000, R2000 DI2K_GetModes This function code is used to get the mode of contiguous D/I channels. C/C++ int DI2K_GetModes ( int BYTE BYTE WORD Arguments hConnection: Return Value hConnection, bytStartChannel, bytCount, wMode[ ]); The handle for an I/O connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets DI2K_GetMode This function code is used to get the mode of a specific D/I channel. C/C++ int DI2K_GetMode ( int BYTE WORD Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. wMode: A pointer to the mode of the desired D/I channel. The values are: 0: D/I Mode. 1: Counter Mode. Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets DI2K_SetFilters This function code is used to set the filter of contiguous D/I channels. C/C++ int DI2K_SetFilters ( int BYTE BYTE WORD Arguments hConnection: hConnection, bytStartChannel, bytCount, wFilter[ ]); The handle for an I/O connection. bytStartChannel: Specifies the starting channel. Return Value bytCount: The number of channels to set. wFilter: An array that stores the filter values of the contiguous D/I channels.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Counter Commands for ioLogik E2000, R2000 Cnt2K_Reads This function code is used to read the counter values of contiguous D/I channels in Counter mode. C/C++ int Cnt2K_Reads ( int BYTE BYTE DWORD Arguments hConnection: hConnection, bytStartChannel, bytCount, dwValue[ ]); The handle for an I/O connection. bytStartChannel: Specifies the starting channel. Return Value bytCount: The number of channels to read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Cnt2K_Clear This function code is used to clear the counter value of a specific D/I channel in Counter mode. C/C++ int Cnt2K_Clear ( int hConnection, BYTE bytChannel); Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. Succeed MXIO_OK. Fail Refer to Return Codes. Return Value Cnt2K_GetOverflows This function code is used to get the overflow statuses of contiguous D/I channels in Counter mode.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Cnt2K_GetOverflow This function code is used to get the overflow status of a specific D/I channel in Counter mode. C/C++ int Cnt2K_GetOverflow( int hConnection, BYTE bytChannel, BYTE * bytStatus); Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. bytStatus: A pointer to the overflow status of the desired channel. The values are : 0: Normal 1: Overflow Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Cnt2K_SetFilters This function code is used to set the filter values of contiguous D/I channels in Counter mode. C/C++ int Cnt2K_SetFilters ( int BYTE BYTE WORD Arguments hConnection: hConnection, bytStartChannel, bytCount, wFilter[ ]); The handle for an I/O connection. bytStartChannel: Specifies the starting channel. Return Value bytCount: The number of channels to set.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Cnt2K_GetStartStatuses This function code is used to get the start statuses of contiguous D/I channels in Counter mode. C/C++ int Cnt2K_GetStartStatuses ( int BYTE BYTE DWORD Arguments hConnection: The handle for an I/O connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Cnt2K_GetStartStatus This function code is used to get the start status of a specific D/I channel in Counter mode. C/C++ int Cnt2K_GetStartStatus ( int BYTE BYTE Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. bytStatus: A pointer to the start status of the desired channel. The values are : 0 : stop 1 : start Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Cnt2K_GetTriggerTypes This function code is used to get the trigger types of contiguous D/I channels in Counter mode. C/C++ int Cnt2K_GetTriggerTypes ( int BYTE BYTE DWORD Arguments hConnection: hConnection, bytStartChannel, bytCount, * dwType); The handle for an I/O connection. bytStartChannel: Specifies the starting channel. Return Value bytCount: The number of channels to read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Cnt2K_GetTriggerType This function code is used to get the trigger type of a specific D/I channel in Counter mode. C/C++ int Cnt2K_GetTriggerType ( int BYTE BYTE Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. bytType: A pointer to the trigger type for a specific channel. The values are: 0 : LoToHi 1 : HiToLo Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Cnt2K_GetPowerOnValues This function code is used to get the power on values of contiguous D/I channels in Counter mode. C/C++ int Cnt2K_GetPowerOnValues ( int BYTE BYTE DWORD Arguments hConnection: hConnection, bytStartChannel, bytCount, * dwValue); The handle for an I/O connection. bytStartChannel: Specifies the starting channel. Return Value bytCount: The number of channels to read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Cnt2K_GetPowerOnValue This function code is used to get power on values when specific D/I channel in Counter mode. C/C++ int Cnt2K_GetPowerOnValue ( int BYTE BYTE Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. bytValue: A pointer to the power on value for specific channel. The values are: 0: OFF 1: ON Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Cnt2K_GetSafeValues This function code is used to get the safe values of contiguous D/I channels in Counter mode. C/C++ int Cnt2K_GetSafeValues ( int BYTE BYTE DWORD Arguments hConnection: The handle for an I/O connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to read. dwValue: A pointer to the safe values; each bit holds the safe value of one channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Cnt2K_GetSafeValue This function code is used to get the safe value of a specific D/I channel in Counter mode. C/C++ int Cnt2K_GetSafeValue ( int BYTE BYTE Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. bytValue: A pointer to the safe value of the desired channel. The values are: 0: OFF 1: ON Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Digital Output Commands DO_Reads This function code is used to read the output statuses of contiguous D/O channels. C/C++ int DO_Reads ( int BYTE BYTE BYTE DWORD Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets DO_Writes This function code is used to write the output statuses of contiguous D/O channels. There may not contiguous channels if you use ioLogik E2212 DIO channels. Please make sure they are contiguous channels or “ILLEGAL_DATA_VALUE” will be return. C/C++ int DO_Writes ( int BYTE BYTE BYTE DWORD Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32.
ioLogik MXIO DLL API Reference Direct I/O Command Sets DO_GetSafeValues This function code is used to get the output safe values of contiguous D/O channels. C/C++ int DO_GetSafeValues ( int BYTE BYTE BYTE DWORD Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. hConnection, bytSlot, bytStartChannel, bytCount, * dwValue); bytStartChannel: Specifies the starting channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets DO_GetSafeValue This function code is used to get the safe value for a specific D/O channel. C/C++ int DO_GetSafeValue ( int BYTE BYTE BYTE Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. bytChannel: The desired channel. bytValue: Stores the safe value of the desired D/O channel. 1 represents ON, 0 represents OFF.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Digital Output Commands for ioLogik E2000, R2000 DO2K_GetModes This function code is used to get the mode of contiguous D/O channels. C/C++ int DO2K_GetModes ( int BYTE BYTE WORD Arguments hConnection: Return Value hConnection, bytStartChannel, bytCount, wMode[ ]); The handle for an I/O connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets DO2K_GetMode This function code is used to get the mode of a specific D/O channel. C/C++ int DO2K_GetMode( int BYTE BYTE Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. wMode: A pointer to the mode of tthe desired D/O channel. The values are: 0: D/O mode 1: Pulse mode Return Value hConnection, bytChannel, * wMode); Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets DO2K_GetPowerOnValues This function code is used to get the power on values of contiguous D/O channels. C/C++ int DO2K_GetPowerOnValues ( int BYTE BYTE DWORD Arguments hConnection: bytStartChannel: Return Value hConnection, bytStartChannel, bytCount, * dwValue); The handle for an I/O connection. Specifies the starting channel. bytCount: The number of channels to read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets DO2K_GetPowerOnValue This function code is used to get the power on value for a specific D/O channel. C/C++ int DO2K_GetPowerOnValue ( int BYTE BYTE Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. bytValue: A pointer to the power on value of the desired D/O channel. Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets DIO2K_SetIOMode This function code is used to set specific channel's DI/DO mode. This function will take effect after restart the device. C/C++ int DIO2K_SetIOMode ( int hConnection, BYTE bytChannel, BYTE bytMode); hConnection: The handle for an I/O connection. bytChannel: The specific channel to be set. Arguments bytMode: Return Value Succeed Fail A pointer that stores the specific channel's DI/DO mode.
ioLogik MXIO DLL API Reference Direct I/O Command Sets DIO2K_SetIOModes This function code is used to set contiguous channel's DI/DO mode. This function will take effect after restart the device. C/C++ int DIO2K_SetIOModes ( int hConnection, BYTE bytStartChannel, BYTE bytCount, DWORD dwMode); hConnection: The handle for an I/O device connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to be set.
ioLogik MXIO DLL API Reference Direct I/O Command Sets DO4K_SetSafeActions This function code is used to set the safe actions of contiguous D/O channels. C/C++ int DO4K_SetSafeActions ( int BYTE BYTE BYTE WORD Arguments hConnection: hConnection, bytSlot, bytStartChannel, bytCount, wAction[ ]); The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. Return Value bytStartChannel: Specifies the starting channel. bytCount: The number of channels to set.
ioLogik MXIO DLL API Reference Direct I/O Command Sets DO4K_SetSafeAction This function code is used to set the safe action for a specific channel. C/C++ int DO4K_GetSafeAction ( int BYTE BYTE WORD Arguments hConnection: hConnection, bytSlot, bytChannel, wAction); The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. Return Value bytChannel: The desired channel. wAction: Stores the safe action for the desired D/O channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Pulse2K_SetSignalWidths This function code is used to set the Hi/Lo signal widths of contiguous pulse output channels. C/C++ int Pulse2K_SetSignalWidths ( int hConnection, BYTE bytStartChannel, BYTE bytCount, WORD wHiWidth[ ], WORD wLoWidth[ ]); hConnection: The handle for an I/O connection. Arguments Return Value bytStartChannel: Specifies the starting channel. bytCount: The number of channels to set.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Pulse2K_SetSignalWidth This function code is used to set the Hi/Lo signal width for a specific pulse channel. C/C++ int Pulse2K_SetSignalWidth ( int hConnection, BYTE bytChannel, WORD wHiWidth, WORD wLoWidth); Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. wHiWidth: A pointer to the Hi signal width of the desired channel. A pointer to the Lo signal width of the desired channel.
ioLogik MXIO DLL API Reference Pulse2K_SetSignalWidths32 C/C++ Direct I/O Command Sets This function code is used to set the contiguous pulse channel's Hi/Lo signal width (32 bits). The function code is designed for the ioLogik E2260 only. int Pulse2K_SetSignalWidths32 ( int hConnection, BYTE bytStartChannel, BYTE bytCount, DWORD dwHiWidth[ ], DWORD dwLoWidth[ ]); Visual Basic Declare Function Pulse2K_SetSignalWidths32 Lib “MXIO.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Pulse2K_GetSignalWidth32 This function code is used to get the Hi/Lo signal width (32 bits) for a specific pulse channel. The function code is designed for the ioLogik E2260 only. int Pulse2K_GetSignalWidth32 C/C++ ( int hConnection, BYTE bytChannel, DWORD *dwHiWidth, DWORD *dwLoWidth); Visual Basic Arguments Declare Function Pulse2K_GetSignalWidth32 Lib “MXIO.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Pulse2K_GetSignalWidth32 This function code is used to set the Hi/Lo signal width (32 bits) for a specific pulse channel. The function code is designed for the ioLogik E2260 only. int Pulse2K_SetSignalWidth32 C/C++ ( int hConnection, BYTE bytChannel, DWORD dwHiWidth, DWORD dwLoWidth); Visual Basic Declare Function Pulse2K_SetSignalWidth32 Lib “MXIO.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Pulse2K_SetOutputCounts This function code is used to set the output counts for contiguous pulse output channels. C/C++ hConnection, int Pulse2K_SetOutputCounts ( int BYTE bytStartChannel, BYTE bytCount, DWORD dwOutputCounts[ ]); Arguments hConnection: The handle for an I/O connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to set.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Pulse2K_GetStartStatuses This function code is used to get the start statuses of contiguous pulse channels. C/C++ int Pulse2K_GetStartStatuses ( int BYTE BYTE DWORD Arguments hConnection: hConnection, bytStartChannel, bytCount, * dwStatus); The handle for an I/O connection. bytStartChannel: Specifies the starting channel. Return Value bytCount: The number of channels to read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Pulse2K_SetStartStatuses This function code is used to set the start statuses of contiguous pulse channels. C/C++ int Pulse2K_SetStartStatuses ( int BYTE BYTE DWORD Arguments hConnection: The handle for an I/O connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to set. dwStatus: Stores the start statuses of the contiguous pulse channels; each bit holds the value of one channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Pulse2K_SetStartStatus This function code is used to set the start status for a specific pulse channel. C/C++ int Pulse2K_SetStartStatus ( int BYTE BYTE Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. bytStatus: Stores the start status of the desired channel. The values are : 0: stop 1: start Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Pulse2K_SetPowerOnValues This function code is used to set the power on values of contiguous pulse channels. C/C++ int Pulse2K_SetPowerOnValues ( int BYTE BYTE DWORD Arguments hConnection: hConnection, bytStartChannel, bytCount, dwValue); The handle for an I/O connection. bytStartChannel: Specifies the starting channel. Return Value bytCount: The number of channels to set.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Pulse2K_SetPowerOnValue This function code is used to set the power on value for a specific pulse channel. C/C++ int Pulse2K_SetPowerOnValue ( int BYTE BYTE Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. bytValue: Stores the power on value for the desired channel. The values are: 0: stop 1: start Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Pulse2K_SetSafeValues This function code is used to set the safe value. C/C++ int Pulse2K_SetSafeValues ( int hConnection, BYTE bytStartChannel, BYTE bytCount, DWORD dwValue); Arguments hConnection: The handle for an I/O connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to set. dwValue: Stores the safe value, each bit holds the value of one channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets Pulse2K_SetSafeValue This function code is used to set the safe value for a specific pulse channel. C/C++ int Pulse2K_SetSafeValue ( int BYTE BYTE Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. bytValue: Stores the specific pulse channel’s power on value. The values are: 0: stop 1: start Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AI_Read This function code is used to read the value of a specific analog input channel. C/C++ int AI_Read ( int BYTE BYTE double Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. bytChannel: The desired channel. dValue: A pointer to the value of the desired analog input channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AI_ReadRaw This function code is used to read the raw data value of a specific analog input channel. C/C++ int AI_ReadRaw ( int BYTE BYTE WORD Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. bytChannel: The desired channel. wValue: A pointer to raw data value of the desired analog input channel. Succeed MXIO_OK.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AI2K_ReadMinRaws This function code is used to read the minimize raw data values of contiguous A/I channels. C/C++ int AI2K_ReadMinRaws ( int BYTE BYTE WORD Arguments hConnection: hConnection, bytStartChannel, bytCount, wValue[ ]); The handle for an I/O connection. bytStartChannel: Specifies the starting channel. Return Value bytCount: The number of channels to read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AI2K_ReadMinRaw This function code is used to read the minimize raw data value for a specific A/I channel. C/C++ int AI2K_ReadMinRaw( int hConnection, BYTE bytChannel, int * iValue); Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. iValue: A pointer to the minimize raw data value for the desired channel. Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AI2K_ReadMaxRaws This function code is used to read the maximize raw data values for contiguous A/I channels. C/C++ int AI2K_ReadMaxRaws ( int BYTE BYTE WORD Arguments hConnection: Return Value hConnection, bytStartChannel, bytCount, wValue[ ]); The handle for an I/O connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AI2K_ReadMaxRaw This function code is used to read the maximize raw data value for a specific A/I channel. C/C++ int AI2K_ReadMaxRaw ( int BYTE WORD Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. wValue: A pointer to the raw data value of the desired A/I channel. Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AI2K_SetRanges This function code is used to set the ranges of contiguous A/I channels. C/C++ int AI2K_SetRanges ( int BYTE BYTE WORD Arguments hConnection: The handle for an I/O connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to set. wRange: An array that stores the ranges of the contiguous A/I channels; wRange[0] represents the value of the starting channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AI2K_SetRange This function code is used to set the range for a specific A/I channel. C/C++ int AI2K_SetRange ( int BYTE WORD Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. wRange: Stores the range of the desired A/I channel. The values are: 00: ±150mV 01: ±500mV 02: ±5V 03: ±10V 04: 0-20mA 05: 4-20mA Others: return Illegal Data Value Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AO_Writes This function code is used to write the values of contiguous analog output channels. C/C++ int AO_Writes ( int BYTE BYTE BYTE double Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. bytStartChannel: Return Value hConnection, bytSlot, bytStartChannel, bytCount, dValue[ ]); Specifies the starting channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AO_Write This function code is used to write the status for a specific analog output channel. C/C++ int AO_Write ( int BYTE BYTE double Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. bytChannel: The desired channel. dValue: Stores the value of the desired channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AO_WriteRaws This function code is used to write the raw data values for contiguous analog output channels. C/C++ int AO_WriteRaws ( int BYTE BYTE BYTE WORD Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. hConnection, bytSlot, bytStartChannel, bytCount, wValue[ ]); bytStartChannel: Specifies the starting channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AO_WriteRaw This function code is used to write the raw data value of a specific analog output channel. C/C++ int AO_WriteRaw ( int BYTE BYTE WORD Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. bytChannel: The specific channel to be written. wValue: Stores the raw data value for the desired analog output channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AO_SetSafeValues This function code is used to set the safe values for contiguous A/O channels. C/C++ int AO_SetSafeValues ( int BYTE BYTE BYTE Double Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to set.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AO_SetSafeValue This function code is used to set the safe value for a specific A/O channel. C/C++ int AO_SetSafeValue ( int BYTE BYTE double Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. bytChannel: The desired channel. dValue: Stores the safe value of the desired A/O channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AO_SetSafeRaws This function code is used to set safe values for contiguous A/O channels in raw data format. C/C++ int AO_GetSafeRaws ( int BYTE BYTE BYTE WORD Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. hConnection, bytSlot, bytStartChannel, bytCount, wValue[ ]); bytStartChannel: Specifies the starting channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AO_SetSafeRaw This function code is used to set the safe value for a specific A/O channel in raw data format. C/C++ int AO_SetSafeRaw ( int BYTE BYTE WORD Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. bytChannel: The desired channel. wValue: Stores the safe value for the desired channel in raw data format.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AO2K_SetRanges This function code is used to set the ranges of contiguous A/O channels. C/C++ int AO2K_SetRanges ( int BYTE BYTE WORD Arguments hConnection: The handle for an I/O connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to set. wRange: An array that stores the ranges of the contiguous A/O channels. wRange[0] represents the value of the starting channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AO2K_SetRange This function code is used to set the range for a specific A/O channel. C/C++ int AO2K_SetRange ( int BYTE WORD Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. wRange: Stores the specific A/O channel’s range. The values are: 0: 0-10 VDC 1: 4-20 mA Others: return Illegal Data Value Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AO2K_SetPowerOnValues This function code is used to set the power on values of contiguous A/O channels. C/C++ int AO2K_SetPowerOnValues ( int BYTE BYTE double Arguments hConnection: Return Value hConnection, bytStartChannel, bytCount, dValue[ ]); The handle for an I/O connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to set.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AO2K_GetPowerOnRaws This function code is used to get the power on values of contiguous A/O channels in raw data format. C/C++ int AO2K_GetPowerOnRaws ( int BYTE BYTE WORD Arguments hConnection: hConnection, bytStartChannel, bytCount, wValue[ ]); The handle for an I/O connection. bytStartChannel: Specifies the starting channel. Return Value bytCount: The number of channels to read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AO2K_SetPowerOnRaw This function code is used to set the power on value of a specific analog output channel in raw data format. C/C++ int AO2K_SetPowerOnRaw ( int hConnection, BYTE bytChannel, WORD wValue); Arguments hConnection: The handle for an I/O connection. bytChannel: The desired channel. wValue: Stores the power on value for the desired channel in raw data format. Succeed MXIO_OK. Fail Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AO4K_SetSafeActions This function code is used to set the safe actions of contiguous A/O channels. C/C++ int AO4K_SetSafeActions ( int BYTE BYTE BYTE WORD Arguments hConnection: hConnection, bytSlot, bytStartChannel, bytCount, wAction[ ]); The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. bytStartChannel: Specifies the starting channel. Return Value bytCount: The number of channels to set.
ioLogik MXIO DLL API Reference Direct I/O Command Sets AO4K_SetSafeAction This function code is used to set the safe action for a specific channel. C/C++ int AO4K_GetSafeAction ( int BYTE BYTE WORD Arguments hConnection: hConnection, bytSlot, bytChannel, wAction); The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. Return Value bytChannel: The desired channel. wAction: Stores the safe action of the desired A/O channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD_Read This function code is used to read the temperature value for a specific channel. C/C++ int RTD_Read ( int BYTE BYTE double Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. bytChannel: The desired channel. dValue: A pointer to the temperature value of the desired channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD_ReadRaws This function code is used to read the temperatures for contiguous channels in raw data format. C/C++ int RTD_ReadRaws ( int BYTE BYTE BYTE WORD Arguments hConnection: The handle for an I/O server connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD_ReadRaw This function code is used to read the temperature value of a specific channel in raw data format. C/C++ int RTD_ReadRaw ( int BYTE BYTE WORD Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. bytChannel: The desired channel. wValue: A pointer to the temperature value of the desired channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_ResetMins This function code is used to reset contiguous RTD channel's minimize value. C/C++ int RTD2K_ResetMins (int hConnection, BYTE bytStartChannel, BYTE bytCount); Arguments hConnection: The handle for an I/O device connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to be reset. Return Value Succeed Fail MXIO_OK. Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_ReadMinRaw This function code is used to read the RTD input minimize raw data for a specific channel. C/C++ Arguments int RTD2K_ReadMinRaw (int hConnection, BYTE bytChannel, WORD * iValue); hConnection: The handle for an I/O device connection. bytChannel : The specific channel to be read. iValue: An point that stores the specific RTD channel's minimize raw data.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_ReadMaxRaws This function code is used to read contiguous RTD channel's maximize raw data. C/C++ int RTD2K_ReadMaxRaws ( int hConnection, BYTE bytStartChannel, BYTE bytCount, WORD wValue[ ]); hConnection: The handle for an I/O device connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to be read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_ReadMins This function code is used to read contiguous RTD channel's minimize value. C/C++ int RTD2K_ReadMins ( int hConnection, BYTE bytStartChannel, BYTE bytCount, double dValue[ ]); hConnection: The handle for an I/O device connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to be read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_ReadMaxs This function code is used to read contiguous RTD channel's maximize value. C/C++ int RTD2K_ReadMaxs ( int hConnection, BYTE bytStartChannel, BYTE bytCount, double dValue[ ]); hConnection: The handle for an I/O device connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to be read.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_SetStartStatus This function code is used to set specific channel's start status. C/C++ int RTD2K_SetStartStatus ( int hConnection, BYTE bytChannel, BYTE bytStatus); hConnection: The handle for an I/O device connection. bytChannel: The specific channel to be set. bytStatus: A pointer that stores the specific RTD channel's start status. The values are : 0 : stop 1 : start Arguments Return Value Succeed Fail MXIO_OK. Refer to Return Codes.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_SetStartStatuses This function code is used to set contiguous channel's start status. C/C++ int RTD2K_SetStartStatuses ( int hConnection, BYTE bytStartChannel, BYTE bytCount, DWORD dwStatus); hConnection: The handle for an I/O device connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to be set.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_GetSensorType This function code is used to get the sensor type for a specific RTD channel. C/C++ int RTD2K_GetSensorType ( int hConnection, BYTE bytChannel, WORD * wSensorType ); hConnection: The handle for an I/O device connection. bytChannel : The specific channel to be get. wSensorType: A pointer that stores the specific RTD channel's sensor type.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_SetSensorType This function code is used to set the sensor type for a specific RTD channel. C/C++ int RTD2K_SetSensorType ( int hConnection, BYTE bytChannel, WORD wSensorType); hConnection: The handle for an I/O device connection. bytChannel : The specific channel to be set. wSensorType: A pointer that stores the specific RTD channel's sensor type.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_GetSensorTypes This function code is used to get contiguous RTD channel's sensor type. C/C++ int RTD2K_GetSensorTypes ( int hConnection, BYTE bytStartChannel, BYTE bytCount, WORD wSensorType[ ]); hConnection: The handle for an I/O device connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to be get.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_SetSensorTypes This function code is used to set contiguous RTD channel's sensor type. C/C++ int RTD2K_SetSensorTypes ( int hConnection, BYTE bytStartChannel, BYTE bytCount, WORD wSensorType[ ]); hConnection: The handle for an I/O device connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to be set.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_GetEngUnit This function code is used to get the engineering unit for a specific RTD channel. C/C++ int RTD2K_GetEngUnit ( Arguments hConnection: bytChannel : wEngUnit: int hConnection, BYTE bytChannel, WORD * wEngUnit ); The handle for an I/O device connection. The specific channel to be get. A pointer that stores the specific RTD channel's engineering unit.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_GetEngUnits This function code is used to get contiguous RTD channel's engineering unit. C/C++ int RTD2K_GetEngUnits ( Arguments hConnection: bytStartChannel: bytCount: wEngUnit: int hConnection, BYTE bytStartChannel, BYTE bytCount, WORD wEngUnit[ ]); The handle for an I/O device connection. Specifies the starting channel. The number of channels to be gets.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_SetEngUnits This function code is used to get contiguous RTD channel's engineering unit. C/C++ int RTD2K_SetEngUnits ( Arguments hConnection: bytStartChannel: bytCount: wEngUnit: int hConnection, BYTE bytStartChannel, BYTE bytCount, WORD wEngUnit[ ]); The handle for an I/O device connection. Specifies the starting channel. The number of channels to be set.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_SetMathPar This function code is used to set the math parameter for a specific RTD channel. C/C++ int RTD2K_SetMathPar ( Arguments int hConnection, BYTE bytChannel, WORD wMathPar); hConnection: The handle for an I/O device connection. bytChannel : The specific channel to be set. wMathPar: A pointer that stores the specific RTD channel's math parameter.
ioLogik MXIO DLL API Reference Direct I/O Command Sets RTD2K_SetMathPars This function code is used to set contiguous RTD channel's math parameter. C/C++ int RTD2K_SetMathPars ( Arguments Return Value int hConnection, BYTE bytStartChannel, BYTE bytCount, WORD wMathPar[ ]); hConnection: The handle for an I/O device connection. bytStartChannel: Specifies the starting channel. bytCount: The number of channels to be sets.
ioLogik MXIO DLL API Reference Direct I/O Command Sets TC_Read This function code is used to read the temperature value of a specific channel. C/C++ int TC_Read ( int BYTE BYTE double Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. bytChannel: The desired channel. dValue: Stores the temperature value of the desired channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets TC_ReadRaw This function code is used to read the temperature value of a specific channel in raw data format. C/C++ int TC_ReadRaw ( int hConnection, BYTE bytSlot, BYTE bytChannel, WORD * wValue); Arguments hConnection: The handle for an I/O connection. bytSlot: Slot number of the I/O module, from 1 to 32. This parameter is inactive for the ioLogik E2000 and R2000. bytChannel: The desired channel.
7 Chapter 7. Click&Go Logic Commands Click&Go logic commands are for ioLogik E2000 Ethernet I/O only. These commands involve the activation of Click&Go logic on an ioLogik E2000 I/O. Logic2K_GetStartStatus C/C++ Arguments Return Value This function code is used to verify activation of Click&Go logic on an ioLogik E2000 Ethernet I/O. int Logic2K_GetStartStatus ( int hConnection, WORD * wStatus); hConnection: The handle for an I/O connection.
8 Chapter 8. Active I/O Message Commands Active I/O message commands are for ioLogik E2000 Ethernet I/O only. These commands manage active I/O messages that are received from an ioLogik E2000. Message2K_Start This function code is used to start receiving active I/O messages from an ioLogik E2000 Ethernet I/O.
9 Chapter 9. Return Value MXIO_OK ILLEGAL_FUNCTION Value 0 1001 ILLEGAL_DATA_ADDRESS 1002 ILLEGAL_DATA_VALUE 1003 SLAVE_DEVICE_FAILURE 1004 SLAVE_DEVICE_BUSY 1006 EIO_TIME_OUT 2001 EIO_INIT_SOCKETS_FAIL 2002 EIO_CREATING_SOCKET_ERROR 2003 EIO_RESPONSE_BAD 2004 EIO_SOCKET_DISCONNECT 2005 PROTOCOL_TYPE_ERROR SIO_OPEN_FAIL SIO_TIME_OUT 2006 3001 3002 Return Codes Description Function call was successful.
ioLogik MXIO DLL API Reference Return Codes SIO_CLOSE_FAIL SIO_PURGE_COMM_FAIL SIO_FLUSH_FILE_BUFFERS_FAIL SIO_GET_COMM_STATE_FAIL SIO_SET_COMM_STATE_FAIL SIO_SETUP_COMM_FAIL SIO_SET_COMM_TIME_OUT_FAIL 3003 3004 3005 3006 3007 3008 3009 SIO_CLEAR_COMM_FAIL SIO_RESPONSE_BAD 3010 3011 SIO_TRANSMISSION_MODE_ERROR 3012 SIO_BAUDRATE_NOT_SUPPORT PRODUCT_NOT_SUPPORT 3013 4001 HANDLE_ERROR SLOT_OUT_OF_RANGE CHANNEL_OUT_OF_RANGE COIL_TYPE_ERROR REGISTER_TYPE_ERROR FUNCTION_NOT_SUPPORT 4002 4003 4004 4005
10 Chapter 10. Product Model and ID Reference Table The MXIO DLL library is designed for use by the ioLogik line of remote I/O, including the ioLogik 4000, E2000 and R2000. A list of supported products is provided below. To support new I/O modules, you must upgrade to this version of the MXIO library.
ioLogik MXIO DLL API Reference Product Model and ID Reference Table 0x3400 0x3401 0x3402 0x3403 0x3410 0x3411 0x3412 0x3413 0x3414 0x3415 0x6200 0x6201 M-3400 M-3401 M-3402 M-3403 M-3410 M-3411 M-3412 M-3413 M-3414 M-3415 M-6200 M-6201 Analog Input 4 AI, current, 0 to 20 mA, 12 bit, RTB 4 AI, current, 0 to 20 mA, 14 bit, RTB 4 AI, current, 4 to 20 mA, 12 bit, RTB 4 AI, current, 4 to 20 mA, 14 bit, RTB 4 AI, voltage, 0 to 10V, 12 bit, RTB 4 AI, voltage, 0 to 10V, 14 bit, RTB 4 AI, voltage, -10 to 10V, 12