Home
ioLogik MXIO DLL API User`s Manual v6
Contents
1. 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_GetlOMode DIO2K_SetIOMode DIO2K_GetlIOModes DIO2K_SetIOModes ioLogik MXIO DLL API Reference MXIO API Overview Digital Input Commands for ioLogik E4200 Function Name E42 DI Reads Digital Input Commands for ioLogik W5000 Function Name W5K_DI_Reads W5K_DI_Reads W5K_DI_GetModes W5K_DI_GetModes W5K_DI_SetModes W5K_DI_SetModes W5K_DI GetFilters W5K_DI_GetFilters W5K_DL SetFilters Digital Input Commands for ioLogik E1200 Function Name E1K _ DI Reads E1K_DI_GetModes E1K_DI_SetModes E1K_DI_GetFilters E1K_DI_SetFilters 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 ioLogik MXIO DLL API Refe
2. E1K_Cnt_SetTriggerTypeWords Visual Basic Arguments Return Value when the D I channel is in Count mode int E1K_Cnt_SetTriggerTypeWords int hConnection BYTE bytStartChannel BYTE bytCount WORD wType Declare Function E1K_Cnt_SetTriggerTypeWords Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iType As Integer As Long hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be cleared wType Stores contiguous channels triggers types each bit holds one channel trigger type A bit value of 0 represents the trigger type of the start channel A bit value of 1 represents the second channel s trigger type The values are 0 LoToHi 1 HiToLo 2 Both MXIO_OK Refer to Return Codes 6 71 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_Cnt_GetSaveStatusesOn PowerFail Visual Basic Arguments Return Value This function code is used to get contiguous channels DI DO power off storage enable mode int E1K_Cnt_GetSaveStatusesOnPowerFail int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwMode Declare Function E1K_Cnt_GetSaveStatusesOnPowerFail Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nMode As Long As Long hConnection The handle for an I O devic
3. WS5K_Cnt_GetSafeValues Visual Basic Arguments Return Value This function code is used to get contiguous channel s safe values when D I channel in Count mode int W5K_Cnt_GetSafeValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Declare Function W5K_Cnt_GetSafeValues Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be get dwValue A pointer that stores the contiguous channel s safe values each bit holds one channel safe value A bit value of 0 represents the safe value of the start channel A bit value of 1 represents the second channel s safe value The values are 0 OFF 1 ON MXIO_OK Refer to Return Codes 6 52 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K_Cnt_SetSafe Values This function code is used to set contiguous channel s safe ca values when D I channel in Count mode int W5K_Cnt_SetSafeValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function W5K_Cnt_SetSafeValues Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nValue As Long As Long Arguments hConnection The handle for an I O device s conne
4. WS5K_Message_Stop This function code is used to stop receive active message of ioLogik 5000 Ethernet Module C C int W5K_Message_Stop int iProtocol Visual Basic Declare Function W5K_Message_Stop Lib MXIO dll ByVal nProtocol As Long As Long Arguments iProtocol Transmission protocol 1 TCP 2 UDP Return Value MXIO_OK Refer to Return Codes 9 Return Codes Return Value MXIO_OK o Function call was successful ILLEGAL_FUNCTION 1001 The function code received in the query is not an allowable action for the server or slave ILLEGAL_DATA_ADDRESS 1002 The data address received in the query is not an allowable address for the server or slave ILLEGAL_DATA_VALUE 1003 A value contained in the query data field is not an allowable value for the server or slave 1 SLAVE_DEVICE_FAILURE 004 An unrecoverable error occurred while the server or slave was attempting to perform the requested action SLAVE_DEVICE_BUSY 1006 Specialized use in conjunction with programming commands The server or slave is engaged in processing a long duration program command The client or master should retransmit the message later when the server or slave is free EIO_TIME_OUT 2001 The following situation may cause an EIO_TIME OUT 1 Open socket timeout 2 Send command to the I O server timeout 3 I O response timeout EIO_INIT_SOCKETS_FAIL 2002 An error occurred when the Windows system couldn
5. ec eeeeeeecsseeeesecneeeeeeseecaeeneeaeens 6 118 Pulse Output Commands for io Logik W5000 e ce eeseseeeeeseceeeeeceeeeeceaeeeeesecaeeseeneeeeeaees 6 131 Analog Input Commands ssr E a aE lhl bese bathaecontsaeeeatens 6 141 Analog Input Commands for ioLogik E2000 R2000 cee ceeeeeeeeceseeeeeseceeeecnereeesaees 6 143 Analog Input Commands for 10 Logik E4200 00 eee eecesecseeseceeeeecneeeecsaeceeesecaeeseeneeaeeeeens 6 153 Analog Input Commands for ioLogik W5000 ee eeceseceeesecseeeecneeeecaeeeeesecaeeseeneeeeeeaees 6 155 Analog Input Commands for E1200 ccc eeceeeeceseeccsseceeesecseesecnaseecsaeceessecaeeeeenesaeeeeens 6 167 Analog Output Commands s sss eee ee eecesecesecseecseecaeeeeeseaeeseeesecesecsecsaecsaecsaecseecaeseaeeeaeees 6 178 Analog Output Commands for ioLogik E2000 R2000 ce ceeeceeesceseeeeeeeceeeeeeeeeeeaees 6 186 Analog Output Commands for ioLogik 4000 000 eeceseceeesecneeeecneeeecaeceeesecaeeseeneseeesaees 6 191 Analog Output Commands for ioLogik E4200 eecseeeseeeceseeeeeeceaeeeeesecaeeseenereeesaees 6 194 Relay Commands for ioLogik 2000 0 0 ee esescseecceseeeceseceeesecaeesecseeeeceecnaesecsaeceessesaeeeeens 6 205 Relay Commands for ioLogik W5000 escsescsseeeceseceeesecseesecsaeeecsaeceessecaeesesnereeesaees 6 208 Relay Commands for E1200 ce essecssecseesecseesecsececcseceessecaeesecnaeeesaeeeeaecaeesesneeseenaees 6 212 RED Commands sa a n shen sth eee A r e A E R A wees 6 213 Th
6. Refer to Return Codes Return Value 6 118 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 int Pulse2K_SetSignalWidths int hConnection BYTE bytStartChannel BYTE bytCount WORD wHiWidth WORD wLoWiadth Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to set wHiWidth An array that stores the Hi signal widths of the contiguous pulse output channels wHiWidth 0 represents the Hi signal width of the starting channel wLoWidth An array that stores the Lo signal widths of the contiguous pulse output channels wLoWidth 0 represents the Lo signal width of the starting channel MXIO_OK Refer to Return Codes Return Value Pulse2K_GetSignalWidth This function code is used to get the Hi Lo signal width for a specific pulse channel int Pulse2K_GetSignal Width 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 wLoWidth A pointer to the Lo signal width of the desired channel Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 119 ioLogik MXIO DLL API Reference Direct I O Command Sets P
7. Return Value MXIO_OK Refer to Return Codes 6 213 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 int RTD_Read int hConnection BYTE bytSlot BYTE bytChannel double dValue 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 When dValue is 0x8000 it means the sensor is not correctly wired or the measured value is out of range When using the RTD module for Resistance Input the unit is Ohm When the operating mode is temperature sensor the unit is C or F depending on the setting Use the ioAdmin utility to check the current settings for the desired channels Return Value MXIO OK Refer to Return Codes 6 214 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 int RTD_ReadRavws int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount WORD wValue 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 S
8. 6 48 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Cnt_SetTriggerTypes This function code is used to set contiguous channel s trigger types when D I channel in Count mode int W5K_Cnt_SetTriggerTypes int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwType Visual Basic Declare Function W5K_Cnt_SetTriggerTypes Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nType As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be clear dwType Stored the contiguous channel s triggers types each bit holds one channel trigger type A bit value of 0 represents the trigger type of the start channel A bit value of 1 represents the second channel s trigger type The values are 0 LoToHi 1 HiToLo Return Value MXIO_OK Refer to Return Codes 6 49 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Cnt_GetPowerOnValues This function code is used to get contiguous channel s power M ip chal Can a int W5K_Cnt_GetPowerOnValues hConnection bytStartChannel bytCount dwValue Visual Basic Declare Function W5K_Cnt_GetPowerOnValues Lib MXIO dll ByVal hConnection As Long bytStartChannel As Byte bytCount As Byte As Long As Long Arguments hConnection The handle for an I O device s connec
9. ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iMode As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel The number of channels to be set An array that stores the mode of contiguous D O channels The values are 0 D O mode 1 Pulse mode Return Value MXIO_OK Refer to Return Codes 6 100 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_DO_GetPowerOnValues This function code is used to get the power on value of contiguous D O channels int E1K_DO_GetPowerOnValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function E1K_DO_GetPowerOnValues Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read dwValue A pointer that stores the power on value of contiguous D O channels each bit holds one channel value A bit value of 0 represents the power on status of the start channel A bit value of 1 represents the status of the second digital output channel The values of the unused bits are random Return Value MXIO_OK Refer to Return Codes 6 101 ioLogik MXIO DLL API Reference Direct I O Command Sets E
10. E1K_Cnt_GetTriggerTypeWords E1K_Cnt_SetTriggerTypeWords E1K_Cnt_GetSaveStatusesOnPowerFail E1K_Cnt_SetSaveStatusesOnPowerFail Digital Output Commands Function Name DO_Reads DO_Read DO_Writes DO_Write DO_GetSafeValues DO_SetSafeValues DO_GetSafeValue DO_SetSafe Value DO_GetSafeValues_W DO_SetSafeValues_W 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 DO2K_GetPowerOnSeqDelaytimes DO2K_SetPowerOnSeqDelaytimes Digital Output Commands for ioLogik 4000 Function Name DO4K_GetSafeActions DO4K_SetSafeActions DO4K_GetSafeAction DO4K_SetSafeAction Digital Output Commands for ioLogik E4200 Function Name E42 _DO_GetSafeActions E42_DO_SetSafeActions E42_DO_GetPowerOnValues E42_DO_SetPowerOnValues E42_DO_Reads E42_DO_Writes E42_DO_GetFaultValues E42_DO_SetFaultValues 3 8 ioLogik MXIO DLL API Reference MXIO API Overview Digital Output Commands for ioLogik W5000 Function Name W5K_DO_Reads W5K_DO_Writes W5K_DO_GetSafe Values W5K_DO_SetSafe Values W5K_DO_GetModes W5K_DO_SetModes W5K_DO_GetPowerOn Values W5K_DO_SetP
11. E1K_Cnt_Reads This function code is used to read contiguous channel s count values when D I channels are in Count mode int E1K_Cnt_Reads int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue J Visual Basic Declare Function E1K_Cnt_Reads Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read dwValue An array that stores the contiguous channel s count values dwValue 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes 6 58 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_Cnt_Clears Visual Basic Arguments Return Value This function code is used to clear contiguous channel s count values when D I channel is in Count mode int E1K_Cnt_Clears int hConnection BYTE bytStartChannel BYTE bytCount Declare Function E1K_Cnt_Clears Lib MxXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte As Long hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be cleared Succeed MXIO_OK Fail Refer to Return Codes 6 59 ioLogik MXIO DLL API Refe
12. Module2K_GetInternalRegs Module2K_SetInternalRegs 3 2 ioLogik MXIO DLL API Reference MXIO API Overview Commands for ioLogik NA4000 Function Name Adp4K_ReadFirmwareRevision Adp4K_ReadStatus Adp4K_ClearStatus Adp4K_ReadFirmwareDate Adp4K_ReadSlotAmount Adp4K_ReadAlarmedSlot Adp4K_ReadAlarmedSlot Commands for ioLogik E4200 Function Name E42 ReadFirmwareRevision E42 ReadFirmwareDate E42_ReadSlotAmount E42_ReadStatus E42_ClearStatus E42_GetInternalRegs E42_SetInternalRegs E42_GetWorkInternalRegs E42_SetWorkInternalRegs E42_GetlIOMapMode E42_SetlIOMapMode E42_Modbus_List E42_ClearSafeStatus Commands for ioLogik W5000 Function Name W5K_GetInternalRegs W5K_SetInternalRegs W5K_GetGprsSignal W5K_ListOpcDevices W5K_GetOpcDevicesInfo W5K_GetOpcAliasName W5K_GetSafeStatus W5K_ClearSafeStatus ioLogik MXIO DLL API Reference MXIO API Overview Commands for ioLogik E1200 Function Name E1K_GetSafeStatus E1K_ClearSafeStatus 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 E42_DI_Reads For E4200 only Digital Input Commands for ioLogik E2000 R2000 Function Name
13. ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_DO _ SetPowerOnValues This function code is used to set the power on value of contiguous D O channels int W5K_DO_SetPowerOnValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function W5K_DO_SetPowerOnValues Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nValue As Long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwValue Stores the power on value of contiguous D O channels each bit holds one channel value A bit value of 0 represents the powe on status of the start channel A bit value o 1 represents the status of the second digital output channel The values of the unused bits are random Return Value MXIO_OK Refer to Return Codes 6 94 ioLogik MXIO DLL API Reference Direct I O Command Sets Digital Output Commands for ioLogik E1200 E1K_DO Reads This function code is used to read the output statuses of contiguous D O channels int E1K_DO_Reads int hConnection BYTE _ bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function E1K_DO_Reads Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The ha
14. 4 9 ioLogik MXIO DLL API Reference System Commands Sets This function code is used to get the internal register of the Module2K_SetInternalRegs ioLogik 2000 Module int Module2K_SetInternalRegs int hConnection BYTE bytStartChannel BYTE bytCount Arguments WORD wValue hConnection The handle for a connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read Up to 24 Return Value wValue represents the value of the starting channel The values are 0 255 Succeed MXIO_OK Fail Refer to Return Codes Commands for ioLogik NA4000 Adp4K_ReadFirmwareRevision This function code is used to read the firmware revision C C int Adp4K_ReadFirmwareRevision int hConnection Arguments WORD wRevision hConnection The handle for an I O connection wRevision Stores the firmware revision For revision 1 01 the value will be OX0101 Return Value Succeed MXIO_OK Fail Refer to Return Codes 4 10 ioLogik MXIO DLL API Reference System Commands Sets This function code is used to read the status of the ioLogik 4000 Adp4K_ReadStatus adapter int Adp4K_ReadStatus int hConnection WORD wBusStatus WORD wFPStatus WORD wEWStatus WORD wESStatus WORD wECStatus 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 Fa
15. Return Value Succeed MXIO_OK Fail Refer to Return Codes RTD2K_ResetMaxs This function code is used to reset contiguous RTD channel s maximize value int RTD2K_ResetMaxs int hConnection BYTE ytStartChannel 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 MXIO_OK Fail Refer to Return Codes 6 217 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 int RTD2K_ReadMinRaw int hConnection bytChannel iValue Arguments Return Value hConnection BYTE _ bytChannel WORD iValue The handle for an I O device connection The specific channel to be read A pointer that stores the specific RTD channel s minimize raw data MXIO_OK Refer to Return Codes RTD2K_ReadMinRaws This function code is used to read contiguous RTD channel s minimize raw data int RTD2K_ReadMinRavws int hConnection Arguments hConnection bytStartChannel bytCount wValue Return Value BYTE _ bytStartChannel BYTE _ bytCount WORD wValue The handle for an I O device connection Specifies the starting channel The number of channels to be read An array that stores the contiguous RTD channel s minimize raw data wValue 0 represents
16. bytCount The number of channels to read dwStatus A pointer to the overflow status of the contiguous channels each bit holds the status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 Normal 1 Overflow Return Value MXIO_OK Refer to Return Codes Cnt2K_ClearOverflows This function code is used to clear the overflow statuses of contiguous D I channels in Counter mode int Cnt2K_ClearOverflows int hConnection BYTE _ bytStartChannel BYTE _ bytCount Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to clear Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 27 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 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 Return Value MXIO_OK Refer to Return Codes Cnt2K_ClearOverflow This function code is used to clear the overflow status of a specific D I channel in Counter mode C C int Cnt2K_ClearOverflow int hConnection
17. bytStartChannel Specifies the starting channel bytCount The number of channels to be get dwStatus A pointer that stores the contiguous channel s DI DO mode each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 ON 1 OFF Return Value MXIO_ OK Refer to Return Codes 6 56 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Cnt_SetSaveStatuses _ This function code is used to set contiguous channel s DI DO int W5K_Cnt_SetSaveStatusesOnPowerFail int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwMode Visual Basic Declare Function W5K_Cnt_SetSaveStatusesOnPowerFail Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nMode As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwStatus A pointer that stores the contiguous channel s DI DO mode each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 ON 1 OFF Return Value MXIO_OK Refer to Return Codes 6 57 ioLogik MXIO DLL API Reference Direct I O Command Sets Counter Commands for the ioLogik E1200
18. t complete SOCKET INIT EIO_CREATING_SOCKET_ERROR 2003 Anerror occurred when the Windows system couldn t initiate Socket EIO_RESPONSE_ BAD 2004 The data received from Ethernet I O server is incorrect EIO_SOCKET_DISCONNECT 2005 The network connection from host computer is down PROTOCOL_TYPE_ ERROR 2006 Protocol type error SIO_OPEN_FAIL 3001 Open COM port failure ioLogik MXIO DLL API Reference Return Codes port in the designated time SIO_SET_COMM_TIME_OUT_FAIL 3009 Set COM port read timeout and write timeout fail SIO_CLEAR_COMM_FAIL 3010 Clear COM port is incorrect calling MXSIO_Connect SIO_BAUDRATE_NOT_SUPPORT 3013 Baudrate is not supported PRODUCT _NOT_ SUPPORT 4001 The I O module is not supported by this version of Cr DLL Handle error i O Register type error FUNCTION_NOT_SUPPORT 4007 Function is not supported for designated I O module OUTPUT_VALUE_OUT_OF_RANGE 4008 The output value is out of the output range INPUT_VALUE_OUT_OF_RANGE 4009 The input value is out of the input range 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 R2000 E4200 W5000 and E1200 series 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 1200 0x1210 E1210 16DI Active Remot
19. 02 5V 03 10V 04 0 20mA 05 4 20mA 06 0 150mV 07 0 500mV 08 0 5V 09 0 10V Others_return Illegal Data Value Return Value MXIO_OK Refer to Return Codes 6 163 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_AI_SetRanges This function code is used to set contiguous A I channel s range int W5K_AI_SetRanges int hConnection BYTE bytStartChannel BYTE bytCount WORD wRange Visual Basic Declare Function W5K_AI_SetRanges Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iRange As integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set wRange An array that stores the contiguous A I channel s range wRange 0 represents the value of the starting channel The values are 00 150mV 01 500mV 02 5V 03 10V 04 0 20mA 05 4 20mA 06 0 150mV 07 0 500mV 08 0 5V 09 0 10V Others_return Illegal Data Value MXIO_OK Refer to Return Codes Return Value 6 164 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K_AI GetChannelStatuses This function code is used to get the AI channel status of ioLogik 5000 Module int W5K_AI_GetChannelStatuses hConnection bytStartChannel bytCount wValue Visual Basic Declare Function W5K_AI_GetChannelStatuses Lib MXIO dll
20. 6 244 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_TC_SetEngUnit This function code is used to set the temperature Type for contiguous channels int E42_TC_SetEngUnit int hConnection BYTE bytSlot WORD wEngUnit Visual Basic Declare Function E42_TC_SetEngUnit Lib MXIO dIl ByVal hConnection As Long ByVal bytSlot As Byte ByVal iEngUnit As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 wEngUnit An array that stores the contiguous A O channel s safe action to be set The wEngUnit 0 represents the value of allchannel The values are 0 Celsius 1 Fahrenheit Return Value MXIO_OK Refer to Return Codes 6 245 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_TC_GetSensorType This function code is used to get the Sensor Type for contiguous channels int E42_TC_GetSensorType int hConnection BYTE bytSlot WORD _ wsSensorType Visual Basic Declare Function E42_TC_GetSensorType Lib MXIO dIl ByVal hConnection As Long ByVal bytSlot As Byte iSensorType As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 wSensorType An array that stores the contiguous TC channel s sensor type wSensorType 0 represents the value of all the cha
21. BYTE _ bytChannel Arguments hConnection The handle for an I O connection bytChannel The desired channel Return Value Succeed MXIO_OK Fail Refer to Return Codes Cnt2K_GetFilters This function code is used to get the filter value of contiguous D I channels in Counter mode int Cnt2K_GetFilters int hConnection BYTE _ bytStartChannel BYTE _ bytCount WORD wfFilter Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to read wFilter An array that stores the filter values for the contiguous D I channels Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 28 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 int Cnt2K_SetFilters int hConnection BYTE _ bytStartChannel BYTE _ bytCount WORD wFilter Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to set wFilter An array that stores the filter values for the contiguous D I channels Return Value Succeed MXIO_OK Fail Refer to Return Codes Cnt2K_GetFilter This function code is used to get the filter value of a specific D I channel in Counter mode int Cnt2K_GetFilter int hConnection BYTE _ bytChannel WORD wKilter Arguments
22. ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytStartchannel Specifies the starting channel bytCount The number of channels to retrieve up to 80 wValue Represents the value of the starting channel The values are 0 to 255 Return Value MXIO_OK Refer to Return Codes 4 16 ioLogik MXIO DLL API Reference System Commands Sets E42_SetWorkInternalRegs This function code is used to set the working internal registers of the ioLogik E4200 Active Ethernet network adaptors not saved to flash memory int E42_SetWorkInternalRegs int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Visual Basic Declare Function E42_SetWorkInternalRegs Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytStartchannel Specifies the starting channel bytCount The number of channels to retrieve up to 80 wValue An array that stores contiguous internal register The values are 0 to 255 Return Value MXIO_OK Refer to Return Codes E42_GetlIOMapMode This function code is used to get the IO image map mode of ioLogik E4200 Active Ethernet network adapters int E42_GetIOMapMode int hConnection WORD wValue Visual Basic Declare Function E42_GetIOMapMode Lib MXIO dIl ByVal hConnection As L
23. D O channel int RLY2K_TotalCntRead int hConnection BYTE bytChannel DWORD dwValue Arguments hConnection The handle for an I O device connection bytChannel The specific channel to be get dwValue A pointer that stores the count value of contiguous D O channel Return Value MXIO_OK Refer to Return Codes 6 205 ioLogik MXIO DLL API Reference Direct I O Command Sets RLY2K_TotalCntReads _ This function code is used to get the count value for contiguous D O channel int RLY2K_TotalCntReads int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwvValue Arguments hConnection The handle for an I O device connection bytChannel Specifies the starting channel dwValue A pointer that stores the count value of contiguous D O channel Return Value MXIO_OK Refer to Return Codes RLY2K_CurrentCntRead This function code is used to get the count value for contiguous D O channel int RLY2K_CurrentCntRead int hConnection BYTE bytChannel DWORD dwvValue Arguments hConnection The handle for an I O device connection bytChannel The specific channel to be get dwValue A pointer that stores the count value of contiguous D O channel Return Value MXIO_OK Refer to Return Codes 6 206 ioLogik MXIO DLL API Reference Direct I O Command Sets RLY2K_CurrentCntReads This function code is used to get the count value for contiguous D O channel int RLY2K_CurrentCntReads
24. int DO2K_GetMode int Arguments hConnection bytChannel wMode Return Value 6 80 hConnection BYTE bytChannel BYTE wMode The handle for an I O connection The desired channel A pointer to the mode of tthe desired D O channel The values are 0 D O mode 1 Pulse mode MXIO_OK Refer to Return Codes ioLogik MXIO DLL API Reference Direct I O Command Sets DO2K_SetMode This function code is used to set the mode for a specific D O channel int DO2K_SetMode int Arguments hConnection bytChannel wMode Return Value hConnection BYTE bytChannel WORD wMode The handle for an I O connection The desired channel A pointer to the mode of the desired D O channel The values are 0 D O mode 1 Pulse mode MXIO_OK Refer to Return Codes DO2K_GetPowerOnValues This function code is used to get the power on values of contiguous D O channels int DO2K_GetPowerOnValues int BYTE BYTE DWORD Arguments hConnection bytStartChannel bytCount dwValue Return Value 6 81 hConnection bytStartChannel bytCount dwValue The handle for an I O connection Specifies the starting channel The number of channels to read A pointer to the power on values of the contiguous D O channels each bit holds the value of one channel A bit value of 0 represents the power on status of the start channel A bit value of 1 represents the status of the second digital output c
25. 1 HiToLo MXIO_OK Refer to Return Codes Return Value 6 32 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 int Cnt2K_GetTriggerType int Arguments hConnection bytChannel bytType Return Value hConnection BYTE bytChannel BYTE bytType The handle for an I O connection The desired channel A pointer to the trigger type for a specific channel The values are 0 LoToHi 1 HiToLo MXIO_OK Refer to Return Codes Cnt2K_SetTriggerType This function code is used to set the trigger type of a specific D I channel in Counter mode int Cnt2K_SetTriggerType int BYTE BYTE Arguments hConnection bytStartChannel bytCount bytType Return Value 6 33 hConnection bytChannel bytType The handle for an I O connection Specifies the starting channel The desired channel Stores the trigger type for the desired channel The values are 0 LoToHi 1 HiToLo MXIO_OK 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 int Cnt2K_GetPowerOnValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Arguments hConnection The handle for an I O connection bytStartChannel Spec
26. 3400 4 AI current 0 to 20 mA 12 bit RTB 0x3401 M 3401 4 AI current 0 to 20 mA 14 bit RTB 0x3402 M 3402 4 AI current 4 to 20 mA 12 bit RTB 0x3403 M 3403 4 AI current 4 to 20 mA 14 bit RTB 0x3410 M 3410 4 AI voltage 0 to 10V 12 bit RTB 0x3411 M 3411 4 AI voltage 0 to 10V 14 bit RTB 0x3412 M 3412 4 AI voltage 10 to 10V 12 bit RTB 0x3413 M 3413 4 AI voltage 10 to 10V 14 bit RTB 0x3414 M 3414 4 AI voltage 0 to SV single ended 12 bit RTB 0x3415 M 3415 4 AI voltage 0 to 5V single ended 14 bit RTB 0x3802 M 3802 8AI Current 4 20mA 12bit RTB 0x3810 M 3810 8AI Voltage 0 10V 12bit RTB 0x6200 M 6200 2 AI RTD PT100 JPT100 300 Ohm RTB 0x6201 M 6201 2 AI thermocouple 30 mV 1 uV bit RTB Analog Output 0x4201 M 4201 2 AO 0 to 20 mA 12 bit RTB 0x4202 M 4202 2 AO 4 to 20 mA 12 bit RTB 0x4210 M 4210 2 AO voltage 0 to 10V 12 bit RTB 0x4211 M 4211 2 AO voltage 10 to 10V 12 bit RTB 0x4212 M 4212 2 AO voltage 0 to 5V 12 bit RTB 0x4402 M 4402 4AO 4 20mA 12bit RTB 0x4410 M 4410 4AO Voltage 0 10V 12bit RTB ioLogik E2000 and R2000 Module ID Model Name Remote I O 0x2110 R2210 Remote I O with 12DI 8DO 0x2140 R2140 Remote I O with 8AI 2AO 0x2210 E2210 Active Ethernet I O with 12DI 8DO 0x2212 E2212 Active Ethernet I O with 8DI 8DO 4DIO 0x2214 E2214 Active Ethernet I O with 6DI 6Relay 0x2240 E2240 Active Ethernet I O with 8AI 2AO 0x2242 E2242 Active Ethernet I O with 4
27. A I channel s maximize value int W5K_AI_ReadMaxs int hConnection BYTE bytStartChannel BYTE bytCount Double dValue Visual Basic Declare Function W5K_AI_ReadMaxs Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte dValue As Double As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read dValue An array that stores the contiguous A I channel s maximize value dValue 0 represents the value o the starting channel The unit is Vdc for the voltage module and mA for the current module Return Value MXIO_OK Refer to Return Codes 6 160 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K_AI ReadMaxRaws This function code is used to read contiguous A I channe s maximize raw data int W5K_AI_ReadMaxRaws int hConnection BYTE _ bytStartChannel BYTE _ bytCount WORD wValue Visual Basic Declare Function W5K_AI_ReadMaxRaws Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read wValue An array that stores the contiguous A I channel s maximize raw data wValue 0 represents the value of the st
28. AO2K_SetPowerOnRaws AO2K_GetPowerOnRaw AO2K_SetPowerOnRaw Analog Output Commands for ioLogik NA4000 Function Name AO4K_GetSafeActions AO4K_SetSafeActions AO4K_GetSafeAction AO4K_SetSafeAction Analog Output Commands for ioLogik E4200 Function Name E42_AO_GetSafeActions E42_AO_SetSafeActions E42_AO_GetPowerOnValues E42_AO_SetPowerOnValues E42_AO_Reads E42_AO_ Writes E42_AO_ReadRaws E42_AO_WriteRaws E42_AO_GetFaultValues E42_AO_SetFaultValues 3 14 ioLogik MXIO DLL API Reference MXIO API Overview Relay Commands for ioLogik 2000 Function Name RLY2K_GetResetTime RLY2K_TotalCntRead RLY2K_TotalCntReads RLY2K_CurrentCntRead RLY2K_CurrentCntReads RLY2K_ResetCnt RLY2K_ResetCnts Relay Commands for ioLogik W5000 Function Name W5K_RLY_GetResetTime W5K_RLY_TotalCntReads W5K_RLY_CurrentCntReads W5K_RLY_ResetCnts Relay Commands for ioLogik E1200 Function Name E1K_RLY_TotalCntReads 3 15 ioLogik MXIO DLL API Reference MXIO API Overview RTD Commands Function Name RTD_Reads RTD_Read RTD_ReadRaws RTD_ReadRaw RTD2K_ResetMin RTD2K_ResetMins RTD2K_ResetMax RTD2K_ResetMaxs RTD2K_ReadMinRaw RTD2K_ReadMinRaws RTD2K_ ReadMaxRaw RTD2K_ ReadMaxRaws RTD2K_ReadMin RTD2K_ReadMins RTD2K_ReadMax RTD2K_ReadMaxs R
29. As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for a connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read Up to 24 wvalue Represents the value of the starting channel The values are 0 255 Return Value MXIO_OK Refer to Return Codes 4 20 ioLogik MXIO DLL API Reference System Commands Sets WS5K_GetGprsSignal This function code is used to get the Click amp Go Logic start status of ioLogik 5000 Ethernet Module int W5K_GetGprsSignal int hConnection WORD wStatus Declare Function W5K_GetGprsSignal Lib MXIO dll ByVal hConnection As Long iStatus As Integer As Long Visual Basic Arguments hConnection The handle for a connection iStatus A pointer that stores the specific module s Click amp Go Logic start status The values are 0 stop 1 start Return Value MXIO_OK Refer to Return Codes 4 21 ioLogik MXIO DLL API Reference System Commands Sets WS5K_ListOpcDevices This function get amount of ioLogik W5000 that link in A OPC server int W5K_ListOpcDevices char szIP DWORD dwTimeOut WORD wDeviceCount Declare Function W5K_GetOpcAliasName Lib MXIO dIl ByVal szIP As String ByVal nTimeOut As Long wDeviceCount As Integer As Long Visual Basic Arguments szIP IP address of the A OPC Server to be connected d
30. As Long As Long hConnection The handle for an I O device connection Arguments bytSlot Slot number of the I O module Slot numbers range from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartChannel Specifies the starting channel bytCount The number of channels to be read dwValue A pointer that stores the contiguous D O channel s status each bit holds one channel value A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the status of the second digital output channel The values of the unused bits are random MXIO_OK Refer to Return Codes Return Value 6 113 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_DO Writes This function code is used to write the output statuses of contiguous D O channels int E42_DO_Writes int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function E42_DO_Writes Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nValue As Long As Long Arguments hConnection The handle for an I O device connection bytSlot Slot number of the I O module Slot numbers range from 1 to 16 But this parameter is inactive in ioLogik 2000 bytStartChannel Specifies the starting channel bytCount The number of channels to be written dwValue Stores the chann
31. Basic Declare Function W5K_AI_ReadRaws Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read wValue An array that stores the contiguous A I channel g raw data wValue 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes 6 156 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K_AI ReadMins This function code is used to read contiguous A I channel s minimize value int W5K_AI_ReadMins int hConnection BYTE bytStartChannel BYTE bytCount double dValue Visual Basic Declare Function W5K_AI_ReadMins Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte dValue As Double As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read dValue An array that stores the contiguous A I channel g value dValue 0 represents the value of the starting channel The unit is Vdc for the voltage module and mA for the current module Return Value MXIO_OK Refer to Return Codes 6 157 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K_AI ReadMinRaws This function
32. C C int Message2K_Stop int iProtocol Return Value Arguments iProtocol Transmission protocol 1 TCP 2 UDP Return Value MXIO_OK Refer to Return Codes ioLogik MXIO DLL API Reference Direct I O Command Sets E42_Message_Start This function code is used to start receiving active messages for the ioLogik 4200 network adaptors int E42_Message_Start int iProtocol WORD wPort pfnCALLBACK iProcAddress Callback Function Void FunctionName BYTE bytDatal WORD wsize Visual Basic Declare Function E42_Message_Start Lib MXIO dIl ByVal nProtocol As Long ByVal iPort as Integer ByVal nProcAddress As Long As Long Callback Function Public Sub FunctionName bytData As Long ByVal iSize As Integer NOTE It is not recommended to use Message Command by VB Please refer the example file for more details If you want to use it by VB language please select P Code while compiling to execute file Arguments iProtocol Transmission protocol 1 TCP 2 UDP wPort TCP or UDP port number iProcAddress Callback function which is called after receiving an active I O message from an ioLogik 4200 Ethernet module bytData An array that stores the message wSize Array size Returni Valie Succeed MXIO_OK Fail Refer to Return Codes 8 2 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_Message_Stop This function code is used to stop receiving active messages for the ioLogik 4200 networ
33. Counter mode int Cnt2K_Clears int hConnection BYTE bytStartChannel BYTE bytCount The handle for an I O connection Return Value Arguments hConnection bytStartChannel bytCount Return Value Succeed Fail Specifies the starting channel The number of channels to clear MXIO_OK Refer to Return Codes Cnt2K_Read This function code is used to read the counter value of a specific D I channel in Counter mode int Cnt2K_Read int hConnection BYTE bytChannel DWORD dwValue Arguments The handle for an I O connection hConnection bytChannel dwValue The desired channel A pointer to the counter value of the desired channel MXIO_OK Refer to Return Codes Return Value Succeed Fail 6 26 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 Return Value Succeed MXIO_OK Fail Refer to Return Codes Cnt2K_GetOverflows This function code is used to get the overflow statuses of contiguous D I channels in Counter mode int Cnt2K_GetOverflows int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwStatus Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel
34. I O Command Sets RTD2K_SetEngUnits This function code is used to get contiguous RTD channel s engineering unit int RTD2K_SetEngUnits int hConnection BYTE bytStartChannel BYTE bytCount WORD wEngUnit Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set wEngUnit An array that stores the contiguous RTD channel s engineering unit wEngUnit 0 represents the value of the starting channel The values for normal channel are 0 Celsius 1 Fahrenheit 2 Ohm Others_ return Illegal Data Value The values for virtual channels are 0 Celsius 1 Fahrenheit Others_ return Illegal Data Value Return Value MXIO_OK Refer to Return Codes RTD2K_GetMathPar This function code is used to get the math parameter for a specific RTD channel int RTD2K_GetMathPar int hConnection BYTE bytChannel WORD wMathPar Arguments hConnection The handle for an I O device connection bytChannel The specific channel to be get wMathPar A pointer that stores the specific RTD channel s math parameter For AVG Bit 0 of high byte represents the first channel and Bit 1 of high byte represents the second channel For DEV the High Byte as subtrahend and Low Byte as minuend Exp AVG _b 0000 0000 b 0010 0011 ch5 ch1 ch0 Exp DEV b 0000 0100 b 0010 0000 ch2 ch6 Return Value Succeed MXIO_OK Fail Refer to Return Cod
35. 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 int DO_GetSafeValues int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD dwValue 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 dwValue A pointer to the safe values of the contiguous D O channels each bit holds the value of one channel A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the status of the second digital output channel The values of the unused bits are random MXIO_OK Refer to Return Codes Return Value DO_SetSafeValues This function code is used to set the safe values of contiguous D O channels int DO_SetSafeValues int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD dwValue 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 dwValue A pointer to the safe values of the contiguous D O channels each bit holds the value
36. Reference Direct I O Command Sets W5K_Cnt_SetTriggerType Words Visual Basic Arguments Return Value This function code is used to set contiguous channel s trigger types when D I channel in Count mode int W5K_Cnt_SetTriggerTypeWords int hConnection BYTE bytStartChannel BYTE bytCount WORD wType Declare Function W5K_Cnt_SetTriggerTypeWords Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iType As Integer As Long hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be clear wType Stored the contiguous channel s triggers types each bit holds one channel trigger type A bit value of 0 represents the trigger type of the start channel A bit value of 1 represents the second channel s trigger type The values are 0 LoToHi 1 HiToLo 2 Both MXIO_OK Refer to Return Codes 6 55 ioLogik MXIO DLL API Reference Direct I O Command Sets OnPowerFail power off storage enable mode int W5K_Cnt_GetSaveStatusesOnPowerFail int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwMode Visual Basic Declare Function W5K_Cnt_GetSaveStatusesOnPowerFail Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nMode As Long As Long Arguments hConnection The handle for an I O device s connection
37. Return Value MXIO_OK Refer to Return Codes 6 120 ioLogik MXIO DLL API Reference Direct I O Command Sets Pulse2K_SetSignalWidths32 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 dwLoWiadth Declare Function Pulse2K_SetSignalWidths32 Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iHiWidth As Long iLoWidth As Long As Long A t TEUMENYS hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to get dwHiWidth An array that stores the contiguous pulse channel s Hi signal width dwHiWidth 0 represents the Hi signal width of the starting channel dwLo Width An array that stores the contiguous plulse channel s Lo signal width dwLoWidth 0 represents the Lo signal width of the starting channel MXIO_OK Refer to Return Codes 6 121 ioLogik MXIO DLL API Reference Direct I O Command Sets Pulse2K_GetSignalWidth32 Visual Basic Arguments Return Value 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 int hCo
38. always 0 This parameter is inactive for ioLogik E2000 and R2000 I O A pointer to the model name For the model name NA 4010 the value would be 0x4010 Refer to the Product Model and ID Reference Table for more information Return Value MXIO_OK Refer to Return Codes MXIO_ReadFirmwareRey This function reports the firmware revision for the ioLogik 4000 ision network adapter E2000 or R2000 C C int MXIO_ReadFirmwareRevision int hConnection BYTE bytRevision Arguments hConnection T O handle for a connection bytRevision Stores the firmware revision bytRevision 0 major A bytRevision 1 minor B bytRevision 2 release C bytRevision 3 build D format is A B C D Return Value MXIO_ OK Refer to Return Codes 4 6 ioLogik MXIO DLL API Reference System Commands Sets d This function reports the firmware release date for the ioLogik MXIO_ReadFirmwareDate 4000 network adapter E2000 or R2000 C C int MXIO_ReadFirmwareDate int hConnection WORD wDatef Arguments hConnection T O handle for a connection wDate Firmware release date For a firmware release date of July 5 2005 Word 0 0x0705 and Word 1 0x2005 Return Value Succeed MXIO_OK Fail Refer to Return Codes MXIO Restart This function is used to restart the T O C C int MXIO_Restart int hConnection Arguments hConnection T O handle for a connection Return Value Succeed MXIO_OK Fail Refer to Return
39. channels to bet read dwValue A pointer that stores the contiguous pulse channel s safe value each bit holds one channel value A bit value of 0 represents the safe value of the start channel A bit value of 1 represents the value of the second pulse channel The values are 0 stop 1 start Return Value MXIO_OK Refer to Return Codes 6 139 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K _ Pulse SetSafeValues This function code is used to set the contiguous pulse channel s safe value int W5K_Pulse_SetSafeValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwvValue Visual Basic Declare Function W5K_Pulse_SetSafe Values Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nValue As Long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwValue A pointer that stores the contiguous pulse channel s safe value each bit holds one channel value A bit value of 0 represents the safe value of the start channel A bit value of 1 represents the value of the second pulse channel The values are 0 stop 1 start Return Value MXIO_OK Refer to Return Codes 6 140 ioLogik MXIO DLL API Reference Direct I O Command Sets Analog Input Commands AI_Reads This function code is used to read the values of
40. code is used to read contiguous A I channel s minimize raw data int W5K_AI_ReadMinRaws int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Visual Basic Declare Function W5K_AI ReadMinRaws Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read wValue An array that stores the contiguous A I channel s minimize raw data wValue 0 represents the value of the starting channel MXIO_OK Return Value Refer to Return Codes 6 158 ioLogik MXIO DLL API Reference Direct I O Command Sets WSK _AI ResetMins This function code is used to reset contiguous A I channel s minimize value int W5K_AT_ResetMins int hConnection BYTE bytStartChannel BYTE bytCount Visual Basic Declare Function W5K_AI ResetMins Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte As Long 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 MXIO_OK Fail Refer to Return Codes 6 159 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K_AI_ ReadMaxs This function code is used to read contiguous
41. code is used to set the contiguous pulse channel s power ues on value int W5K_Pulse_SetPowerOn Values int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function W5K_Pulse_SetPowerOnValues Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nValue As Long As Long A hConnection The handle for an I O device connection rguments bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwValue Stores the contiguous pulse channel s power on value each bit holds one channel value A bit value of 0 represents the power on value of the start channel A bit value of 1 represents the value of the second pulse channel The values are 0 stop 1 start Return Value MXIO_OK Refer to Return Codes 6 138 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Pulse_GetSafeValues This function code is used to get the contiguous pulse channel s safe value int W5K_Pulse_GetSafeValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function W5K_Pulse_GetSafe Values Lib MXIO dIll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long hConnection The handle for an I O device connection Arguments bytStartChannel Specifies the starting channel bytCount The number of
42. hConnection The handle for an I O connection bytChannel The desired channel wFilter A pointer to the filter value Return Value Succeed MXIO_OK Fail Refer to Return Codes Cnt2K_SetFilter This function code is used to set the filter value of a specific D I channel in Counter mode int Cnt2K_SetFilter int hConnection BYTE bytChannel WORD wfFilter Arguments hConnection The handle for an I O connection bytChannel The desired channel wFilter Stores the filter value Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 29 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 int Cnt2K_GetStartStatuses int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwStatus Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to read dwStatus A pointer to the start statuses of the contiguous D I channels each bit holds the start status of one channel A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 stop 1 start MXIO_OK Refer to Return Codes Return Value Cnt2K_SetStartStatuses This function code is used to set the start statuses of contiguous D I channels in Counter mode int Cnt2K
43. 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 A bit value of 0 represents the start status of the start channel A bit value of 1 represents the status of the second pulse channel The values are 0 stop 1 start MXIO_OK Refer to Return Codes Return Value 6 125 ioLogik MXIO DLL API Reference Direct I O Command Sets Pulse2K_GetStartStatus This function code is used to get the start status for a specific pulse channel int Pulse2K_GetStartStatus int hConnection bytChannel bytStatus Arguments Return Value hConnection BYTE bytChannel BYTE bytStatus The handle for an I O connection The desired channel A pointer to the start status of the desired channel The values are 0 stop 1 start MXIO_OK Refer to Return Codes Pulse2K_SetStartStatus This function code is used to set the start status for a specific pulse channel int Pulse2K_SetStartStatus int BYTE _ bytChannel BYTE _ bytStatus The handle for an I O connection Arguments hConnection bytChannel bytStatus Return Value 6 126 hConnection The desired channel Stores the start status of the desired channel The values are 0 stop 1 start MXIO_OK Refer to Return Codes ioLogik MXIO DLL AP
44. maximize value int RTD2K_ReadMaxs int hConnection BYTE _ bytStartChannel BYTE _ bytCount double dValue Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read dValue An array that stores the contiguous RTD channel s maximize value dValue 0 represents the value of the starting channel The unit is Q for the Ohm C for Celsius and F for Fahrenheit Return Value MXIO_OK Refer to Return Codes RTD2K_GetStartStatus This function code is used to get specific channel s start status int RTD2K_GetStartStatus int hConnection BYTE _ bytChannel BYTE bytStatus Arguments hConnection The handle for an I O device connection bytChannel The specific channel to be get bytStatus A pointer that stores the specific RTD channel s start status The values are 0 stop 1 start Return Value MXIO_OK Refer to Return Codes 6 221 ioLogik MXIO DLL API Reference Direct I O Command Sets RTD2K_ SetStartStatus This function code is used to set specific channel s start status int RTD2K_SetStartStatus int hConnection BYTE _ bytChannel BYTE _ bytStatus Arguments 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 Return Value MXIO_OK R
45. name of the specific ip address device that running A OPC server int W5K_GetOpcAliasName char szIP DWORD dwTimeOut Char szAliasName Declare Function W5K_GetOpcAliasName Lib MXIO dIl ByVal szIP As String ByVal nTimeOut As Long ByVal szAliasName As String As Long Visual Basic Arguments szIP IP address of the A OPC Server to be connected dwTimeOut Timeout value for establishing a network connection with the ioLogik Ethernet Adapter The unit is in milliseconds szAliasName A OPC Server alias name MAX 32 Bytes Return Value Succeed MXIO_OK Fail Refer to Return Codes 4 24 ioLogik MXIO DLL API Reference System Commands Sets W5K_GetSafeStatus This function code is used to get the safe status of ioLogik 5000 Module int W5K_GetSafeStatus int hConnection WORD wStatus Declare Function W5K_GetSafeStatus Lib MXIO dll ByVal hConnection As Long iStatus As Integer As Long Visual Basic Arguments hConnection The handle for a connection wStatus A pointer that stores the specific module s safe status The values are 0 Normal 1 Safe mode Return Value MXIO_OK Refer to Return Codes WS5K_ClearSafeStatus This function code is used to clear the safe status of ioLogik 5000 Module C C int W5K_ClearSafeStatus int hConnection Declare Function W5K_ClearSafeStatus Lib MXIO dll ByVal hConnection As Long As Long Visual Basic Arguments hConnection Th
46. of one channel A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the status of the second digital output channel Return Value MXIO OK Refer to Return Codes 6 76 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 int DO_GetSafeValue int hConnection BYTE _ bytSlot BYTE _ bytChannel BYTE bytValue 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 Return Value MXIO_OK Refer to Return Codes DO_SetSafeValue This function code is used to set the safe value for a specific D O channel int DO_SetSafeValue int hConnection BYTE bytSlot BYTE _ bytChannel BYTE _ bytValue 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 channel 1 represents ON 0 represents OFF Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 77 ioLogik MXIO DLL API Reference Direct I O Command Sets DO_GetSafeVa
47. of the starting channel Return Value MXIO OK Refer to Return Codes 6 13 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 int DIZ2K_SetFilters int hConnection BYTE bytStartChannel BYTE bytCount WORD wfFilter Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to set wFilter An array that stores the filter values of the contiguous D I channels wFilter 0 represents the value of the starting channel Return Value MXIO OK Refer to Return Codes DI2K_GetFilter This function code is used to get the filter of a specific D I channel int DI2ZK_GetFilter int hConnection BYTE bytChannel WORD wFilter Arguments hConnection The handle for an I O connection bytChannel The desired channel wFilter A pointer to the filter value of the desired D I channel Return Value Succeed MXIO_OK Fail Refer to Return Codes DI2K_SetFilter This function code is used to set the filter of a specific D I channel int DIZK_GetFilter int hConnection BYTE bytChannel WORD wFilter Arguments hConnection The handle for an I O connection bytChannel The desired channel wFilter A pointer to the filter value of the desired D I channel Return Value MXIO_OK Refer to Return Codes 6 14 ioLogik MXIO DLL API Ref
48. raw data value of a specific analog output channel int AO_WriteRaw 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 specific channel to be written wValue Stores the raw data value for the desired analog output channel Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 181 ioLogik MXIO DLL API Reference Direct I O Command Sets AO_GetSafeValues This function code is used to get the safe values of contiguous analog output channels int AO_GetSafeValues int hConnection hConnection bytSlot Arguments bytStartChannel bytCount dValue Return Value Succeed Fail BYTE bytSlot BYTE _ bytStartChannel BYTE bytCount Double dValue The handle for an I O connection Slot number of the I O module from 1 to 32 This parameter is inactive for the ioLogik E2000 and R2000 Specifies the starting channel The number of channels to read An array that stores the safe values for the contiguous A O channels dValue 0 represents the value of the starting channel The unit is Vdc for the voltage channel and mA for the current channel MXIO_OK Refer to Return Codes AO_SetSafeValues This function code is used to set the safe values for contiguous A O channels int AO_SetSafe
49. read contiguous A I channel s minimize value int E1K_AI_ReadMins int hConnection BYTE bytStartChannel BYTE bytCount double dValue Declare Function E1K_AI_ ReadMins Lib MXIO dll Visual Basic ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte dValue As Double As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read dValue An array that stores the contiguous A I channel s value dValue 0 represents the value of the starting channel The unit is Vdc for the voltage module and mA for the current module Return Value MXIO_OK Refer to Return Codes 6 169 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_AI_ ReadMinRaws This function code is used to read contiguous A I channel s minimize raw data int E1K_AI_ReadMinRaws int hConnection BYTE _ bytStartChannel BYTE _ bytCount WORD wvValue Visual Basic Declare Function EIK_AI_ReadMinRaws Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read wValue An array that stores the contiguous A I channel s minimize raw data wValue 0 represents the valu
50. read the output statuses of contiguous D O channels int DO_Reads int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD dwValue 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 dwValue A pointer to the statuses of the contiguous D O channels each bit holds the value of one channel A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the status of the second digital output channel The values of the unused bits are random Return Value MXIO_OK Refer to Return Codes DO_Read This function code is used to read the output status of a specific D O channel int DO_Read int hConnection BYTE bytSlot BYTE bytChannel BYTE bytValue 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 A pointer to the output value of the desired channel Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 74 ioLogik MXIO DLL API Reference Direct I O Command Sets DO_Writes Arguments Return Value This function code is used to write the output statuses
51. 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 int DI_Reads int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD dwValue 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 dwValue A pointer to the contiguous D I channe s values each bit holds the value of one channel A bit value of 0 represents the digital input status of the start channel A bit value of 1 represents the second digital input channel s status The values of the unused bits are random Return Value MXIO_OK Refer to Return Codes DI_Read This function code is used to read the status of a specific D I channel int DI_Read int hConnection BYTE bytSlot BYTE bytChannel BYTE bytValue 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 A pointer to a specific D I channel s status Return vale Succeed MXIO_OK Fail Refer to Return Codes 6 2 ioLogik MXIO DLL API Ref
52. to get contiguous channel s filter value when D I channel in Count mode int W5K_Cnt_GetFilters int hConnection BYTE bytStartChannel BYTE bytCount WORD wFilter Visual Basic Declare Function W5K_Cnt_GetFilters Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iFilter As Integer As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read wFilter An array that stored the filter value for contiguous D I channel Return Value MXIO_OK i Refer to Return Codes 6 44 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Cnt_SetFilters Visual Basic Arguments Return Value This function code is used to set contiguous channel s filter value when D I channel in Count mode int W5K_Cnt_SetFilters int hConnection BYTE bytStartChannel BYTE bytCount WORD wFilter Declare Function W5K_Cnt_SetFilters Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iFilter As Integer As Long hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set wFilter An array that stored the filter value for contiguous D I channel MXIO_OK Refer to Return Codes 6 45 ioLogik MXIO DLL API Ref
53. values are 0 stop 1 start MXIO_OK 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 int Cnt2K_GetTriggerTypes int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwType Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to read dwType A pointer to the triggers types each bit holds the trigger type of one channel A bit value of 0 represents the trigger type of the start channel A bit value of 1 represents the second channel s trigger type The values are 0 LoToHi 1 HiToLo MXIO_OK Refer to Return Codes Return Value Cnt2K_SetTriggerTypes This function code is used to set the trigger types of contiguous D I channels in Counter mode int Cnt2K_SetTriggerTypes int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwType Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to set dwType Stores the trigger types of the contiguous channels each bit holds the trigger type of one channel A bit value of 0 represents the trigger type of the start channel A bit value of 1 represents the second channel s trigger type The values are 0 LoToHi
54. 0 represents the value of all channels The values are 0 Celsius 1 Fahrenheit Return Value MXIO_OK Refer to Return Codes 6 235 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_RTD_SetEngUnit This function code is used to set the temperature Type for contiguous channels int E42_RTD_SetEngUnit int hConnection BYTE bytSlot WORD wEngUnit Declare Function E42_RTD_SetEngUnit Lib MXIO dIl ByVal hConnection As Long ByVal bytSlot As Byte ByVal iEngUnit As Integer As Long Visual Basic Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 wEngUnit An array that stores the contiguous A O channel s safe action to be set The wEngUnit 0 represents the value of all channels The values are 0 Celsius 1 Fahrenheit Return Value MXIO_OK Refer to Return Codes 6 236 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_RTD_GetSensorType This function code is used to get the Sensor Type for contiguous channels int E42_RTD_GetSensorType int hConnection BYTE bytSlot WORD _ wsSensorType Visual Basic Declare Function E42_RTD_GetSensorType Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte iSensorType As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot numb
55. 0 mQ 1 count When using the RTD module for Resistance Input 1 327Q 10 mQ 1count When using the RTD module for Resistance Input 1 620Q 20 mQ 1count When the operating mode is temperature sensor 0 1 C F 1count depending on the setting Use the ioAdmin utility to check the current settings for the desired channels MXIO_OK Refer to Return Codes RTD2K_ResetMin This function code is used to reset the RTD input minimize value for a specific channel C C int RTD2K_ResetMin int hConnection BYTE bytChannel hConnection The handle for an I O device connection bytChannel The specific channel to be reset Return Value Arguments Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 216 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 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 MXIO_OK Fail Refer to Return Codes RTD2K_ResetMax This function code is used to reset the RTD input maximize value for a specific channel C C int RTD2K_ResetMax int hConnection BYTE bytChannel Arguments hConnection The Dandi for an I O device connection bytChannel The specific channel to be reset
56. 0000 0000 b 0010 0011 ch5 ch1 ch0 Exp DEV b 0000 0100 b 0010 0000 ch2 ch6 Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 231 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 int RTD2K_SetMathPars int hConnection BYTE bytStartChannel BYTE bytCount WORD wMathPar Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be sets wMathPart An array that stores the contiguous RTD channel s math parameter wMathPar 0 represents the value of the starting channel The values are For AVG Bit 0 of high byte represents the first channel and Bit 1 of high byte represents the second channel For DEV High Byte as subtrahend and Low Byte as minuend Exp AVG b 0000 0000 b 0010 0011 ch5 ch1 ch0 Exp DEV b 0000 0100 b 0010 0000 ch2 ch6 Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 232 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_RTD_Reads This function code is used to read the temperature value for contiguous channels int E42_RTD_Reads int hConnection BYTE bytSlot BYTE _ bytStartChannel BYTE _ bytCount double dValue Visual Basic Declare Function E42_RTD_Reads Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal b
57. 0mA Others return Illegal Data Value MXIO_OK Refer to Return Codes Return Value 6 149 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 int AI2ZK_SetRange int hConnection BYTE bytChannel WORD wRange 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 MXIO_OK Refer to Return Codes AI2K_GetChannelStatus This function code is used to get the A I channel status for the ioLogik 2000 module int AIZK_GetChannelStatus inthConnection BYTE _ bytChannel WORD wvValue Arguments hConnection The handle for an I O device connection Return Value bytChannel The specific channel to be get wValue Represents the value of the starting channel 0 disabled 1 enabled Return Value MXIO_OK Refer to Return Codes 6 150 ioLogik MXIO DLL API Reference Direct I O Command Sets AI2K_SetChannelStatus This function code is used to set the A I channel status for ioLogik 2000 module int AI2Z2K_SetChannelStatus int hConnection Arguments hConnection bytChannel wValue Return Value BYTE _ bytChannel WORD wvValue The handle for an I O device connection The specif
58. 1 Server 3 ioLogik R2000 ID 3 Program Flow V Connecting to the ioLogik E2000 Ethernet I O and Attached RS 485 I O MXEIO Connect 1 Vv MXSIO Connect 2 MXSIO Connect 3 Direct I O Modbus Command Command Sets Sets MXSIO Disconnect 3 MXSIO Disconnect 2 MXEIO Disconnect 1 2 6 ioLogik MXIO DLL API Reference Programming Flow Connecting to W5000 series GPRS I O Get connection list from AOPC server Return value is Num Num how many W5340 link to AOPC Scenario 1 Connect through OPC server MXIO_LIB X aoe PE T GERS AOPC Server Piwek ListOpcDevices List W5340 1 MAC Address MXIO LIB 2 IP Address W5K_GetOpcDevicesInfo 3 OnLine Status 4 Unit ID Parameters for this function Scenario 1 Connect through OPC server IP OPC addres MAC W5340 MAC address Scenario 2 Connect without OPC server MAC NULL Direct connect by RJ45 or direct link from GPRS without OPC server At this moment IP W5340 IP address Scenario 2 Connect without OPC server MXIO_LIB 6 MXEIO_WS5K_Connect i eee eer Logic Internal Register API J MXIO_LIB MXEIO_Disconnect He 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 The ioLogik
59. 10 Ohm 15 620 Ohm 16 1250 Ohm 17 2500 Ohm Others return Illegal Data Value The values for virtual channels are 20 AVG 21 DIV Others return Illegal Data Value Return Value MXIO_OK Refer to Return Codes 6 225 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 int RTD2K_GetSensorTypes int hConnection BYTE bytStartChannel BYTE bytCount WORD wSensorType Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be get wSensorType An array that stores the contiguous RTD channel s sensor type wSensorType 0 represents the value of the starting channel The values for normal channel are 0 PT50 1 PT100 2 PT200 3 PT500 4 PT1000 5 JPT100 6 JPT200 7 JPT500 8 JPT 1000 9 NI100 10 NI200 11 NI500 12 NI1000 13 NI120 14 310 Ohm 15 620 Ohm 16 1250 Ohm 17 2500 Ohm Others return Illegal Data Value The values for virtual channels are 20 AVG 21 DIV Others return Illegal Data Value MXIO_OK Return Value Refer to Return Codes 6 226 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 int RTD2K_SetSensorTypes int hConnection BYTE bytStartChannel BYTE bytCount WORD wSensorType Ar
60. 1K_DO SetPowerOnValues This function code is used to set the power on value of contiguous D O channels int E1K_DO_SetPowerOnValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function E1K_DO_SetPowerOnValues Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nValue As Long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel The number of channels to be set Stores the power on value of contiguous D O channels each bit holds one channel value A bit value of 0 represents the powe on status of the start channel A bit value o 1 represents the status of the second digital output channel The values of the unused bits are random Return Value MXIO_OK Refer to Return Codes 6 102 ioLogik MXIO DLL API Reference Direct I O Command Sets Delaytimes power off storage enable mode int E1K_DO_GetPowerOnSeqDelaytimes int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Visual Basic Declare Function E1K_DO_GetPowerOnSeqDelaytimes Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel The number of channels to be set A pointer that stores the co
61. 2K_ReadMin int hConnection BYTE bytChannel double dValue Arguments hConnection The handle for an I O connection bytChannel The desired channel dValue A pointer to the minimize value of the desired A I channel The unit is VDC for the voltage module and mA for the current module Return Value MXIO_OK Refer to Return Codes AI2K_ReadMinRaw This function code is used to read the minimize raw data value for a specific A I channel int AI2Z2K_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 Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 144 ioLogik MXIO DLL API Reference Direct I O Command Sets AI2K_ResetMin This function code is used to reset the minimize value for a specific A I channel C C int AIZ2K_ResetMin int hConnection BYTE bytChannel Arguments hConnection The handle for an I O server connection bytChannel The desired channel Return Value Succeed MXIO_OK Fail Refer to Return Codes AI2K_ReadMaxs This function code is used to read the maximize values for contiguous A I channels int AIZK_ReadMaxs int hConnection BYTE _ bytStartChannel BYTE _ bytCount double dValue Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel by
62. 4000 E4200 E2000 and R2000 I O use Modbus TCP and Modbus RTU to communicate with host computers MXIO Library includes Modbus command sets that use the Modbus protocol data format to access I O data This is a good choice if you are already familiar with the Modbus protocol and prefer using the Modbus data structure Direct I O Command Sets As an alternative to the complex data structure of Modbus MXIO library also provides direct I O command sets for a more intuitive method of obtaining I O data With direct I O command sets each I O point or channel can be accessed using the physical slot number and channel number This allows users to obtain I O data quickly and easily 2 7 3 MX IO API Overview MXIO API is organized into five types of commands Q System Command Sets u u v VV VVV WV RS 485 RS 232 I O Connect Commands Ethernet I O Connect Commands General Commands Commands for ioLogik E2000 R2000 Commands for ioLogik NA4000 Commands for ioLogik E4200 Commands for ioLogik W5000 Modbus Command Sets Direct I O Command Sets VVVV VV VV VV VV VV VV VV VV V v gt gt Digital Input Commands Digital Input Commands for ioLogik E2000 R2000 Digital Input Output Mode Commands for ioLogik E2000 Counter Commands for ioLogik E2000 R2000 Digital Output Commands Digital Output Commands for ioLogik E2000 R2000 Digital Output Commands for ioLogik 4000 Digital Output Commands for ioLogik E4200 Digi
63. AI 12DIO 0x2260 E2260 Active Ethernet I O with 6RTD 4DO 0x2262 E2262 Active Ethernet I O with 8TC 4DO 10 3 ioLogik MXIO DLL API Reference Product Model and ID Reference Table ioLogik W5000 Module ID Model Name Remote I O 0x5340 W5340 8DIO 2RLY 4AI Active Remote I O Server 10 4
64. ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read wValue Represents the value of the starting channel 0 disabled 1 enabled Return Value MXIO_OK Refer to Return Codes 6 165 ioLogik MXIO DLL API Reference Direct I O Command Sets WSK _AI SetChannelStatuses This function code is used to set the AI channel statuss of ioLogik 5000 Module int W5K_AT_ SetChannelStatuses hConnection bytStartChannel bytCount wValue Visual Basic Declare Function W5K_AI_SetChannelStatuses Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set wValue Represents the value of the starting channel 0 disabled 1 enabled Return Value MXIO_OK Refer to Return Codes 6 166 ioLogik MXIO DLL API Reference Direct I O Command Sets Analog Input Commands for E1200 E1K_AI Reads This function code is used to read contiguous channel s analog input value int E1K_AI_Reads int hConnection BYTE bytStartChannel BYTE bytCount double dValue Visual Basic Decl
65. Channel double dValue Arguments hConnection The handle for an I O connection bytChannel The specific channels to be read dValue A pointer to the maximize value of the desired A I channel The unit is VDC for the voltage module and mA for the current module Return Value MXIO_OK Refer to Return Codes 6 146 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 int AIZK_ReadMaxRaw int hConnection BYTE bytChannel WORD wValue 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 Return Value Succeed MXIO_OK Fail Refer to Return Codes AI2K_ResetMax This function code is used to reset the maximize value for a specific A I channel C C int AIZ2K_ResetMin int hConnection BYTE bytChannel Arguments hConnection The handle for an I O connection bytChannel The desired channel Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 147 ioLogik MXIO DLL API Reference Direct I O Command Sets AI2K_GetRanges This function code is used to get the ranges of contiguous A I channels int AI2ZK_GetRanges int hConnection BYTE _ bytStartChannel BYTE _ bytCount WORD wRange J Arguments hConnection The handle for an I O connection bytStartChannel Specifies t
66. ClearSafeStatus This function code is used to clear E4200 watchdog status Device need reboot after clear watchdog status C C int E42_ClearWatchdogStatus int hConnection Visual Basic Declare Function E42_ClearWatchdogStatus Lib MXIO dIl ByVal hConnection As Long As Long Arguments 3 hConnection The handle for a connection Return Value Succeed MXIO_OK Fail Refer to Return Codes Commands for ioLogik W5000 W5K_GetInternalRegs This function code is used to get the internal registers of ioLogik 5000 Module int W5K_GetInternalRegs int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Visual Basic Declare Function W5K_GetInternalRegs Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte bytCount As Byte iValue As Integer Arguments hConnection The handle for a connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read Up to 24 wvalue Represents the value of the starting channel The values are 0 255 Return Value MXIO_OK Refer to Return Codes 4 19 ioLogik MXIO DLL API Reference System Commands Sets W5K_SetInternalRegs This function code is used to set the internal registers of ioLogik 5000 Module int W5K_SetInternalRegs int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Visual Basic Declare Function W5K_SetInternalReg Lib MXIO dIl ByVal hConnection
67. Codes MXIO Reset This function is used to reset the I O C C int MXIO_Reset int hConnection Arguments hConnection T O handle for a connection Return Value Succeed MXIO_OK Fail Refer to Return Codes Commands for ioLogik E2000 R2000 This function code is used to get the safe status of an ioLogik Module2K_GetSafeStatus E2000 or R2000 VO C C int Module2K_GetSafeStatus int hConnection WORD wStatus Arguments hConnection The handle for a connection wStatus A pointer to the specific module s safe status The values are 0 Normal 1 Safe mode Return Value Succeed MXIO_OK Fail Refer to Return Codes 4 7 ioLogik MXIO DLL API Reference System Commands Sets This function code is used to get the safe status of an ioLogik Module2K_ClearSafeStatus E2000 or R2000 I O C C int Module2K_ClearSafeStatus int hConnection Arguments hConnection The handle for a connection Return Value Succeed MXIO_OK Fail Refer to Return Codes This function code is used to get the internal register of the Module2K_GetInternalReg ioLogik 2000 Module int Module2K_GetInternalReg int hConnection BYTE bytChannel WORD wValue Arguments hConnection The handle for a connection bytChannel The specific channel to be read wValue represents the value of the starting channel The values are 0 255 Return Value Succeed MXIO_OK Fail Refer to Return Codes This function code is used to get the inte
68. Connection BYTE bytSlot BYTE bytStartChannel BYTE bytCount double dValue Visual Basic Declare Function E42_AI_Reads Lib MXI O dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte dValue As Double As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot numbe ranges from to 16 But this parameter is inactive on the ioLogik 2000 bytStartChannel Specifies the starting channel bytCount The number of channels to be read dValue An array that stores the contiguous A I channel value dValue 0 represents the value of the starting channel The unit is Vdc for the voltage module and mA for the current module Return Value MXIO_OK Refer to Return Codes 6 153 ioLogik MXIO DLL API Reference Direct I O Command Sets E42 AI ReadRaws This function code is used to read contiguous channel s analog input raw data int E42_AI_ReadRaws int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount WORD wValue Visual Basic Declare Function E42_AI_ReadRaws Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot numbe ranges from to 16 But this parameter is inac
69. Declare Function W5K_DO_SetModes Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iMode As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set wMode An array that stores the mode of contiguous D O channels The values are 0 D O mode 1 Pulse mode Return Value MXIO_OK Refer to Return Codes 6 92 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K_DO_GetPowerOnValues This function code is used to get the power on value of contiguous D O channels int W5K_DO_GetPowerOnValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function W5K_DO_GetPowerOnValues Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read dwValue A pointer that stores the power on value of contiguous D O channels each bit holds one channel value A bit value of 0 represents the power on status of the start channel A bit value of 1 represents the status of the second digital output channel The values of the unused bits are random Return Value MxXIO_OK Refer to Return Codes 6 93
70. E _ bytSlot BYTE _ bytChannel double dValue 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 The unit is Vdc for the voltage channel and mA for the current channel Return Value MXIO_OK Refer to Return Codes 6 183 ioLogik MXIO DLL API Reference Direct I O Command Sets AO_GetSafeRaws This function code is used to get the raw safe values of contiguous analog output channels int AO_GetSafeRaws int hConnection BYTE bytSlot BYTE _ bytStartChannel BYTE _ bytCount WORD wvValue 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 wValue An array that stores the raw safe values of the contiguous A O channels wValue 0 represents the value of the starting channel Return Value MXIO OK Refer to Return Codes AO_SetSafeRaws This function code is used to set safe values for contiguous A O Channel s in raw data format int AO_GetSafeRaws int hConnection BYTE bytSlot BYTE _ bytStartChannel BYTE _ bytCount WORD wvValue Arguments hConnection The handle for an
71. 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 Connecting to W5000 series GPRS I O Modbus Command Sets vs Direct I O Command Sets gt Modbus Command Sets gt Direct I O Command Sets OoOoOocovoo 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 Ethernet Ethernet ioLogik 4000 remote I O ioLogik E2000 Ethernet I O IP 192 168 8 1 IP 192 168 8 1 Port 502 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 192 168 8 1 502 MXEIO_ Connect should return a handle 2 Use the handle to access the desired I O point with Modbus commands or direct I O commands 3 To finish the operation use MXEIO_Disconnect to release Windows system resources Program Flow I Connecting to a Single Ethernet I O MXEIO Connect i Vv Direct I O Command Sets Modbus Command Sets MXEIO Disconnect 2 2 ioLogik MXIO DLL API Reference Programming Flow Connecting to Multiple Ethernet I O Before multiple Ethernet I Os can be accessed over the network make sure that each I O has a unique IP address Ethernet e
72. 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 When dValue is 0x8000 it means the sensor is not wired correctly When the operating mode of the TC module is voltage input the unit is uv Use ioAdmin to check the T O module settings Return Value MXIO OK Refer to Return Codes 6 239 ioLogik MXIO DLL API Reference Direct I O Command Sets TC_ReadRaws This function code is used to read the temperature value of contiguous channels in raw data format int TC_ReadRaws int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount 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 bytStartChannel Specifies the starting channel bytCount The number of channels to read wValue An array that stores the temperature values of the contiguous channels in raw data format wValue 0 represents start channel 0 When wValue is 0x8000 it means the sensor is not correctly wired When the operating mode is temperature sensor 0 1 C F When the operating mode of the TC module is 78 0 78 0 mV 10 uV count When the operating mode of the TC module is 32 7 32 7 mV luV count When the operating mode of
73. 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 write wValue An array that stores safe values in raw data format for the contiguous A O channels wValue 0 represents the value of the starting analog output channel Return Value MXIO_OK Refer to Return Codes 6 184 ioLogik MXIO DLL API Reference Direct I O Command Sets AO_GetSafeRaw This function code is used to get the safe value for a specific A O channel in raw data format int AO_GetSafeRaw 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 wValue A pointer to the safe value for the desired channel in raw data format Return Value Succeed MXIO_OK Fail Refer to Return Codes AO_SetSafeRaw This function code is used to set the safe value for a specific A O channel in raw data format int AO_SetSafeRaw int hConnection BYTE bytSlot BYTE bytChannel WORD _ wvValue 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
74. I Reference Direct I O Command Sets Pulse2K_GetPowerOnValues This function code is used to get the power on values for contiguous pulse channels int Pulse2K_GetPowerOnValues int Arguments hConnection bytStartChannel bytCount dwValue Return Value hConnection bytStartChannel BYTE bytCount DWORD dwValue The handle for an I O connection BYTE Specifies the starting channel The number of channels to read A pointer to the power on values of the contiguous pulse channels each bit holds the value of one channel A bit value of 0 represents the power on value of the start channel A bit value of 1 represents the value of the second pulse channel The values are 0 stop 1 start MXIO_OK Refer to Return Codes Pulse2K_SetPowerOnValues This function code is used to set the power on values of contiguous pulse channels int Pulse2K_SetPowerOnValues int Arguments hConnection bytStartChannel bytCount dwValue Return Value 6 127 hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue The handle for an I O connection Specifies the starting channel The number of channels to set Stores the power on values for the contiguous channels each bit holds the value of one channel A bit value of 0 represents the power on value of the start channel A bit value of 1 represents the value of the second pulse channel The values are 0 stop 1 start MXIO_OK R
75. IO_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 int MXEIO_CheckConnection inth Connection DWORD dwTimeOut BYTE bytStatus Arguments hConnection Handle of the I O connection dwTimeOut Timeout value in milliseconds for network connection bytStatus Connection status 0 Check connection ok 1 Check connection fail 2 Check connection timeout Return Value MXIO_OK Refer to Return Codes General Commands C C int MXIO_GetDll Version Arguments None Return Value Succeed The DLL version Version 2 0 0 0 is expressed as value 0x2000 MXIO_GetDIIBuildDate This will get the DLL release date C C int MXIO_GetDIIBuildDateQ Arguments None Return Value Succeed Return the DLL release date If the value is 0x20071001 then the date is 2007 10 01 4 5 ioLogik MXIO DLL API Reference System Commands Sets This function reports the model name of the network adapter and MXIO_GetModuleType VO wodules int MXIO_GetModuleType int hConnection BYTE bytSlot WORD wType Arguments hConnection T 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
76. K Refer to Return Codes 6 88 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_DO_GetSafeValues This function code is used to get output safe values of contiguous D O channels int W5K_DO_GetSafeValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function W5K_DO_GetSafeValues Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read dwValue A pointer that stores the safe value of contiguous D O channels each WORD holds one channel value A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the status of the second digital output channel The values of the unused bits are random Return Value MXIO_OK Refer to Return Codes 6 89 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_DO SetSafeValues This function code is used to set safe values of contiguous D O channels int W5K_DO_SetSafeValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function W5K_DO_SetSafeValues Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nValue As Long As Long Arguments hConnectio
77. K_DI SetFilters This function code is used to set the filter of contiguous D I channels int E1K_DI_SetFilters int hConnection BYTE bytStartChannel BYTE bytCount WORD wFilter Visul Basic Declare Function E1K_DI_SetFilters Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iFilter As Integer As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set wFilter An array that stores contiguous D I channel s filter value wFilter 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes 6 25 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 int Cnt2K_Reads int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Arguments The handle for an I O connection hConnection bytStartChannel bytCount dwValue Specifies the starting channel The number of channels to read An array that stores the counter values of the contiguous channels dwValue 0 represents the value of the starting channel MXIO_OK Refer to Return Codes Cnt2K_Clears This function code is used to clear the counter values of contiguous D I channels in
78. K_Pulse_SetOutputCounts W5K_Pulse_GetStartStatuses W5K_Pulse_SetStartStatuses W5K_Pulse_GetPowerOn Values W5K_Pulse_SetPowerOn Values W5K_Pulse_GetSafe Values W5K_Pulse_SetSafe Values ioLogik MXIO DLL API Reference MXIO API Overview Pulse Output Commands for ioLogik E1200 Function Name E1K_Pulse_GetSignalWidths E1K_Pulse_SetSignalWidths E1K_Pulse_GetOutputCounts E1K_Pulse_SetOutputCounts E1K_Pulse_GetStartStatuses E1K_Pulse_SetStartStatuses E1K_Pulse_GetPowerOn Values E1K_Pulse_SetPowerOn Values E1K_Pulse_GetSafe Values E1K_Pulse_SetSafe Values Digital Input amp Output mode change Commands for ioLogik 5000 Function Name W5K_DIO_GetIOModes W5K_DIO_SetIOModes Digital Input amp Output mode change Commands for ioLogik 5000 Function Name E1K_DIO_GetIOModes Analog Input Commands Function Name AIL Reads AI Read AI _ReadRaws AI ReadRaw E42_AI_Reads for E4200 only 3 11 ioLogik MXIO DLL API Reference MXIO API Overview 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 AI2K_GetChannelStatus AI2K_S
79. Long As Long Arguments hConnection The handle for an I O device connection bytSlot Slot number of the I O module from 1 to 16 bytStartChannel Specifies the starting channel bytCount The number of channels to be retrieved dwAction A pointer that stores the contiguous D O channel s safe action values each bit holds one channel value A bit value of 0 represents the digital input status of the start channel A bit value of 1 represents the second digital input channel s status The values of the unused bits are random 0 Fault Value 1 Hold last value Return Value MXIO_OK Refer to Return Codes 6 109 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_DO SetSafeActions This function code is used to set the safe action of contiguous D O channels int E42_DO_SetSafeActions int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD dwaAction Visual Basi Declare Function E42_DO_SetSafeActions Lib MXIO dll aca BASIC ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte nAction As Long As Long Arguments hConnection The handle for an I O device connection bytSlot Slot number of the I O module from to 16 bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwAction A pointer that stores the contiguous D O channel s safe action values each bit holds o
80. Long As Long hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwStatus A pointer that stores the contiguous channel s triggers types each bit holds one channel trigger type A bit value of 0 represents the trigger type of the start channel A bit value of 1 represents the second channel s trigger type The values are 0 LoToHi 1 HiToLo MXIO_OK Refer to Return Codes 6 47 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Cnt_GetTriggerTypes This function code is used to get contiguous channel s trigger types when D I channel in Count mode int W5K_Cnt_GetTriggerTypes int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwType Visual Basic Declare Function W5K_Cnt_GetTriggerTypes Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nType As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be get dwType A pointer that stores the contiguous count channel s start status each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 stop 1 start Return Value MXIO_ OK Refer to Return Codes
81. MXIO dIl ByVal hConnection As Long iStatus As Integer As Long Arguments hConnection The handle for a connection iStatus A pointer that stores the specific module s Click amp Go Logic start status The values are 0 stop 1 start Return Value MXIO_OK Refer to Return Codes 6 6 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_GetOpcDevicesInfo This function gets ioLogik W5000 device information that links in A OPC server int W5K_GetOpcDevicesInfo char szIP DWORD dwTimeOut WORD wDeviceCount char szDevicelInfo Visual Basic Declare Function W5K_GetOpcDevicesInfo Lib MXIO dIl ByVal szIP As String ByVal nTimeOut As Long ByVal wDeviceCount As Integer ByVal szDeviceInfo As String As Long Arguments szIP IP address of the A OPC Server to be connected dwTimeOut Timeout value for establishing a network connection with the ioLogik Ethernet Adapter The unit is in milliseconds wDeviceCount Total number of I O devices connected to the A OPC server from W5K_ListOpcDevices API szDevicelnfo Each ioLogik W5000 device status request 12 Bytes Device Status IP Address 4 bytes start from array 0 MAC Address 6 Bytes start from array 4 Online Status 1 Bytes start from array 10 UnitID 1 Bytes start from array 11 Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 7 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_GetO
82. O channels each bit holds one channel value A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the status of the second digital output channel MXIO_OK Return Value Refer to Return Codes Digital Output Commands for ioLogik E2000 R2000 DO2K_GetModes This function code is used to get the mode of contiguous D O channels int DO2K_GetModes int hConnection BYTE _ bytStartChannel BYTE _ bytCount WORD wMode Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to read wMode An array that stores the modes of contiguous D O channels The values are 0 D O mode 1 Pulse mode Return Value MXIO_OK Refer to Return Codes 6 79 ioLogik MXIO DLL API Reference Direct I O Command Sets DO2K_SetModes This function code is used to set the modes of contiguous D O channels int DO2K_SetModes int Arguments hConnection bytStartChannel bytCount wMode Return Value hConnection BYTE _ bytStartChannel BYTE _ bytCount WORD wMode J The handle for an I O connection Specifies the starting channel The number of channels to set An array that stores the modes of contiguous D O channels The values are 0 D O mode 1 Pulse mode MXIO_OK Refer to Return Codes DO2K_GetMode This function code is used to get the mode of a specific D O channel
83. O connection Slot number of the I O module from 1 to 32 The desired channel A pointer to the safe action of the desired A O channel The values are 0 Safe value 1 Hold last state 2 Low Limit 3 High Limit MXIO_OK Refer to Return Codes 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 int AO4K_GetSafeAction int hConnection BYTE bytSlot BYTE bytChannel WORD wAction Arguments hConnection The handle for an I O connection bytSlot Slot number of the I O module from 1 to 32 bytChannel The desired channel wAction Stores the safe action of the desired A O channel The values are 0 Safe value 1 Hold last state 2 Low Limit 3 High Limit MXIO_OK Refer to Return Codes Return Value AO4K_SetSafeAction This function code is used to set the safe action for a specific channel int AO4K_GetSafeAction int hConnection BYTE bytSlot BYTE bytChannel WORD wAction Arguments hConnection The handle for an I O connection bytSlot Slot number of the I O module from 1 to 32 bytChannel The desired channel wAction Stores the safe action of the desired A O channel The values are 0 Safe value 1 Hold last state 2 Low Limit 3 High Limit MXIO_OK Refer to Return Codes Return Value 6 193 ioLogik MXIO DLL API Reference Direct I O Command Sets Analog Output Commands fo
84. O_OK Refer to Return Codes Adp4K_ReadSlotAmount This function code is used to read the number of expansion slots C C int Adp4K_ReadSlotAmount int hConnection WORD wA mount Arguments hConnection The handle for a connection wAmount A pointer to the number of expansion slots Return Value Succeed MXIO_OK Fail Refer to Return Codes Adp4K_ReadAlarmedSlot This function code is used to read the number of expansion slots C C int Adp4K_ReadAlarmedSlot int hConnection DWORD dwAlarm Arguments hConnection The handle for a connection dwAlarm A pointer to the Alarm slot list The corresponding bit represents slot position The wAlarm bit 0 is represented by the first slot and bit 31 is represented by the last slot The values are 0 Normal slot 1 Alarm slot Return Value MXIO OK Refer to Return Codes 4 12 ioLogik MXIO DLL API Reference System Commands Sets Commands for ioLogik E4200 E42_ReadFirmwareRevision This function reports the firmware revision for the ioLogik E4200 Network Adapter C C int E42_ReadFirmwareRevisioin int hConnection BYTE bytRevision Visual Basic Declare Function E42_ReadFirmwareRevision Lib MXIO dll ByVal hConnection As Long bytRevision As Byte As Long Arguments hConnection I O device handle for a connection bytRevision stored ioLogik 4000 firmware revision bytRevision 0 major A bytRevision 1 minor B bytRevision 2 release C bytRevisi
85. PT500 3 PT 1000 4 PT50 16 JPT100 17 JPT200 18 JPT500 19 JPT1000 32 NI100 33 NI200 34 NI500 35 NI1000 48 NI120 64 CU10 128 1 to 2000 Ohm 100 mohm 1 count 129 1 to 327 Ohm 10 mohm 1 count 130 1 to 620 Ohm 20 mohm 1 count Others return Illegal Data Value MXIO_OK Refer to Return Codes Return Value 6 238 ioLogik MXIO DLL API Reference Direct I O Command Sets Thermocouple Commands TC_Reads This function code is used to read the temperature values for contiguous channels int TC_Reads int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount double dValue 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 dValue An array that stores the temperature values of the contiguous channels dValue 0 represents start channel 0 When dValue is 0x8000 it means the sensor is not correctly wired When the operating mode of the TC module is voltage input the unit is uv Use ioAdmin to check the T O module settings Return Value MXIO_OK Refer to Return Codes TC_Read This function code is used to read the temperature value of a specific channel int TC_Read int hConnection BYTE bytSlot BYTE bytChannel double dValue Arguments hConnection The handle for an
86. Return Codes Pulse2K_SetOutputCount This function code is used to set the output count for a specific pulse channel int Pulse2K_SetOutputCount int hConnection BYTE bytChannel DWORD dwOutputCount Arguments hConnection The handle for an I O connection bytChannel The desired channel dwOutputCount A pointer to the output count for the desired channel Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 124 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 int Pulse2K_GetStartStatuses int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwStatus Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to read dwStatus A pointer that stores the start statuses for the contiguous pulse channels each bit holds the value of one channel A bit value of 0 represents the start status of the start channel A bit value of 1 represents the status of the second pulse channel The values are 0 stop Return Value 1 start MXIO_OK Refer to Return Codes Pulse2K_SetStartStatuses This function code is used to set the start statuses of contiguous pulse channels int Pulse2K_SetStartStatuses int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwStatus Arguments hConnection The
87. TD2K_GetStartStatus RTD2K_SetStartStatus RTD2K_GetStartStatuses RTD2K_SetStartStatuses RTD2K_GetSensorType RTD2K_SetSensorType RTD2K_GetSensorTypes RTD2K_SetSensorTypes RTD2K_GetEngUnit RTD2K_SetEngUnit RTD2K_GetEngUnits RTD2K_GetMathPar RTD2K_SetMathPar RTD2K_GetMathPars RTD2K_SetMathPars 3 16 ioLogik MXIO DLL API Reference MXIO API Overview RTD Commands for ioLogik E4200 Function Name E42_RTD_Reads E42 RTD_ReadRaws E42_RTD_GetEngUnit E42_RTD_SetEngUnit E42_RTD_GetSensorType E42_RTD_SetSensorType Thermocouple Commands Function Name TC_Reads TC_Read TC_ReadRaws TC_ReadRaw TC Commands for ioLogik E4200 Function Name E42_TC_Reads E42_TC_ReadRaws E42_TC_GetEngUnit E42_TC_SetEngUnit E42_TC_GetSensorType E42_TC_SetSensorType Click amp Go Logic Commands Commands for ioLogik E2000 Function Name Logic2K_GetStartStatus Logic2K_SetStartStatus Commands for ioLogik E4200 Function Name E42_Logic_GetStartStatus E42_Logic_SetStartStatus 3 17 ioLogik MXIO DLL API Reference MXIO API Overview Commands for ioLogik W5000 Function Name W5K_Logic_GetStartStatus W5K_Logic_SetStartStatus Active I O Message Commands Command
88. The number of channels dwValue A pointer that stores the contiguous channel s power on values each bit holds one channel power on value A bit value of 0 represents the power on value of the start channel A bit value of 1 represents the second channel s power on value The values are 0 OFF 1 ON Return Value MXIO_OK Refer to Return Codes 6 66 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_Cnt_SetPowerOnValues This function code is used to set contiguous channel s power on values when the D I channel is in Count mode int E1K_Cnt_GetPowerOnValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function E1K_Cnt_SetPowerOnValues Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nValue As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be cleared dwValue Stores contiguous channels power on values each bit holds one channel power on value A bit value of 0 represents the power on value of the start channel A bit value of 1 represents the second channel s power on value The values are 0 OFF 1 ON Return Value MXIO_OK Refer to Return Codes 6 67 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_Cnt_GetSafeValues This function co
89. Values int hConnection bytSlot Arguments bytStartChannel bytCount dValue Return Value Succeed Fail 6 182 hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount Double dValue The handle for an I O connection Slot number of the I O module from 1 to 32 This parameter is inactive for the ioLogik E2000 and R2000 Specifies the starting channel The number of channels to set An array that stores the safe values for the contiguous A O channels dValue 0 represents the value of the starting analog output channel The unit is VDC for the voltage channel and mA for the current channel MXIO_OK Refer to Return Codes ioLogik MXIO DLL API Reference Direct I O Command Sets AO_GetSafeValue This function code is used to get the safe value for a specific A O channel int AO_GetSafeValue int hConnection BYTE bytSlot BYTE bytChannel double dValue 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 safe value of the desired A O channel The unit is VDC for the voltage channel and mA for the current channel Return Value MXIO_OK Refer to Return Codes AO_SetSafeValue This function code is used to set the safe value for a specific A O channel int AO_SetSafeValue int hConnection BYT
90. XIO 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 int RTD2K_GetSensorType int hConnection BYTE bytChannel WORD wSensorType Arguments 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 The values for normal channels are 0 PT50 1 PT100 2 PT200 3 PT500 4 PT1000 5 JPT100 6 JPT200 7 JPT500 8 JPT 1000 9 NI100 10 NI200 11 NI500 12 NI1000 13 NI120 14 310 Ohm 15 620 Ohm 16 1250 Ohm 17 2500 Ohm Others return Illegal Data Value The values for virtual channels are 20 AVG 21 DIV Others return Illegal Data Value Return Value MXIO_OK Refer to Return Codes 6 224 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 int RTD2K_SetSensorType int hConnection BYTE bytChannel WORD wSensorType Arguments 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 The values for normal channels are 0 PT50 1 PT100 2 PT200 3 PT500 4 PT1000 5 JPT100 6 JPT200 7 JPT500 8 JPT 1000 9 NI100 10 NI200 11 NI500 12 NI1000 13 NI120 14 3
91. XIO DLL API Reference Direct I O Command Sets WSK_DI SetModes This function code is used to set the mode of contiguous D I channels int W5K_DI_SetModes int hConnection BYTE bytStartChannel BYTE bytCount WORD wMode Visul Basic Declare Function W5K_DI_SetModes Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iMode As Integer As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read wMode An array that stores contiguous D I channel s mode wMode 0 represents the value of the starting channel The values are 0 D I Mode 1 Count Mode Return Value MXIO_OK Refer to Return Codes 6 18 ioLogik MXIO DLL API Reference Direct I O Command Sets WSK_DI GetFilters poe eae code is used to get the filter of contiguous D I int W5K_DI_GetFilters int hConnection BYTE bytStartChannel BYTE bytCount WORD wKilter Visul Basic Declare Function W5K_DI_GetFilters Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iFilter As Integer As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read wFilter An array that stores contiguous D I channel s filter value wFilter 0 repre
92. _SetStartStatuses int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwStatus Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to set dwStatus A pointer to the start statuses of the contiguous D I channels each bit holds the start status of one channel A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 stop 1 start MXIO_OK Refer to Return Codes Return Value 6 30 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 int Cnt2K_GetStartStatus int Arguments hConnection bytChannel bytStatus Return Value hConnection BYTE _ bytChannel BYTE bytStatus The handle for an I O connection The desired channel A pointer to the start status of the desired channel The values are 0 stop 1 start Cnt2K_SetStartStatus This function code is used to set the start status of a specific D I channel in Counter mode int Cnt2K_SetStartStatus int BYTE BYTE Arguments hConnection bytChannel bytStatus Return Value 6 31 hConnection bytChannel bytStatus The handle for an I O connection The desired channel A pointer to the start status of the desired channel The
93. ach byte holds eight coil values Return Value Succeed MXIO_OK Fail Refer to Return Codes This function code is used to read the contents of a contiguous MA eae block of the I O holding registers int MXIO_ReadRegs int hConnection BYTE _ bytRegisterType WORD wStartRegister WORD wCount WORD wRegister Arguments hConnection The handle for an I O connection bytRegisterType Coil type to be read The meaning for a value in an entity is as follows 3 read holding registers output word 4 read input register input word wStartRegister Specifies the starting register address The address is beginning at 0 wCount The number of coils to be read wRegister An array that stores the register values Return Value Succeed MXIO_OK Fail Refer to Return Codes 5 2 ioLogik MXIO DLL API Reference Modbus Command Sets This function code is used to write the contents of a contiguous MESIO Wia Rag block of the I O holding registers 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 Return Value MXIO_OK Refer to Return Codes 5 3 6 Direct I O Command Sets Direct I O command sets provide an intuitive way
94. al hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specificies the starting channel bytCount The number of channels to be set wValue An array that stores the contiguous D O channels relay count wValue 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes 6 212 ioLogik MXIO DLL API Reference Direct I O Command Sets RTD Commands RTD_Reads This function code is used to read the temperature values for contiguous channels int RTD_Reads int hConnection BYTE bytSlot BYTE _ bytStartChannel BYTE _ bytCount double dValue 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 dValue An array that stores the temperature values of the contiguous channels dValue 0 represents the start channel When dValue is 0x8000 it means the sensor is not wired correctly or the measured value is out of range When using the RTD module for Resistance Input the unit is Ohm When the operating mode is temperature sensor the unit is C or F depending on the setting Use the ioAdmin utility to check the current settings for the desired channels
95. annel Return Value MXIO_OK Refer to Return Codes 6 196 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_AO_GetPowerOnValues This function code is used to get the power on raw data of contiguous A O channels int E42_AO_GetPowerOnValues int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount WORD wvValue Visual Basic Declare Function E42_AO_GetPowerOnValues Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartChannel Specifies the strating channel bytCount The number of channels to be read wValue An array that stores the contiguous A O channel s power on raw data to be get The wValue 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes 6 197 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_AO_SetPowerOnValues This function code is used to set the power on raw data for contiguous A O channels int E42_AO_SetPowerOnValues int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount WORD wvValue Visual Basic Declare Function E42_AO_SetPowerOnValues Lib MXIO dII ByVal hConnection As Lo
96. are Function E1K_AI_Reads Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte dValue As Double As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read dValue An array that stores the contiguous A I channel s value dValue 0 represents the value of the starting channel The unit is Vdc for the voltage module and mA for the current module Return Value MXIO_OK Refer to Return Codes 6 167 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_AI_ ReadRaws This function code is used to read contiguous channel s analog input raw data int E1K_AI_ReadRaws int hConnection BYTE bytStartChannel BYTE bytCount WORD wvValue Visual Basic Declare Function E1K_AI_ReadRaws Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read wValue An array that stores the contiguous A T channel s raw data wValue 0 represents the value of the starting channel Ret I eturn Value MXIO_OK Refer to Return Codes 6 168 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_AI ReadMins This function code is used to
97. are incorporated into new editions of the manual Technical Support Contact Information Wwww moxa com support Moxa Americas Toll free 1 888 669 2872 Tel 1 714 528 6777 Fax 1 714 528 6778 Moxa Europe Tel 49 89 3 70 03 99 0 Fax 49 89 3 70 03 99 99 Moxa China Shanghai office Toll free 800 820 5036 Tel 486 21 5258 9955 Fax 86 10 6872 3958 Moxa Asia Pacific Tel 886 2 8919 1230 Fax 886 2 8919 1231 Chapter 1 Chapter 2 Chapter 3 Table of Contents VCR VIG Wore E E ETTE TT 1 1 What is the MXIO Library cise sd apr eee co tenet ee i e eE E R TE rE N E eSa 1 2 Supported Platforms esereai einn ein eae ee as Siete ee ae 1 2 Supported VO Modules ssc sess vsessevssin site doan r E E RE E R E 1 2 Supported T O Fir Wareicieesie enine aiaiai aranean ertean a E tean aiaa ieas 1 2 P gramming FIOW asco bie stew aactuectavavsaxaskennsteendines cactuncascudseduasvaassauanncenesdines 2 1 Connecting to a Single Ethernet Obrisi nyi E TA A R 2 2 Connecting to Multiple Ethernet I O sssssssessssseseesiessrsreerererssesrsrerreressstsestersteersesrsrrersesrse 2 3 Connecting to a Single Serial VOnt ieaiao re eaa aor anaia Eaa E EE aias 2 4 Connecting to Multiple RS 485 O ssessseeeesesssesesreriererssrsrsrerrerssssereretsesrstersesersesrerreretere 2 5 Connecting to the ioLogik E2000 and Attached RS 485 J O eeeseeeeseseeseeerereersrsrrrrereeeses 2 6 Connecting to W5000 series GPRS VO ce cece
98. artChannel BYTE bytCount 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 bytStartChannel Specifies the starting channel bytCount The number of channels to read wValue An array that stores the raw data values of the contiguous A I channels wValue 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes AI_ReadRaw This function code is used to read the raw data value of a specific analog input channel int AI 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 wValue A pointer to raw data value of the desired analog input channel Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 142 ioLogik MXIO DLL API Reference Direct I O Command Sets Analog Input Commands for ioLogik E2000 R2000 AI2K_ReadMins This function code is used to read the minimize values of contiguous A I channels int AI2ZK_ReadMins int hConnection bytStartChannel bytCount dValue Arguments Return Value hConnection bytStartChannel BYTE bytCount double dValue The handle for an I O conne
99. arting channel Return Value MXIO_OK Refer to Return Codes 6 161 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K_AI ResetMaxs This function code is used to reset contiguous A I channel s maximize value int W5K_AT_ResetMaxs int hConnection BYTE bytStartChannel BYTE bytCount Declare Function W5K_AI_ResetMaxs Lib MXIO dll Visual Basic ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte As Long 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 MXIO_OK Fail Refer to Return Codes 6 162 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_AI_GetRanges This function code is used to get contiguous A I channel s range int W5K_AI_GetRanges int hConnection BYTE bytStartChannel BYTE bytCount WORD wRange Visual Basic Declare Function W5K_AI_GetRanges Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iRange As integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read wRange An array that stores the contiguous A I channel s range wRange 0 represents the value of the starting channel The values are 00 150mV 01 500mV
100. arting channel bytCount The number of channels to be cleared dwValue Stores contiguous channels safe values each bit holds one channel safe value A bit value of 0 represents the safe value of the start channel A bit value of 1 represents the second channel s safe value The values are 0 OFF 1 ON Return Value MXIO_OK Refer to Return Codes 6 69 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_Cnt_GetTriggerType Words Visual Basic Arguments Return Value This function code is used to get contiguous channels trigger types when the D I channel is in Count mode int E1K_Cnt_GetTriggerTypeWords int hConnection BYTE bytStartChannel BYTE bytCount WORD wType Declare Function E1K_Cnt_GetTriggerTypeWords Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iType As Integer As Long hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be get wType A pointer that stores contiguous channels triggers types each bit holds one channel trigger type A bit value of 0 represents the trigger type of the start channel A bit value of 1 represents the second channel s trigger type The values are 0 LoToHi 1 HiToLo 2 Both MXIO_OK Refer to Return Codes 6 70 ioLogik MXIO DLL API Reference Direct I O Command Sets
101. aw data format wValue 0 represents the value of the starting channel Return Value MXIO OK Refer to Return Codes AO2K_GetPowerOnRaw This function code is used to get the power on value of a specific analog output channel in raw data format int AO2K_GetPowerOnRaw int hConnection BYTE bytChannel WORD wValue Arguments hConnection The handle for an I O connection bytChannel The desired channel wValue A pointer to the power on value for the desired channel in raw data format Return Value Succeed MXIO_OK Fail Refer to Return Codes AO2K_SetPowerOnRaw _ This function code is used to set the power on value of a specific analog output channel in raw data format 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 Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 190 ioLogik MXIO DLL API Reference Direct I O Command Sets Analog Output Commands for ioLogik 4000 AO4K_GetSafeActions This function code is used to get the safe actions of contiguous A O channels int AO4K_GetSafeActions int hConnection BYTE _ bytSlot BYTE _ bytStartChannel BYTE _ bytCount WORD waAction Arguments hConnection The handle for an I O connection bytSlot Slot number of the I O module from 1 to 32 by
102. b MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nMode As Long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwStatus A pointer that stores the contiguous channel s DI DO mode each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 INPUT DI mode 1 OUTPUT DO mode Return Value MXIO_OK Refer to Return Codes 6 117 ioLogik MXIO DLL API Reference Direct I O Command Sets Pulse Output Commands for ioLogik E2000 R2000 Pulse2K_GetSignalWidths This function code is used to get the Hi Lo signal widths of contiguous pulse output channels int Pulse2K_GetSignalWidths int hConnection BYTE bytStartChannel BYTE bytCount WORD wHiWidth WORD wLoWiadth Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to read wHiWidth An array that stores the Hi signal widths of the contiguous pulse output channels wHiWidth 0 represents the Hi signal width of the starting channel wLoWidth An array that stores the Lo signal widths of the contiguous pulse output channels wLoWidth 0 represents the Lo signal width of the starting channel MXIO_OK
103. ber of channels to be reset Succeed MXIO_OK Fail Refer to Return Codes Return Value 6 174 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_AI_GetRanges This function code is used to get contiguous A I channel s range int E1K_AI_GetRanges int hConnection BYTE bytStartChannel BYTE bytCount WORD wRange Visual Basic Declare Function E1K_AI_GetRanges Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iRange As integer As Long arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read wRange An array that stores the contiguous A I channel s range wRange 0 represents the value of the starting channel The values are 0 0 10V 1 4 20mA Others_return Illegal Data Value Return Value MXIO_OK Refer to Return Codes 6 175 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_AI_ GetChannelStatus This function code is used to get the AI channel status of ioLogik es 1200 Module int E1K_AI_GetChannelStatuses int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Declare Function E1K_ AI _GetChannelStatuses Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Visual Basic Arguments hConnection The handle for an I O device co
104. bytStartChannel BYTE bytCount WORD wMode Visul Basic Declare Function E1K_DI_SetModes Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iMode As Integer As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set wMode An array that stores contiguous D I channel s modes wMode 0 represents the value of the starting channel The values are 0 D I Mode 1 Count Mode Return Value MXIO_OK Refer to Return Codes 6 23 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K DI GetFilters This function code is used to get the filter of contiguous D I channels int E1K_DI_GetFilters int hConnection BYTE bytStartChannel BYTE bytCount WORD wFilter Visul Basic Declare Function E1K_DI_GetFilters Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iFilter As Integer As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels wFilter An array that stores contiguous D I channel s filter value wFilter 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes 6 24 ioLogik MXIO DLL API Reference Direct I O Command Sets E1
105. caeeecsaecaeesesnerseenaeeees 6 16 Digital Input Commands for the ioLogik E1200 0 eee eeesseeecneeeeceseeeeeecaeeeceaeeaeeseenees 6 21 Counter Commands for ioLogik E2000 R2000 cee eeeecsecseeeeceeeeeceseeeeeseeseesecnerseenaeeees 6 26 Counter Commands for ioLogik W5000 ce ceeeesesceseeeeeecseeecseeeecsaeeeeeaecaeesecneeeeenaeenes 6 42 Counter Commands for the ioLogik E1200 cee ceesecseeseesecneeeecneeeeceaeeeessecaeesecnereeesaeeees 6 58 Digital Output Command oy nsen nete aea aa a e eases 6 74 Digital Output Commands for ioLogik E2000 R2000 sesesseeseseesiesesssrssreeresessesrrrreress 6 79 Digital Input Output Commands for ioLogik E2000 eeesesesessseereseessrsesreerereersesreressses 6 84 Digital Output Commands for ioLogik W5000 sesseesesseeeesesssrsrsreereressrsrsrerrerersesesreerens 6 87 Digital Output Commands for 10Logik E1200 00 ee eseeceesecneeeecneeeecseeeeesecaeeecsaeeaeeseenees 6 95 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Digital Input Output Commands for ioLogik W5000 ee ceeeceeeeceseeeeeeceeeeeeeeeeeaees 6 104 Digital Output Commands for ioLogik 4000 eee eceseeeeeeecneeeeceeeeeeeaeceeesecaeesesneeeesaees 6 106 Digital Output Commands for ioLogik E4200 0 eeseeeeeeecneeeecneeeeceaeceeesecaeeeeeaesaeeseens 6 108 Digital Input Output Commands for E1200 eee eeeseeseeesceeeeeceseeeeesecseesecneeeeeseenaeseeeas 6 117 Pulse Output Commands for ioLogik E2000 R2000
106. cesceseeeeceseeecesecaeesecseeecsaeeecsaecesesesseeseenaeaeeats 2 7 Modbus Command Sets vs Direct I O Command Sets ccecesescessecreesecneeeeesecneeeeaeeeees 2 7 Modbus Command Sets s c i csi ciacesscccitvacsiatessdsdeb ine decnscesudebessensduecs sites ses EEE ERT 2 7 Direct O Command Sets aiss nasade goes bens ishiieaieineiieannnenogus 2 7 MIXIO API OV GREW ICW isusststaced dates Gas cadunc oannapadairant anteeniebtasebtrneeea asa ea aaa 3 1 System Command Sets aiei resetips EEE EEE EEEE EE TEE VEE E EEEE EEE ES 3 2 RS 485 RS 232 I O Connect Commands sssssesessseseeeseseeeseterssterrssesesreseeereserereeee 3 2 Ethernet I O Connect Commands ssssseeeseeeesseeeesestretsrsteerrseesrssrerreerrreesrentssererese 3 2 General Commands iiris osiers risak tre rees easar EE PEARSE OEE IES aaas E eissii 3 2 Commands for ioLogik E2000 R2000 ssssessesesssesssisrsssrsesrerrsrssssrsrsrerrereersesrerrerees 3 2 Commands for ioLogik NA4000 00 eee eeecseeeecseesecseceeesecaeesecneeseceaecaesaecaeeseenasseeeas 3 3 Commands for ioLogik E4200 0 ee eseseesecseeeeceeeeecseceeesecaeesecnaeeecsaseaesecseeseenasseeeas 3 3 Commands for i0 Logik W5000 ou eesessesecseeseceeeeeceseceeesecaeesecnaeeeceaecaessesaeeasesecneeaes 3 3 Commands for ioLogik E1200 oo ee eee cceesecseeeececeeecseceeesecseesecneesecsaecaeaecaeeseenasseeeas 3 4 Modbus Command Sets troscia aea ap tabees r ApS TE 3 4 Direct O Command S tsyi52 4 004 isk aie
107. channel int DO4K_GetSafeAction int hConnection BYTE bytSlot BYTE bytChannel WORD wAction Arguments hConnection The handle for an I O connection bytSlot Slot number of the I O module from 1 to 32 bytChannel The desired channel wAction A pointer to the safe action for the desired D O channel The values are 0 Safe Value 1 Hold last state MXIO_OK Refer to Return Codes Return Value DO4K_SetSafeAction This function code is used to set the safe action for a specific channel int DO4K_GetSafeAction int hConnection BYTE bytSlot BYTE bytChannel WORD wAction Arguments hConnection The handle for an I O connection bytSlot Slot number of the I O module from 1 to 32 bytChannel The desired channel wAction Stores the safe action for the desired D O channel The values are 0 Safe Value 1 Hold last state MXIO_OK Refer to Return Codes Return Value Digital Output Commands for ioLogik E4200 6 108 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_DO GetSafeActions This function code is used to get the safe action of contiguous D O channels int E42_DO_GetSafeActions int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD dwaAction Visual Basi Declare Function E42_DO_GetSafeActions Lib MXIO dll ISuar Basie ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte nAction As
108. channel wValue Stores the safe value for the desired channel in raw data format Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 185 ioLogik MXIO DLL API Reference Direct I O Command Sets Analog Output Commands for ioLogik E2000 R2000 AO2K_GetRanges This function code is used to get the ranges of contiguous A O channels int AO2K_GetRanges int hConnection BYTE _ bytStartChannel BYTE _ bytCount WORD wRange J Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to read wRange An array that stores theranges of the contiguous A O channels wRange 0 represents the value of the starting channel The values are 0 0 10 VDC 1 4 20 mA Oxff disable Others return Illegal Data Value Return Value MXIO_OK Refer to Return Codes AO2K_SetRanges This function code is used to set the ranges of contiguous A O channels int AO2K_SetRanges int hConnection BYTE _ bytStartChannel BYTE _ bytCount WORD wRange J 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 The values are 0 0 10 VDC 1 4 20 mA Others return Illegal Data Value Return Value MXIO OK Refer to Retur
109. cneseeenaeenes 3 15 Relay Commands for ioLogik E1200 00 eeeseecsseeeceseeeesecneseeceeeecsaeeeeesecneseeenaeeess 3 15 RED Commands 522 055 000 as SG HG a AR ee E 3 16 RTD Commands for ioLogik E4200 oo eee eecseecseeeceeceeesecereceeeeeeeaecaeesecereeenaeeees 3 17 Thermocouple Commands cece ce E E RES E E 3 17 TC Commands for ioLogik E4200 oo eee cesecseseceseeecsseceeesecneseecsaseecaeceeesecneserenaeeees 3 17 Click amp Go Logic Commands cee eessecseesecsseeeceseeeeesecseescesecaeesecnaeecsaececaecatesecnesrenaeeees 3 17 Commands for ioLogik E2000 0 eeeeseesecseeeeceeeeeceaecseesecnesseceaeeeesaeceeesecneseenaeeess 3 17 Commands for ioLogik E4200 0 eesesssesecseeeeceseeecssecseesecnessecnaeeecaecaeesesneserenaeeees 3 17 Commands for i0 Logik W5000 ou eesesessecseeeeceseeecaecaeesecseesecnaeeecsaeceeesecneeseeseenees 3 18 Active I O Message Commands cccesesssssscseeseceeeeecaeeeesecaeesecnaesecsaeeeesaecatesesneeseenaeeees 3 18 Commands for ioLogik E2000 0 0 ee eeesesssecseeseceseeecssecseesecnevsecsaeeeceaeceeesessesereeaeeees 3 18 Command for ioLogik E4200 cee eeceseessssecseesecsseeecaecseesecsessecsaeeecsaecaeesecneverenaeenss 3 18 Commands for 10 Logik W5000 ce eeceseessssecseeeecnseeecesecseesecneeseceaseeesaeceeesecneeaeeseenees 3 18 System Command Set ccccccseseccceeeeeeeeeeseeeeeeeesseeeeeeeeseeeeessseeeeeeesseeeeeeeees 4 1 RS 232 RS 485 I O Connect Commands cece eeeeeeeeeceesceseceecesec
110. contiguous analog input channels int AI Reads int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount double dValue 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 dValue An array that stores the values of the contiguous A I channels dValue 0 represents the value of the starting channel The unit is Vdc for the voltage module and mA for the current module MXIO_OK Refer to Return Codes Return Value AI Read This function code is used to read the value of a specific analog input channel int AI _ Read int hConnection BYTE bytSlot BYTE bytChannel double dValue 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 The unit is VDC for the voltage module and mA for the current module Return Value MXIO_OK Refer to Return Codes 6 141 ioLogik MXIO DLL API Reference Direct I O Command Sets AI_ReadRaws This function code is used to read the raw data values of contiguous analog input values int AI_ReadRaws int hConnection BYTE bytSlot BYTE bytSt
111. ction BYTE Specifies the starting channel The number of channels to read An array that stores the minimize values of contiguous A I channels dValue 0 represents the value of the starting channel The unit is VDC for the voltage module and mA for the current module MXIO_OK Refer to Return Codes AI2K_ReadMinRaws This function code is used to read the minimize raw data values of contiguous A I channels int AI2K_ReadMinRavws int Arguments hConnection bytStartChannel bytCount wValue Return Value 6 143 hConnection bytStartChannel BYTE bytCount WORD wValue The handle for an I O connection BYTE Specifies the starting channel The number of channels to read An array that stores the minimize raw data values of the contiguous A I channels wValue 0 represents the value of the starting channel MXIO_OK Refer to Return Codes ioLogik MXIO DLL API Reference Direct I O Command Sets AI2K_ResetMins This function code is used to reset the minimize values of contiguous A I channels int AI2K_ResetMins int hConnection BYTE _ bytStartChannel BYTE _ bytCount Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to be reset Return Value Succeed MXIO_OK Fail Refer to Return Codes AIK_ReadMin This function code is used to read the minimize value for a specific A I channel int AI2Z
112. ction bytStartChannel Specifies the starting channel bytCount The number of channels to be clear dwValue Stored the contiguous channel s safe values each bit holds one channel safe value A bit value of 0 represents the safe value of the start channel A bit value of 1 represents the second channel s safe value The values are 0 OFF 1 ON Return Value MXIO_ OK Refer to Return Codes 6 53 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Cnt_GetTriggerType Words Visual Basic Arguments Return Value This function code is used to get contiguous channel s trigger types when D I channel in Count mode int W5K_Cnt_GetTriggerTypeWords int hConnection BYTE bytStartChannel BYTE bytCount WORD wType Declare Function W5K_Cnt_GetTriggerTypeWords Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iType As Integer As Long hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be get wType A pointer that stores the contiguous channel s triggers types each bit holds one channel trigger type A bit value of 0 represents the trigger type of the start channel A bit value of 1 represents the second channel s trigger type The values are 0 LoToHi 1 HiToLo 2 Both MXIO_OK Refer to Return Codes 6 54 ioLogik MXIO DLL API
113. d R2000 bytStartChannel Specifies the starting channel bytCount The number of channels to read dValue An array that stores the values of contiguous analog output channels dValue 0 represents the value of the starting channel The unit is Vdc for the voltage channel and mA for the current channel Return Value MXIO_OK Refer to Return Codes AO_Writes This function code is used to write the values of contiguous analog output channels int AO_Writes int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount double dValue Arguments hConnection The handle for an I O connection bytSlot Slot number of the I O module from to 32 This parameter is inactive for the ioLogik E2000 and R2000 bytStartChannel Specifies the starting channel bytCount The number of channels to write dValue An array that stores the values of contiguous channel outputs dValue 0 represents the value of the starting channel The unit is VDC for the voltage channel and mA for the current channel Return Value MXIO OK Refer to Return Codes 6 178 ioLogik MXIO DLL API Reference Direct I O Command Sets AO_Read This function code is used to read the value for a specific analog output channel int AO_Read int hConnection BYTE bytSlot BYTE bytChannel double dValue Arguments hConnection The handle for an I O connection bytSlot Slot number of the I O module from 1 to 32 This parameter is inacti
114. d to set contiguous channel s filter values when the D I channel is in Count mode int E1K_Cnt_SetStartStatuses int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwStatus Declare Function E1K_Cnt_SetStartStatuses Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nStatus As Long As Long hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwStatus A pointer that stores the contiguous count channel s start status each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 stop 1 start MXIO_OK Refer to Return Codes 6 65 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_Cnt_GetPowerOnValues This function code is used to get contiguous channel s power on values when the D I channel is in Count mode int E1K_Cnt_GetPowerOnValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function E1K_Cnt_GetPowerOnValues Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount
115. de is used to get contiguous channel s safe values when the D I channel is in Count mode int E1K_Cnt_GetSafeValues int hConnection BYTE _ bytStartChannel BYTE _ bytCount DWORD dwValue Visual Basic Declare Function E1K_Cnt_GetSafeValues Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels dwValue A pointer that stores contiguous channels safe values each bit holds one channel safe value A bit value of 0 represents the safe value of the start channel A bit value of 1 represents the second channel s safe value The values are 0 OFF 1 ON Return Value MXIO_OK Refer to Return Codes 6 68 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_Cnt_SetSafeValues This function code is used to set contiguous channels safe values when the D I channel is in Count mode int E1K_Cnt_SetSafeValues int hConnection BYTE _ bytStartChannel BYTE _ bytCount DWORD dwValue Visual Basic Declare Function E1K_Cnt_SetSafeValues Lib MxXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nValue As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the st
116. des 6 115 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_DO SetFaultValues This function code is used to set safe values of contiguous D O channels int E42_DO_SetFaultValues int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD dwvValue Visual Basic Declare Function E42_DO_SetFaultValues Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nValue As Long As Long Arguments hConnection The handle for an I O device connection bytSlot Slot number of the I O module Slot numbers range from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwValue A pointer that stores the safe value of contiguous D O channels each WORD holds one channel value A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the status of the second digital output channel Return Value MXIO_OK Refer to Return Codes 6 116 ioLogik MXIO DLL API Reference Direct I O Command Sets Digital Input Output Commands for E1200 E1K_DIO_GetIOModes This function code is used to get contiguous channel s DI DO mode int E1K_DIO_GetIOModes int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwMode Visual Basic Declare Function E1K_ DIO_GetIOModes Li
117. ds the value of one channel A bit value of 0 represents the safe value of the start channel A bit value of represents the value of the second pulse channel The values are 0 stop 1 start MXIO_OK Refer to Return Codes Return Value Pulse2K_SetSafeValues This function code is used to set the safe value 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 A bit value of 0 represents the safe value of the start channel A bit value of 1 represents the value of the second pulse channel The values are 0 stop 1 start MXIO_OK Refer to Return Codes Return Value 6 129 ioLogik MXIO DLL API Reference Direct I O Command Sets Pulse2K_GetSafeValue This function code is used to get the safe value for a specific pulse channel int Pulse2K_GetSafeValue int hConnection BYTE _ bytChannel BYTE bytValue Arguments hConnection The handle for an I O server connection bytChannel The desired channel bytValue A pointer to the specific pulse channel s power on value The values are 0 stop 1 start Return Value MXIO_OK Refer to Return Codes Pulse2K_SetSafeValue This function code is used to set the safe value for a sp
118. e s connection bytStartChannel Specifies the starting channel bytCount The number of channels dwStatus A pointer that stores contiguous channels DI DO modes each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 ON 1 OFF MXIO_OK Refer to Return Codes 6 72 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_Cnt_SetSaveStatusesOn PowerFail Visual Basic Arguments Return Value power off storage enable mode int E1K_Cnt_SetSaveStatusesOnPowerFail int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwMode Declare Function E1K_Cnt_SetSaveStatusesOnPowerFail Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nMode As Long As Long hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwStatus A pointer that stores the contiguous channels DI DO modes each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 ON 1 OFF MXIO_OK Refer to Return Codes 6 73 ioLogik MXIO DLL API Reference Direct I O Command Sets Digital Output Commands DO_Reads This function code is used to
119. e A pointer to the power on value for specific channel The values are 0 OFF 1 ON Return Value MXIO_OK Refer to Return Codes Cnt2K_SetPowerOnValue This function code is used to set the power on value of a specific DA channel in Counter mode int Cnt2K_SetPowerOnValue int hConnection BYTE bytChannel BYTE bytValue 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 OFF 1 ON Return Value MXIO_OK Refer to Return Codes 6 35 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 int Cnt2K_GetSafeValues 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 read dwValue A pointer to the safe values each bit holds the safe value of one channel A bit value of 0 represents the safe value of the start channel A bit value of 1 represents the second channel s safe value The values are 0 OFF 1 ON MXIO_OK Refer to Return Codes Return Value Cnt2K_SetSafeValues This function code is used to set the safe values of contiguous D I channels in Counter mode int Cnt2K_SetSafeValues int hConnection BYTE by
120. e I O Server Ox1211 E1211 16DO Active Remote I O Server Ox1212 E1212 8DI 8DI DO Active Remote I O Server Ox1214 E1214 6DI 6Relay Outputs Active Remote I O Server 0x 1240 E1240 8AI Active Remote I O Server ioLogik MXIO DLL API Reference Product Model and ID Reference Table ioLogik 4000 Module ID Model Name Network Adapter Ethernet network adapter Modbus TCP RS 485 network adapter Modbus RTU RS 232 network adapter Modbus RTU Active Ethernet Network Adaptor P Digital input 4 DI sink 24 VDC RTB 4 DI source 24 VDC RTB 4 DI sink 48 VDC RTB 4 DI source 48 VDC RTB 8 DI sink 24 VDC RTB 8 DI source 24 VDC RTB 16 DI sink 24 VDC RTB 16 DI source 24 VDC 20 pin 4 DI 110 VAC RTB 4 DI 220 VAC RTB Digital Output 4 DO sink MOSFET 24 VDC 0 5A RTB 4 DO source MOSFET 24 VDC 0 5A RTB 8 DO sink MOSFET 24 VDC 0 5A RTB 8 DO source MOSFET 24 VDC 0 5A RTB 16 DO sink MOSFET 24 VDC 0 3A 20 pin 16 DO source MOSFET 24 VDC 0 3A 20 pin 4 DO sink MOSFET diag 24 VDC 0 5A RTB 4 DO source MOSFET diag 24 VDC 0 5A RTB 4 DO sink MOSFET diag 24 VDC 2 0A RTB 4 DO source MOSFET diag 24 VDC 2 0A RTB 2 DO relay 230 VAC 24 VDC 2 0A RTB 4DO Relay 230VAC 24VDC 2 0A RTB 2 DO Triac 12 to 125 AC 0 5A RTB 10 2 ioLogik MXIO DLL API Reference Product Model and ID Reference Table Analog Input 0x3400 M
121. e a an A a a a Ait eau E a aae Bact 3 4 Digital Input Commands yi 22c 3sc5sss5isesasas tsapdesucs chgssnsoesasusaschtabuasshiasvesssiveysbescusnes atebests 3 4 Digital Input Commands for ioLogik E2000 R2000 eee eeeeeeeeeceeeeeeeeeeeeeeneeeeeens 3 4 Digital Input Output Mode Commands for ioLogik E2000 cesesesecseeeeceeeeeeeee 3 4 Digital Input Commands for ioLogik E4200 eee eseesecneeseceeeeeceaeceeesecaeeseeneseeees 3 5 Digital Input Commands for ioLogik W5000 essseecseseeeeceeeeeceaeeeeesecneeseeneeeeeas 3 5 Digital Input Commands for ioLogik E1200 eee ceeesecseeeeceeeeeceaeceeesecaeeeeneeeeees 3 5 Counter Commands for ioLogik E2000 R2000 ee ceeeeseseeeecseeeeceseceeesecneeseeneeeeees 3 5 Counter Commands for ioLogik W5000 cseeeescsseeeeseceeeeceeeeceaecaeesecaeeseeneeseeeas 3 6 Counter Commands for ioLogik E1200 cee ecseeecssececesecseeeeceeeeceaeceeesecneeseeneeseeeas 3 7 Digital Output Commands siessen one EEEE ENEE E a 3 7 Digital Output Commands for ioLogik E2000 R2000 seesseeesesssesrsreereresrsrsrsreress 3 8 Digital Output Commands for ioLogik 4000 00 eee eeeesecneeeeceeeeeceaeeeeesecneeseenesseeeas 3 8 Digital Output Commands for ioLogik E4200 0 ee ee eecesecneeeeceeeeeceeeceeesecneeseesesneeaes 3 8 Digital Output Commands for ioLogik W5000 ee es eesesecseeeecneeeecseceeesecneeseeneeseeens 3 9 Digital Output Commands for ioLogik E1200 0 eee ee eeeesecseeeecneee
122. e handle for a connection Return Value MXIO_OK Refer to Return Codes 4 25 5 Modbus Command Sets 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 int MXIO_Read Coils int hConnection BYTE _ bytCoilType WORD wStartCoil WORD wcCount BYTE _ bytCoils Arguments hConnection Handle for the I O connection bytCoilType Coil type to be read 1 read coils output bit 2 read discrete input bit wStartCoil Specifies the starting coil address to be read The address is beginning at 0 wCount The number of coils to be read bytCoils An array that stores the status of coils each byte holds eight coil values Bit 0 of Ist byte represents 1st coil status Return Value MXIO OK Refer to Return Codes ioLogik MXIO DLL API Reference Modbus Command Sets Thi z 7 z 5 Fani MXIO_WriteCoils ve function code is used to write the contiguous status of an I O int MXIO_WriteCoils int hConnection WORD wsStartCoil WORD wcCount BYTE bytCoils 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 e
123. e of the starting channel MXIO_OK Refer to Return Codes Return Value 6 170 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_AI_ ResetMins This function code is used to reset contiguous A I channel s minimize value int E1K_AI_ResetMins int hConnection BYTE bytStartChannel BYTE bytCount Visual Basic Declare Function E1K_AI_ResetMins Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte As Long hConnection The handle for an I O device connection Arguments bytStartChannel Specifies the starting channel bytCount The number of channels to be reset Succeed MXIO_OK Fail Refer to Return Codes Return Value 6 171 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_AI_ ReadMaxs This function code is used to read contiguous A I channel s maximize value int E1K_AI_ReadMaxs int hConnection BYTE bytStartChannel BYTE bytCount double dValue Visual Basic Declare Function E1K_AI_ReadMaxs Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte dValue As Double As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read dValue An array that stores the contiguous A I channel s maximize value dValue 0 represents the value of the starting channel The uni
124. eceaeeeeesecneeeeseeneeees 3 9 Pulse Output Commands for ioLogik E2000 R2000 00 eee eeceseeeeesecreesecneeeeeneeeees 3 10 Pulse Output Commands for ioLogik W5000 0 0 0 eeeeseeecseeeeceseeeceaeceeesecnereenaeeees 3 10 Pulse Output Commands for ioLogik E1200 0 0 ee eeseeeeecneeeeceseeeceseceeesecereeenaeeees 3 11 Digital Input amp Output mode change Commands for ioLogik 5000 ee eeeeeeeeees 3 11 Digital Input amp Output mode change Commands for ioLogik 5000 n 3 11 Chapter 4 Chapter 5 Chapter 6 Analog Input Commands ss seses ene ee rnae pea areae seceesee EEN E ESPNS 3 11 Analog Input Commands for ioLogik E2000 R2000 eseseeeeeseesessrsreerereersrsrrreeress 3 12 Analog Input Commands for ioLogik W5000 essseessesssssesresrererssrsrsrerrersssrsrsreeress 3 12 Analog Input Commands for ioLogik E1200 eesessessesssssesreeisrerssrsrsrreeersrsseserreeress 3 13 Analog Output Commands sss sorires repena oiaro ae e ea eE apens h 3 13 Analog Output Commands for ioLogik E2000 R2000 sesseseseeeeeseessrsererersrsereeeress 3 14 Analog Output Commands for ioLogik NA4000 ssseseseeeseeeeeeresrsisrrerereresrsrseeesees 3 14 Analog Output Commands for ioLogik E4200 cee cseeecseeeeceseeeceseceeeseceeseeseenees 3 14 Relay Commands for ioLogik 2000 00 00 ccescseescesseeessecseeseceeeecsaeeecsacsaeeeesaeeateseenees 3 15 Relay Commands for ioLogik W5000 sccseescsseceseceesecseseeceaseeceaecaeese
125. ecific pulse channel int Pulse2K_SetSafeValue int hConnection BYTE bytChannel BYTE bytValue 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 Return Value MXIO_OK Refer to Return Codes 6 130 ioLogik MXIO DLL API Reference Direct I O Command Sets Pulse Output Commands for ioLogik W5000 W5K_Pulse_GetSignalWidth This function code is used to get the contiguous pulse channel s Hi Lo s32 signal width 32 bits int W5K_Pulse_GetSignalWidths32 int hConnection BYTE _ bytStartChannel BYTE _ bytCount DWORD dwHiWidth DWORD dwLoWidth Visual Basic Declare Function W5K_Pulse_GetSignalWidths32 Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iHiWidth As Long iLoWidth As Long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read dwHiWidth An array that stores the contiguous pulse channel s Hi signal width dwHiWidth 0 represents the Hi signal width of the starting channel dwLoWiadth An array that stores the contiguous pulse channel s Lo signal width dwLoWidth 0 represents the Lo signal width of the starting channel Return Value MXIO_OK Refer to Return Codes 6 131 i
126. ection BYTE bytSlot BYTE bytStartChannel BYTE bytCount WORD _ wvValue Visual Basic Declare Function E42_AO_SetFaultValues Lib MXIO dIl ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartChannel Specifies the starting channel bytCount The number of channels to write wValue An array that stores the contiguous channel safe raw data to set The wValue 0 represents the value of the starting analog output channel Return Value MXIO_OK Refer to Return Codes 6 204 ioLogik MXIO DLL API Reference Direct I O Command Sets Relay Commands for ioLogik 2000 RLY2K_GetResetTime This function code is used to get the reset time for D O channel int RLY2K_GetResetTime int hConnection BYTE bytChannel WORD _ wvValue Arguments hConnection The handle for an I O device connection bytChannel The specific channel to be get wValue An array that stores the contiguous D O channels relay time wValue 0 wValue 5 gt sec min hour day month year represents the value of the specific channel Return Value MXIO_OK Refer to Return Codes RLY2K_TotalCntRead This function code is used to get the count value for contiguous
127. efer to Return Codes ioLogik MXIO DLL API Reference Direct I O Command Sets Pulse2K_GetPowerOnValue This function code is used to get the power on value for a specific pulse channel int Pulse2K_GetPowerOnValue int hConnection BYTE bytChannel BYTE bytValue Arguments hConnection The handle for an I O connection bytChannel The desired channel bytValue A pointer to the power on value of the desired channel The values are 0 stop 1 start Return Value MXIO_OK Refer to Return Codes Pulse2K_SetPowerOnValue This function code is used to set the power on value for a specific pulse channel int Pulse2K_SetPowerOnValue int hConnection BYTE bytChannel BYTE bytValue 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 Return Value MXIO_OK Refer to Return Codes 6 128 ioLogik MXIO DLL API Reference Direct I O Command Sets Pulse2K_GetSafeValues This function code is used to get the safe values of contiguous pulse channels int Pulse2K_GetSafeValues 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 read dwValue A pointer to the safe values for the contiguous channels each bit hol
128. efer to Return Codes RTD2K_GetStartStatuses This function code is used to get contiguous channel s start status int RTD2K_GetStartStatuses int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwStatus Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be get dwStatus A pointer that stores the contiguous RTD channel s start status each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 stop 1 start Return Value MXIO_OK Refer to Return Codes 6 222 ioLogik MXIO DLL API Reference Direct I O Command Sets RTD2K_SetStartStatuses This function code is used to set contiguous channel s start status int RTD2K_SetStartStatuses int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwStatus Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwStatus A pointer that stores the contiguous count channel s start status each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 stop 1 start Return Value MXIO_OK Refer to Return Codes 6 223 ioLogik M
129. eger As Long Arguments hConnection The handle for a connection bytStartchannel Specifies the starting channel Bytcount The number of channels to bet read up to 80 wValue Represents the value of the starting channel The values are 0 to 255 Return Value MXIO_OK Refer to Return Codes 4 15 ioLogik MXIO DLL API Reference System Commands Sets E42_SetInternalRegs This function code is used to set the internal registers of the ioLogik E4200 network adaptors int E42_SetInternalRegs int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Visual Basic Declare Function E42_SetInternalRegs Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytStartchannel Specifies the starting channel bytCount The number of channels to retrieve up to 80 wValue An array that stores contiguous internal register The values are 0 to 255 Return Value MXIO_OK Refer to Return Codes E42_GetWorkInternalRegs This function code is used to get the working internal registers ofi the ioLogik E4200 Active Ethernet network adaptors int E42_GetWorkInternalRegs int hConnection BYTE bytStartChannel BYTE bytCount WORD wvValue Visual Basic Declare Function E42_GetWorkInternalRegs Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte
130. el A bit value of 1 represents the second channel s trigger type The values are 0 LoToHi 1 HiToLo 2 Both Return Value Succeed MXIO_OK Fail Refer to Return Codes Cnt2K_GetTriggerTypeWord This function code is used to get contiguous channel s trigger types when D I channel is in Count mode int Cnt2K_GetTriggerTypeWord int hConnection BYTE bytChannel WORD wTput Arguments hConnection The handle for an I O device connection byttChannel The specific channel to get wType A pointer that stores the trigger type for a specific channel The values are 0 LoToHi 1 HiToLo 2 Both MXIO_OK Refer to Return Codes Return Value 6 39 ioLogik MXIO DLL API Reference Direct I O Command Sets Cnt2K_SetTriggerTypeWord This function code is used to get contiguous channel s trigger types when D I channel is in Count mode int Cnt2K_SetTriggerTypeWord int hConnection BYTE bytChannel WORD wTput hConnection The handle for an I O device connection Arguments bytChannel The specific channel to be clear wType Stores the trigger type for a specific channel The values are 0 LoToHi 1 HiToLo 2 Both Return Value Succeed MXIO_OK Fail Refer to Return Codes Cnt2K_GetSaveStatuses This function code is used to get the power off storage mode OnPowerFail status for contiguous DI DO channels int Cnt2K_GetSaveStatusesOnPowerF ail int hConnection BYTE bytStartChannel BYTE bytCo
131. el Specifies the starting channel wCount The number of channels to be read dwValue A pointer that stores the contiguous D I channel s values each bit holds one channel value A bit value of 0 represents the digital input status of the start channel A bit value of 1 represents the second digital input channel s status The values of the unused bits are random Return Value MXIO_OK Refer to Return Codes 6 21 ioLogik MXIO DLL API Reference Direct I O Command Sets This functi i f i D I E1K_DI GetModes s function code is used to get the mode of contiguous D channels int E1K_DI_GetModes int hConnection BYTE bytStartChannel BYTE bytCount WORD wMode Visul Basic Declare Function E1K_DI_GetModes Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte wMode As Integer As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels wMode An array that stores contiguous D I channel s mode wMode 0 represents the value of the starting channel The values are 0 D I Mode 1 Count Mode Return Value MXIO_OK Refer to Return Codes 6 22 ioLogik MXIO DLL API Reference Direct I O Command Sets This functi i f i D I E1K_ DI SetModes s function code is used to set the mode of contiguous D channels int E1K_DI_SetModes int hConnection BYTE
132. el statuses of contiguous D O channels each bit holds one channel status A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the second digital output channel s status The values of the unused bits are random Ret I eturn Value MXIO_OK Refer to Return Codes 6 114 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_DO GetFaultValues This function code is used to get output safe values of contiguous D O channels int E42_DO_GetFaultValues int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function E42_DO_GetFaultValues Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device connection bytSlot Slot number of the I O module Slot numbers range from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartChannel Specifies the starting channel bytCount The number of channels to be received dwValue A pointer that stores the safe value of contiguous D O channels each WORD holds one channel value A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the status of the second digital output channel The values of the unused bits are random Return Value MXIO_OK Refer to Return Co
133. els wValue 0 represents the value of the starting channel Return Value MXIO OK Refer to Return Codes AO_WriteRaws This function code is used to write the raw data values for contiguous analog output channels int AO_WriteRaws int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount 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 bytStartChannel Specifies the starting channel bytCount The number of channels to write wValue An array that stores raw data values for the contiguous analog output channels wValue 0 represents the value of the starting analog output channel Return Value MXIO OK Refer to Return Codes 6 180 ioLogik MXIO DLL API Reference Direct I O Command Sets AO_ReadRaw This function code is used to read the raw data value of a specific analog output channel int AO_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 wValue A pointer to the raw data value of the desired analog output channel Return Value Succeed MXIO_OK Fail Refer to Return Codes AO_WriteRaw This function code is used to write the
134. er of channels to be set dwStatus A pointer that stores the contiguous pulse channel s start status each bit holds one channel value A bit value of 0 represents the start status of the start channel A bit value of 1 represents the status of the second pulse channel The values are 0 stop 1 start Return Value MXIO_OK Refer to Return Codes 6 136 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K_Pulse_GetPowerOnVall This function code is used to get the contiguous pulse channel s power ues on value int W5K_Pulse_GetPowerOnValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function W5K_Pulse_GetPowerOnValues Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read bytStatus A pointer that stores the contiguous pulse channel s power on value each bit holds one channel value A bit value of 0 represents the power on value of the start channel A bit value of 1 represents the value of the second pulse channel The values are 0 stop 1 start Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 137 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Pulse_SetPowerOnVal This function
135. er ranges from 1 to 16 wSensorTypet An array that stores the contiguous RTD channel s sensor type wSensorType 0 represents the value of all channels The values for normal channels are 0 PT 100 1 PT200 2 PT500 3 PT1000 4 PT50 16 JPT100 17 JPT200 18 JPT500 19 JPT1000 32 NI100 33 NI200 34 NI500 35 NI1000 48 NI120 64 CU10 128 1 to 2000 Ohm 100 mohm 1 count 129 1 to 327 Ohm 10 mohm 1 count 130 1 to 620 Ohm 20 mohm 1 count Others return Illegal Data Value Return Value MXIO_OK Refer to Return Codes 6 237 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_RTD_SetSensorType This function code is used to set the Sensor Type for contiguous channels int E42_RTD_SetSensorType int hConnection BYTE bytSlot WORD _ wSensorType Visual Basic Declare Function E42_RTD_SetSensorType Lib OMXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal iSensorType As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from to 16 bytStartchannel Specifies the starting channel bytcount The number of channels to be set wSensorTypet An array that stores the contiguous RTD channel s sensor type wSensorType 0 represents the value of the starting channel The values for normal channels are 0 PT 100 1 PT200 2
136. er ranges from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartChannel Specifies the starting channel bytCount The number of channels to be read wValue An array that stores the temperature value to be read The wValue 0 represents the start channel When the wValue is 0x8000 it means the senso is not wired correctly or the measured value is out of range When using the E42_RTD module for Resistance Input 1 to 2000Q 100mQ 1count When using the E42_RTD module for Resistance Input 1 to 327Q 10mQ 1count When using the E42_RTD module for Resistance Input 1 to 620Q 20mQ 1count When the operating mode is temperature sensor 0 1 C F lcount depending on the setting Check the ioAdmin utility for current settings Return Value MXIO_OK Refer to Return Codes 6 234 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_RTD_GetEngUnit This function code is used to get the temperatureType for contiguous channels int E42_RTD_GetEngUnit int hConnection BYTE bytSlot WORD wEngUnitf Declare Function E42_RTD_GetEngUnit Lib MXIO dIl ByVal hConnection As Long ByVal bytSlot As Byte iEngUnit As Integer As Long Visual Basic Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 wEngUnit An array that stores the contiguous A O channel s safe action to be retrieved The wEngUnit
137. er to Return Codes This will disconnect the RS 485 232 I O The I O handle will be MXSIO_Disconnect ahh C C int MXSIO_Disconnect int hConnection Arguments hConnection Handle of the I O device connection Return Value Succeed MXIO_OK Fail Refer to Return Codes 4 3 ioLogik MXIO DLL API Reference System Commands Sets Ethernet I O Connect Commands MXEIO mit Initiate the socket only for windows OS C C int MXEIO_Init 0 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 0 Arguments None Return Value None This function establishes a connection to the port of the Ethernet MXEIO_ Connect T O Once a connection is established a handle will be returned fo additional functions int MXEIO_Connect char szIP WORD wPort DWORD dwTimeOut int hConnection Arguments IP address of the Ethernet I O to be connected TCP port number of Ethernet I O Please use 502 for the ioLogik 4000 and E2000 dwTimeOut Timeout value in milliseconds for establishing a network connection with the ioLogik Ethernet adapter hConnection Handle of the I O device connection Return Value Succeed MXIO_OK Fail Refer to Return Codes 4 4 ioLogik MXIO DLL API Reference System Commands Sets F This will close the connection with the Ethernet I O the handle MXEIO_ Disconnect willbe aqvaldl C C int MXE
138. erOnValue int Arguments hConnection bytChannel bytValue Return Value Succeed Fail hConnection BYTE bytChannel BYTE bytValue The handle for an I O connection The desired channel Stores the power on value of a specific D O channel MXIO_OK Refer to Return Codes DO2K_GetPowerOnSeq _ This function code is used to get contiguous channel s DI DO Delaytimes power off storage enable mode int DO2K_GetPowerOnSeqDelaytimes int BYTE BYTE WORD Arguments hConnection bytStartChannel bytCount wValue Return Value 6 83 hConnection bytStartChannel bytCount wValue The handle for an I O device connection Specifies the starting channel The number of channels to be set A pointer that stores the contiguous channel s power on sequence delay time Second The values are Range 0 30 MXIO_OK Refer to Return Codes ioLogik MXIO DLL API Reference Direct I O Command Sets DO2K_SetPowerOnSeq This function code is used to set contiguous channel s DI DO mode Delaytimes power off storage enable mode int DO2K_SetPowerOnSeqDelaytimes int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue hConnection The handle for an I O device connection Arguments bytStartChannel Specifies the starting channel bytCount The number of channels to be set wValue A pointer that stores the contiguous channel s power on sequence delay time Second The valu
139. erence Direct I O Command Sets Digital Input Commands for ioLogik E4200 E42 DI Reads This function code is used to read the status of a group of contiguous D I channels int E42_DI_Reads int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD dwValue Visul Basic Declare Function E42_DI_Reads Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device s connection bytSlot Slot number of the I O module The Slot number ranges from 1 to 16 But this parameter is inactive in ioLogik 2000 bytStartChannel Specifies the starting channel wCount The number of channels to be read dwValue A pointer that stores the contiguous D I channel s values each bit holds one channel value A bit value of 0 represents the digital input status of the start channel A bit value of 1 represents the second digital input channel s status The values of the unused bits are random Return Value MXIO_OK Refer to Return Codes 6 15 ioLogik MXIO DLL API Reference Direct I O Command Sets Digital Inputs of ioLogik W5000 WSK_DI Reads This function code is used to read the status of a group of contiguous D I channels int W5K_DI_Reads int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Declare Function W5K_DI_Reads Lib MXIO dll V
140. erence Direct I O Command Sets Digital Input Commands for ioLogik E4200 E42_DI_Reads This function code is used to read the status of a group of contiguous D I channels int E42_DI_Reads int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function E42_DI_Reads Lib MXI O dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device s connection bytSlot Slot number of the I O module The Slot numbe ranges from to 16 But this parameter is inactive on the ioLogik 2000 bytStartchannel Specifies the starting channel wCount The number of channels to be read dwValue A pointer that stores the contiguous D I channel s values each bit holds one channel value A bit value of 0 represents the digital input status of the start channel A bit value of 1 represents the second digital input channel s status The values of the unused bits are random Return Value MXIO_OK Refer to Return Codes 6 3 ioLogik MXIO DLL API Reference Direct I O Command Sets Commands for ioLogik W5000 WS5K_GetInternalRegs This function code is used to get the internal registers of ioLogik 5000 Module int W5K_GetInternalRegs int hConnection BYTE bytStartChannel BYTE bytCount WORD wvValue Visual Basic Declare Function W5K_Ge
141. erence Direct I O Command Sets W5K_Cnt_GetStartStatuses This function code is used to get contiguous channel s start status when D I channel in Count mode int W5K_Cnt_GetStartStatuses int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwStatus Visual Basic Declare Function W5K_Cnt_GetStartStatuses Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nStatus As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwStatus A pointer that stores the contiguous count channel s start status each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of represents the second channel s status The values are 0 stop 1 start Return Value MXIO_ OK Refer to Return Codes 6 46 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Cnt_SetStartStatuses Visual Basic Arguments Return Value This function code is used to set contiguous channel s start statu when D I channel in Count mode int W5K_Cnt_SetStartStatuses int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwStatus Declare Function W5K_Cnt_SetStartStatuses Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nStatus As
142. ermoc ple Comma nds ioe ien e aea a E E A r e A 6 239 Click amp Go LOGIC CommandS ssssunnnnnnnnnnrnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnmn 7 1 Active I O Message CommandsS s cccssseetessseeeeeeeseneeeeesseeeeeeeeeeeeeeeeees 8 1 FROLUNN CODCS oisccscessiu5s statics saves ncatia Metsiveatandis cease ccnseiactaedesnendsanecdacetabnadianes 9 1 Product Model and ID Reference Table csssesseesesseesseeeeesseennees 10 1 IOLOSIK 1200 34 ccsiies eiee atea bee aE EEEE anes EEA cous susan tee tenes are se 10 1 POLO BUC ADDO EE E T A EE 10 2 j Lo gik E2000 and R2000 enie ei nesei E E oee e ra E E E eaa 10 3 ioLosik W5000 rsnet a n eia a a EE E E A A S 10 4 1 Overview This reference introduces the MXIO Library for Moxa s ioLogik 4000 E4200 E2000 W5000 R2000 and E1200 series The following topics are covered in this chapter What is the MXIO Library Supported Platforms Supported I O Modules Supported I O Firmware ioLogik MXIO DLL API Reference Overview What is the MXIO Library The MXIO Library is a set of tools for programmers to use with Moxa s ioLogik 4000 E4200 E2000 W5000 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 library is designed for different kind platform such as Windows WinCE and Linux Detail support list can be found in the fol
143. es 6 230 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 int RTD2K_SetMathPar int hConnection BYTE bytChannel WORD wMathPar Arguments 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 For AVG Bit 0 of high byte represents the first channel and Bit 1 of high byte represents the second channel For DEV the High Byte as subtrahend and Low Byte as minuend Exp AVG b 0000 0000 b 0010 0011 ch5 ch1 ch0 Exp DEV b 0000 0100 b 0010 0000 ch2 ch6 Return Value Succeed MXIO_OK Fail Refer to Return Codes RTD2K_GetMathPars This function code is used to get contiguous RTD channel s math parameter int RTD2K_GetMathPars int hConnection BYTE bytStartChannel BYTE bytCount WORD wMathPar Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read wMathPart An array that stores the contiguous RTD channel s math parameter wMathPar 0 represents the value of the starting channel The values are For AVG Bit 0 of high byte represents the first channel and Bit 1 of high byte represents the second channel For DEV High Byte as subtrahend and Low Byte as minuend Exp AVG _b
144. es are Range 0 300 Return Value MXIO OK Refer to Return Codes Digital Input Output Commands for ioLogik E2000 DIO2K_GetIOMode This function code is used to get specific channel s DI DO mode int DIO2K_GetIOMode int hConnection BYTE _ bytChannel BYTE bytMode hConnection The handle for an I O connection Arguments bytChannel The specific channel to be get bytMode A pointer that stores the specific channel s DI DO mode The values are 0 INPUT DI mode 1 OUTPUT DO mode Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 84 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 int DIO2K_SetIOMode int hConnection BYTE _ bytChannel BYTE _ bytMode hConnection The handle for an I O connection Arguments bytChannel The specific channel to be set bytMode A pointer that stores the specific channel s DI DO mode The values are 0 INPUT DI mode 1 OUTPUT DO mode Return Value MXIO_OK Refer to Return Codes DIO2K_GetIOModes This function code is used to get contiguous channel s DI DO mode int DIO2K_GetIOModes int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwMode Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set d
145. esecsaecaaecseeeaeseaeeeeeees 4 2 Ethernet I O Connect Command ou eee eeeeseeceecceeecesecesecaeceaecsaecsaecaeeeaecaaeeaeeeneeaeees 4 4 General Command Sasss a Behe eneuke cs SEES ache ENE EEEE EEEE E Seba ESERE 4 5 Commands for ioLogik E2000 R2000 seesesseesesesrstsirererssssrsrsrerrsresrsesesrerrerssrstsrsreereesese 4 7 Commands for ioLogik NA4000 sssseesessseseseeseeresesrstsrereresssesrsrerrerststsesterersessesrseerees 4 10 Commands for io Logik E4200 riein aa e a a E E 4 13 Commands for ioLogik W5000 0 ce esesecssesecseeeecseeeecaeeeessecseesecneeeecsaeeaesaecaseeeeaesseeseenees 4 19 Modbus Command Sets isisiciicisicscisisssdissesiencssesnsasnsccdsedesnsaiensaraaedesaasnens 5 1 Direct O Command Set c scsssssesstessesescusssossnsessnsesssassassnsnosesoesnsons 6 1 Digital Input Commands sesine iraran eaten a ea rino ee iren eE E EE ena 6 2 Digital Input Commands for ioLogik E4200 s ssessseseeeieeessrsrsrerrersssrsrsrerrsrsrsrerrereeeseseeee 6 3 Commands for ioLogik W5000 esessessesesssesessesrerssrstsrrrreretseststerreretsstsesterstsesrerretserseseeee 6 4 Commands for ioLogik E200 Vrena erenn ar e R 6 10 Digital Input Commands for ioLogik E2000 R2000 ssesesesseeseseeeissesrsrsesreereesrsesrereeress 6 12 Digital Input Commands for ioLogik E4200 eeseseseeeseeeiesesssrsrsreererersrsrsreersesrsreerereesses 6 15 Digital Inputs of ioLogik W5000 0 eee eeeeeeeseeeceseeeeesecseesecneeecsaeeceae
146. etChannelStatus AI2K_GetChannelStatuses AI2K_SetChannelStatuses Analog Input Commands for ioLogik W5000 Function Name W5K_AI_ Reads W5K_AI_ReadRaws W5K_AI_ReadMins W5K_AI ReadMinRaws W5K_AI_ResetMins W5K_AI_ReadMaxs W5K_AI_ReadMaxRaws W5K_AI_ResetMaxs W5K_AI_GetRanges W5K_AI_SetRanges W5K_AI GetChannelStatuses W5K_AIL SetChannelStatuses 3 12 ioLogik MXIO DLL API Reference MXIO API Overview Analog Input Commands for ioLogik E1200 Function Name E1K_ AI Reads E1K_ AI ReadRaws E1K_ AI ReadMins E1K_ AI ReadMinRaws E1K_ AI ResetMins E1K_ AI ReadMaxs E1K_ AI ReadMaxRaws E1K AI ResetMaxs E1K_AI_ GetRanges E1K_AI_GetChannelStatuses E1K_AI_ SetChannelStatuses Analog Output Commands Function Name 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 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
147. etPowerOnValues This function code is used to set the power on value of contiguous D O channels int E42_DO_SetPowerOnValues int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function E42_DO_SetPowerOnValues Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nValue As Long As Long Arguments hConnection The handle for an I O device connection bytSlot Slot number of the I O module from 1 to 16 bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwValue Stores the power on value of contiguous D O channels each bit holds one channel value A bit value of 0 represents the power on status of the start channel A bit value of 1 represents the status of the second digital output channel The values of the unused bits are random Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 112 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_DO Reads This function code is used to read the output statuses of contiguous D O channels int E42_DO_Reads int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function E42_DO_Reads Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue
148. fies the starting channel bytCount The number of channels to be read wValue An array that stores the temperature value to read The wValue 0 represents start channel 0 When the wValue is 0x8000 it means the sensor is not correctly wired When the operating mode is temperature sensor 0 1 C CE When the operating mode of the TC module is 78 0 to 78 0 mV 10uV count When the operating mode of the TC module is 32 7 to 32 7 mV 1uV count When the operating mode of the TC module is 65 5 to 65 5 mV 2uV count Use ioAdmin to check the I O module settings Return Value MXIO_OK Refer to Return Codes 6 243 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_TC_GetEngUnit This function code is used to get the temperature Type for contiguous channels int E42_TC_GetEngUnit int hConnection BYTE bytSlot WORD wEngUnitl Declare Function E42_TC_GetEngUnits Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte iEngUnit As Integer As Long Visual Basic Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 wEngUnit An array that stores the contiguous A O channel s safe action to be retrieved The wEngUnit 0 represents the value of all channels The values are 0 Celsius 1 Fahrenheit MXIO_OK Perui alie Refer to Return Codes
149. get the contiguous pulse channel s start status int W5K_Pulse_GetStartStatuses int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwStatus Visual Basic Declare Function W5K_Pulse_GetStartStatuses Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nStatus As Long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read dwStatus A pointer that stores the contiguous pulse channel s start status each bit holds one channel value A bit value of 0 represents the start status of the start channel A bit value of 1 represents the status of the second pulse channel The values are 0 stop 1 start Return Value MXIO_OK Refer to Return Codes 6 135 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Pulse_SetStartStatuses This function code is used to set the contiguous pulse channel s start status int W5K_Pulse_SetStartStatuses int hConnection BYTE _ bytStartChannel BYTE bytCount DWORD dwsStatus Visual Basic Declare Function W5K_Pulse_SetStartStatuses Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nStatus As Long As Long A hConnection The handle for an I O device connection rguments bytStartChannel Specifies the starting channel bytCount The numb
150. guments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set wSensorType An array that stores the contiguous RTD channel s sensor type wSensorType 0 represents the value of the starting channel The values for normal channel are 0 PT50 1 PT100 2 PT200 3 PT500 4 PT1000 5 JPT100 6 JPT200 7 JPT500 8 JPT 1000 9 NI100 10 NI200 11 NI500 12 NI1000 13 NI120 14 310 Ohm 15 620 Ohm 16 1250 Ohm 17 2500 Ohm Others return Illegal Data Value The values for virtual channels are 20 AVG 21 DIV Others return Illegal Data Value Return Value MXIO_ OK Refer to Return Codes 6 227 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 int RTD2K_GetEngUnit int hConnection bytChannel wEngUnit Arguments Return Value 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 The values for normal channels are 0 Celsius 1 Fahrenheit 2 Ohm Others_ return Illegal Data Value The values for virtual channels are 0 Celsius 1 Fahrenheit Others_ return Illegal Data Value MXIO_OK Refer to Return Codes RTD2K_SetEngUnit This function code is used
151. guous A O channels dValue 0 represents the value of the starting channel The unit is Vdc for the voltage channel and mA for the current channel Return Value MXIO OK Refer to Return Codes AO2K_SetPowerOnValues This function code is used to set the power on values of contiguous A O channels int AO2K_SetPowerOnValues int hConnection BYTE bytStartChannel BYTE bytCount double dValue Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to set dValue An array that stores the power on valuse for the contiguous A O channels dValue 0 represents the value of the starting channel The unit is Vdc for the voltage channel and mA for the current channel Return Value MXIO_OK Refer to Return Codes 6 188 ioLogik MXIO DLL API Reference Direct I O Command Sets AO2K_GetPowerOnValue This function code is used to get the power on value for a specific channel int AO2K_GetPowerOnValue int hConnection BYTE bytChannel double dValue Arguments hConnection The handle for an I O connection bytChannel The desired channel dValue A pointer to the power on value for the desired A O channel The unit is Vdc for the voltage channel and mA for the current channel Return Value MXIO_OK Refer to Return Codes AO2K_SetPowerOnValue This function code is used to set the power on value for a specific channel in
152. hConnection The handle for a connection iStatus A pointer that stores the specific module s Click amp Go Logic start status The values are 0 stop 1 start Return Value MXIO_OK Refer to Return Codes E42_Logic_SetStartStatus This function code is used to set the Click amp Go Logic start status of ioLogik 4200 network adaptors int E42_Logic_SetStartStatus int hConnection WORD wStatus Visual Basic Declare Function E42_Logic_SetStartStatus Lib MXIO dll ByVal hConnection As Long ByVal iStatus As Integer As Long Arguments r hConnection The handle for a connection iStatus A pointer that stores the specific module s Click amp Go Logic start status The values are 0 stop 1 start Return Value MXIO_OK Refer to Return Codes 7 2 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Logic_GetStartStatus This function code is used to get the Click amp Go Logic start status of ioLogik 5000 Ethernet Module int W5K_Logic_GetStartStatus int Visual Basic MXIO dIl ByVal iStatus Arguments hConnection iStatus Return Value hConnection WORD wStatus Declare Function W5K_Logic_GetStartStatus Lib hConnection As Long As Integer As Long The handle for a connection A pointer that stores the specific module s Click amp Go Logic start status The values are 0 stop 1 start MXIO_OK Refer to Return Codes W5K_Logic_SetStartStat
153. hannel BYTE bytCount DWORD dwOutputCounts Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to read dwOutputCounts An array that stores the output count dwOutputCounts 0 represents the pulse output count of the starting channel Return Value MXIO OK Refer to Return Codes 6 123 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 int Pulse2K_SetOutputCounts int hConnection 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 dwOutputCounts An array that stores the output counts of the contiguous pulse output chanels dwOutputCounts 0 represents the pulse output count of the starting channel Return Value MXIO_OK Refer to Return Codes Pulse2K_GetOutputCount This function code is used to get the output count for a specific pulse channel int Pulse2K_GetOutputCount int hConnection BYTE bytChannel DWORD dwOutputCount Arguments hConnection The handle for an I O connection bytChannel The desired channel dwOutputCount A pointer to the output count for the desired channel Return Value Succeed MXIO_OK Fail Refer to
154. hannel The values of the unused bits are random MXIO_OK Refer to Return Codes ioLogik MXIO DLL API Reference Direct I O Command Sets DO2K_SetPowerOnValues This function code is used to set the power on values of contiguous D O channels int DO2K_SetPowerOnValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwvValue Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to set dwValue Stores the power on values of contiguous D O channels each bit holds the value of one channel A bit value of 0 represents the power on status of the start channel A bit value of 1 represents the status of the second digital output channel The values of the unused bits are random MXIO_OK Refer to Return Codes Return Value DO2K_GetPowerOnValue This function code is used to get the power on value for a specific D O channel int DO2K_GetPowerOnValue int hConnection BYTE bytChannel BYTE bytValue 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 Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 82 ioLogik MXIO DLL API Reference Direct I O Command Sets DO2K_SetPowerOnValue This function code is used to set the power on value for a specific D O channel int DO2K_SetPow
155. he starting channel bytCount The number of channels to read wRange An array that stores the ranges of the contiguous A I channels wRange 0 represents the value of the starting channel The values are 00 150mV 01 500mV 02 5V 03 10V 04 0 20mA 05 4 20mA Others return Illegal Data Value MXIO_OK Refer to Return Codes Return Value 6 148 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 int AI2K_SetRanges int hConnection BYTE bytStartChannel BYTE _ bytCount WORD wRange 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 The values are 00 150mV 01 500mV 02 5V 03 10V 04 0 20mA 05 4 20mA Others return Illegal Data Value MXIO_OK Refer to Return Codes Return Value AI2K_GetRange This function code is used to get the range for a specific A I channel int AI2K_GetRange int hConnection BYTE bytChannel WORD wRange Arguments hConnection The handle for an I O connection bytChannel The desired channel wRange A pointer to the range of the desired A I channel The values are 00 150mV 01 500mV 02 5V 03 10V 04 0 20mA 05 4 2
156. ic channel to be set Represents the value of the starting channel 0 disabled 1 enabled MXIO_OK Refer to Return Codes AI2K_GetChannelStatus This function code is used to get the A I channel status for the ioLogik 2000 module int AIZ2K_GetChannelStatus inthConnection BYTE _ bytStartChannel BYTE _ bytCount WORD wvValue The handle for an I O device connection Arguments hConnection bytStartChannel bytCount wValue Return Value 6 151 Specifies the starting channel The number of channels to bet read Represents the value of the starting channel 0 disabled 1 enabled MXIO_OK Refer to Return Codes ioLogik MXIO DLL API Reference Direct I O Command Sets AI2K_SetChannelStatus This function code is used to set the A I channel status for the ioLogik 2000 module int AI2ZK_SetChannelStatus int hConnection BYTE _ bytStartChannel BYTE _ bytCount WORD wvValue Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set wValue Represents the value of the starting channel 0 disabled 1 enabled Return Value MXIO_OK Refer to Return Codes 6 152 ioLogik MXIO DLL API Reference Direct I O Command Sets Analog Input Commands for ioLogik E4200 E42_AI_ Reads This function code is used to read contiguous channel s analog input value int E42_AI_Reads int h
157. ifies the starting channel bytCount The number of channels to read dwValue A pointer to the power on values each bit holds the power on value of one channel A bit value of 0 represents the power on value of the start channel A bit value of represents the second channel s power on value The values are 0 OFF 1 ON MXIO_OK Refer to Return Codes Return Value Cnt2K_SetPowerOnValues This function code is used to set the power on values of contiguous D I channels in Counter mode int Cnt2K_SetPowerOnValues int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwvValue Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to set dwValue Stored the power on values for the contiguous channels each bit holds the power on value of one channel A bit value of 0 represents the power on value of the start channel A bit value of 1 represents the second channel s power on value The values are 0 OFF 1 ON MXIO_OK Refer to Return Codes Return Value 6 34 ioLogik MXIO DLL API Reference Direct I O Command Sets Cnt2K_GetPowerOnValue_ This function code is used to get power on values when specific DA channel in Counter mode int Cnt2K_GetPowerOnValue int hConnection BYTE bytChannel BYTE bytValue Arguments hConnection The handle for an I O connection bytChannel The desired channel bytValu
158. input minimize value to be read The unit is Q for the Ohm C for Celsius and F for Fahrenheit Return Value MXIO_ OK Refer to Return Codes 6 219 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 int RTD2K_ReadMins int hConnection BYTE _ bytStartChannel BYTE _ bytCount double dValue Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read dValue An array that stores the contiguous RTD channel s minimize value dValue 0 represents the value of the starting channel The unit isQ for the Ohm C for Celsius and Return Value F for Fahrenheit MXIO_OK Refer to Return Codes RTD2K_ReadMax This function code is used to read the RTD input maximize value for a specific channel int RTD2K_ReadMax int hConnection BYTE _ bytChannel double dValue Arguments hConnection The handle for an I O device connection bytChannel The specific channel to be read dValue A pointer that stores the specific channel RTD input maximize value to be read The unit is Q for the Ohm C for Celsius and F for Fahrenheit Return Value MXIO_OK Refer to Return Codes 6 220 ioLogik MXIO DLL API Reference Direct I O Command Sets RTD2K_ReadMaxs This function code is used to read contiguous RTD channel s
159. int hConnection BYTE bytStartChannel BYTE bytCount Arguments DWORD dwValue hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel wValue An array that stores the contiguous D O channels relay count wValue 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes RLY2K_ResetCnt This function code is used to reset count value for contiguous D O channel C C int RLY2K_ResetCnt int hConnection BYTE bytChannel Arguments hConnection The handle for an I O device connection bytChannel The specific channel to be reset Return Value Succeed MXIO_OK Fail Refer to Return Codes RLY2K_ResetCnts This function code is used to reset count value for contiguous D O channel int RLY2K_ResetCnts 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 MXIO_OK Fail Refer to Return Codes 6 207 ioLogik MXIO DLL API Reference Direct I O Command Sets Relay Commands for ioLogik W5000 W5K_RLY_GetResetTime This function code is used to get reset time of D O channels int W5K_RLY_GetResetTime int hConnection BYTE bytChannel WORD wvValue Declare Function WSK_RLY_GetResetTime Lib MXIO dll ByVal hConnection As Long ByVal by
160. ioLogik MXIO DLL API Reference Sixth Edition July 2009 www moxa com product MOXA 2009 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 2009 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 Disclaimer Information in this document is subject to change without notice and does not represent a commitment on the part of Moxa Moxa provides this document as is without warranty of any kind either expressed or implied including but not limited to its particular purpose Moxa reserves the right to make improvements and or changes to this manual or to the products and or the programs described in this manual at any time Information provided in this manual is intended to be accurate and reliable However Moxa assumes no responsibility for its use or for any infringements on the rights of third parties that may result from its use This manual might include unintentional technical or typographical errors Changes are made periodically to the information herein to correct such errors and these changes
161. ion The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be cleared Succeed MXIO_OK Fail Refer to Return Codes 6 61 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_Cnt_GetFilters Visual Basic Arguments Return Value This function code is used to get contiguous channel s filter value when D I channel is in Count mode int E1K_Cnt_GetFilters int hConnection BYTE bytStartChannel BYTE bytCount WORD wFilter Declare Function E1K_Cnt_GetFilters Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iFilter As Integer As Long hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels wFilter An array that stores the filter values for contiguous D I channels MXIO_OK Refer to Return Codes 6 62 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_Cnt_SetFilters Visual Basic Arguments Return Value This function code is used to set contiguous channel s filter value when the D I channel is in Count mode int E1K_Cnt_SetFilters int hConnection BYTE bytStartChannel BYTE bytCount WORD wiFilter Declare Function E1K_Cnt_SetFilters Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iFi
162. isul Basic ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel wCount The number of channels to be read dwValue A pointer that stores the contiguous D I channel s values each bit holds one channel value A bit value of 0 represents the digital input status of the start channel A bit value of 1 represents the second digital input channel s status The values of the unused bits are random Return Value MXIO_OK Refer to Return Codes 6 16 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K_DL GetModes This function code is used to read the status of a group of contiguous D I channels int W5K_DI_Reads int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Declare Function W5K_DI_ Reads Lib MXIO dll Visul Basic ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read wMode An array that stores contiguous D I channel s mode wMode 0 represents the value of the starting channel The values are 0 D I Mode 1 Count Mode Return Value MXIO_OK Refer to Return Codes 6 17 ioLogik M
163. k adaptors C C int E42_Message_Stop int iProtocol Visual Basic Declare Function E42_Message_Stop Lib MXIO dll ByVal nProtocol As Long As Long iProtocol Transmission protocol 1 TCP Arguments 2 UDP Return Value MXIO_OK Refer to Return Codes 8 3 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Message_Start This function code is used to start receive active message of ioLogik 5000 Ethernet Module int W5K_Message_Start int iProtocol WORD wPort pfnCALLBACK iProcAddress Callback Function void FunctionName BYTE bytDatal WORD wSize Aipuak Basie Declare Function W5K_Message_Start Lib MXIO dll ByVal nProtocol As Long ByVal iPort as Integer ByVal nProcAddress As Long As Long llback Functi Calbace uacson Public Sub FunctionName bytData As Long ByVal iSize As Integer NOTE Message Command is not recommend to use by VB Please refer the Exmaple file for more detail If you want to use it by VB language please select P Code while compiling to execute file iProtocol Transmission protocol 1 TCP 2 UDP wPort TCP or UDP port number iProcAddress Callback function which is called after receiving an active I O message from an ioLogik 5000 Ethernet module bytData An array that stores the message Arguments wSize Array size Return Value MXIO_OK Refer to Return Codes 8 4 ioLogik MXIO DLL API Reference Direct I O Command Sets
164. lowing section Supported Platforms Windows Platform e Windows XP e Windows 2000 e Windows NT Linux Platform arm elf mxio library x x x x sh for UC 7100 LX line e mxsacleb mxio library x x x x sh for UC 7400 LX line e mxio library x x x x sh for x86 arm linux mxio library x x x x sh for IA 240 LX line Supported I O Modules For a list of I O modules that are supported by this library please refer to Chapter 10 Product Model and ID Reference Table ATTENTION Click amp Go logic and active I O messaging are supported by the ioLogik E2000 line only Supported I O Firmware The latest MXIO library contains functions that support the latest firmware Please refer to the following table to upgrade to the proper version Please also refer to the ioLogik user s manual for the firmware upgrade procedures Ser E2210 E2212 E2214 E2240 E2242 E2260 E2262 R2110 R2140 poet V3 14 V3 14 V3 14 V2 24 V1 3 V1 2 VLON V1 44 V1 24 ioLogik E4200 NA4XXX W5340 E12XX Model Firmware Version VLOT VIO V1 04 V1 04 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
165. lter As Integer As Long hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set wFilter An array that stores the filter values for contiguous D I channels MXIO_OK Refer to Return Codes 6 63 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_Cnt_GetStartStatuses This function code is used to get contiguous channel s filter eae cual cel values when D I channels are in Count mode int E1K_Cnt_GetStartStatuses int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwStatus Visual Basic Declare Function E1K_Cnt_GetStartStatuses Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nStatus As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwStatus A pointer that stores the contiguous count channel s start status each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 stop 1 start Return Value MXIO_OK Refer to Return Codes 6 64 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_Cnt_SetStartStatuses Visual Basic Arguments Return Value This function code is use
166. lues_W Arguments Return Value This function code is used to get output safe values of contiguous D O channels int DO_GetSafeValues_W int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount WORD wValue hConnection The handle for an I O device connection bytSlot Slot number of the I O module Slot numbers range from 1 to 32 But this parameter is inactive in 1oLigik 2000 bytStartChannel Specifies the starting channel bytCount The number of channels to bet read wValue A pointer that stores the safe value of contiguous D O channels each bit holds one channel value A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the status of the second digital output channel The values of the unused bits are random MXIO_OK Refer to Return Codes 6 78 ioLogik MXIO DLL API Reference Direct I O Command Sets DO_SetSafeValues_W This function code is used to set safe values of contiguous D O channels int DO_SetSafeValues_W int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount WORD wValue Arguments hConnection The handle for an I O device connection bytSlot Slot number of the I O module Slot numbers range from 1 to 32 But this parameter is inactive in 1oLigik 2000 bytStartChannel Specifies the starting channel bytCount The number of channels to be set wValue A pointer that stores the safe value of contiguous D
167. m ls TPIT ome ag F ioLogik 4000 remote I O ioLogik E2000 Ethernet I O IP 192 168 8 1 IP 192 168 8 2 Port 502 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 Os MXEIO Connect 1 MXEIO Connect 2 Command Sets Modbus Command Sets MXEIO Disconnect 1 MXEIO Disconnect 2 2 3 ioLogik MXIO DLL API Reference Programming Flow Connecting to a Single Serial I O The ioLogik 4000 and R2000 I O can be used in RS 485 RS 232 control networks For access to T O over RS 485 or RS 232 please pay attention to the following 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 e Make sure that the I O is running under Modbus RTU ee or a seniiti Ex COM1 Tinia lt Ex COM1 9600 N 8 1 ioLogik 2000 I O Module ioLogik 4000 remote I O ioLogik E2000 Ethernet I O ID 10 ID 10 Four steps are required to access remote I O data using the MXIO Linux Library 1 Use MXSIO_OpenCommport to open the COM port and connect to the serial I O 2 Use MXSIO_Connect to connect to the serial I O using the Unit ID e g 10 MXSIO_Connect should return a handle 3 Use the handle to access the desired I O point with Modbus com
168. mand sets or direct I O command sets 4 To finish the operation use MXSIO_Disconnect and MXSIO_CloseCommport to release Windows system resources Program Flow III Connecting Single RS 485 I O MXSIO_OpenCommport MXSIO_Connect Direct I O Command Sets Modbus Command Sets MXSIO_ Disconnect MXSIO_Closecommport 2 4 ioLogik MXIO DLL API Reference Programming Flow Connecting to Multiple RS 485 I O In most real world applications multiple RS 485 I Os are often connected to the same network One RS 485 network can support up to 32 nodes Ca E E ar aa I pete Ex COM1 ef N 8 1 ioLogi ioLogik Soyer ioLogik 2000 I O Modules 1Ex ID 01 2Ex ID 32 ioLogik 4000 remote I O ioLogik E2000 Ethernet I O ID 01 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 wt onenconmoon MXSIO_Connect 1 MXSIO_Connect 2 Vv Caner Sets Modbus Command Sets MXSIO_ Disconnect 1 MXSIO_ Disconnect 2 Vv MXSIO_Closecommport 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 Ethernet Server 2 ioLogik E2000 ioLogik 4000 IP 192 168 8 1 ID 2 Port 502 Server
169. mp Go Logic Commands Click amp Go logic commands are for ioLogik E2000 and E4200 Ethernet I O These commands involve the activation of Click amp Go logic on an ioLogik E2000 and E4200 I O Logic2K_GetStartStatus This function code is used to verify activation of Click amp Go logic on an ioLogik E2000 Ethernet I O C C int Logic2K_GetStartStatus int hConnection WORD wStatus Arguments hConnection The handle for an I O connection wStatus A pointer to the I O Click amp Go Logic activation status The values are 0 Click amp Go logic is not activated 1 Click amp Go logic is activated Return Value MXIO_OK Refer to Return Codes on an ioLogik E2000 Ethernet I O C C int Logic2K_SetStartStatus int hConnection WORD wStatus Arguments hConnection The handle for an I O connection bytChannel The desired channel wStatus Stores the I O Click amp Go logic activation status The values are 0 Click amp Go logic is not activated 1 Click amp Go logic is activated Return Value MXIO_OK Refer to Return Codes ioLogik MXIO DLL API Reference Direct I O Command Sets E42_Logic_GetStartStatus This function code is used to get the Click amp Go Logic start status ofl the ioLogik 4200 network adaptors int E42_Logic_GetStartStatus int hConnection WORD wStatus Visual Basic Declare Function E42_Logic_GetStartStatus Lib MXIO dIl ByVal hConnection As Long iStatus As Integer As Long Arguments
170. n The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwValue A pointer that stores the safe value of contiguous D O channels each WORD holds one channel value A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the status of the second digital output channel Return Value MXIO_OK Refer to Return Codes 6 90 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K_DO_GetModes This function code is used to get the mode of contiguous D O channels int W5K_DO_GetModes int hConnection BYTE bytStartChannel BYTE bytCount WORD wMode Visual Basic Declare Function W5K_DO_GetModes Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iMode As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read wMode An array that stores the mode of contiguous D O channels The values are 0 D O mode 1 Pulse mode Return Value MXIO_OK Refer to Return Codes 6 91 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K_DO SetModes This function code is used to set the mode of contiguous D O channels int W5K_DO_SetModes int hConnection BYTE bytStartChannel BYTE bytCount WORD wMode Visual Basic
171. n Codes 6 186 ioLogik MXIO DLL API Reference Direct I O Command Sets AO2K_GetRange This function code is used to get the range of a specific A O channel int AO2K_GetRange int hConnection BYTE _ bytChannel WORD wRange Arguments hConnection The handle for an I O connection bytChannel The desired channel wRange A pointer to the range of the desired A O channel The values are 0 0 10 VDC 1 4 20 mA Oxff disable Others return Illegal Data Value Return Value MXIO OK Refer to Return Codes AO2K_SetRange This function code is used to set the range for a specific A O channel int AO2K_SetRange int hConnection BYTE _ bytChannel WORD wRange 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 Return Value MXIO_OK Refer to Return Codes 6 187 ioLogik MXIO DLL API Reference Direct I O Command Sets AO2K_GetPowerOnValues This function code is used to get the power on values of contiguous A O channels int AO2K_GetPowerOnValues int hConnection BYTE bytStartChannel BYTE bytCount double dValue Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to read dValue An array that stores the power on values for the conti
172. n Codes ioLogik MXIO DLL API Reference Direct I O Command Sets Cnt2K_GetTriggerTypeWords This function code is used to get trigger types for contiguous channels when the D I channel is in Count mode int Cnt2K_GetTriggerTypeWords int hConnection BYTE bytStartChannel BYTE bytCount WORD wTput A hConnection The handle for an I O connection rguments bytStartChannel Specifies the starting channel bytCount The number of channels to get wType A pointer that stores the trigger types for contiguous channels each bit holds one channel trigger type A bit value of 0 represents the trigger type of the start channel A bit value of 1 represents the second channel s trigger type The values are 0 LoToHi 1 HiToLo 2 Both Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 38 ioLogik MXIO DLL API Reference Direct I O Command Sets Cnt2K_SetTriggerTypeWords This function code is used to get trigger types for contiguous channels when the D I channel is in Count mode int Cnt2K_SetTriggerTypeWords int hConnection BYTE bytStartChannel BYTE bytCount WORD wTput A hConnection The handle for an I O connection rguments bytStartChannel Specifies the starting channel bytCount The number of channels to set wType A pointer that stores the trigger types for contiguous channels each bit holds one channel trigger type A bit value of 0 represents the trigger type of the start chann
173. ndle for an I O device connection bytStartChannel Specifies the starting channel The number of channels to be read A pointer that stores contiguous D O channels status each bit holds one channel value A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the status of the second digital output channel The values of the unused bits are random Return Value MXIO_OK Refer to Return Codes 6 95 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K DO Writes This function code is used to write the output statuses of contiguous D O channels int E1K_DO_Writes int hConnection BYTE _ bytStartChannel BYTE _ bytCount DWORD dwValue Visual Basic Declare Function E1K_ DO_Writes Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nValue As Long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel The number of channels to be written Stores the channel statuses of contiguous D O channels each bit holds one channel status A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the second digital output channel s status The values of the unused bits are random Return Value MXIO_OK Refer to Return Codes 6 96 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_DO_Ge
174. ne channel value A bit value of 0 represents the digital input status of the start channel A bit value of 1 represents the second digital input channel s status The values of the unused bits are random 0 Fault Value 1 Hold last value Return Value MXIO_OK Refer to Return Codes 6 110 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_DO_GetPowerOnValues This function code is used to get the power on value of contiguous D O channels int E42_DO_GetPowerOnValues int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function E42_DO_GetPowerOnValues Lib M XTO dIl ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device connection bytSlot Slot number of the I O module from 1 to 16 bytStartChannel Specifies the starting channel bytCount The number of channels to be retrieved dwValue A pointer that stores the power on value of contiguous D O channels each bit holds one channel value A bit value of 0 represents the power on status of the start channel A bit value of 1 represents the status of the second digital output channel The values of the unused bits are random Return Value MXIO_OK Refer to Return Codes 6 111 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_DO_S
175. ng ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartChannel Specifies the strating channel bytCount The number of channels to be set wValue An array that stores the contiguous A O channel s power on raw data to be set The wValue 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes 6 198 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_AO_Reads This function code is used to read the output value of contiguous analog output channels int E42_AO Reads int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount double dValue Visual Basic Declare Function E42_AO_Reads Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte dValue As Double As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartChannel Specifies the strating channel bytCount The number of channels to be read dValue An array that stores the contiguous channel output value to be read The dVal
176. nnection BYTE bytChannel DWORD dwHiWidth DWORD dwLoWidth Declare Function Pulse2K_GetSignalWidth32 Lib MXIO dIl ByVal hConnection As Long ByVal bytChannel As Byte iHiWidth As Long iLoWidth As Long As Long hConnection The handle for an I O connection bytChannel The specific channel to get dwHiWidth A pointer that stores the specific pulse channel s Hi signal width dwLo Width A pointer that stores the specific pulse channel s Lo signal width Succeed MXIO_OK Fail Refer to Return Codes 6 122 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_SetSignal Width32 int hConnection BYTE bytChannel DWORD dwHiWidth DWORD dwLoWidth Declare Function Pulse2K_SetSignalWidth32 Lib MXIO dll ByVal hConnection As Long ByVal bytChannel As Byte iHiWidth As Long iLoWidth As Long As Long Arguments hConnection The handle for an I O connection bytChannel The specific channel to get dwHiWidth Store the specific pulse channel s Hi signal width dwLoWidth Store the specific pulse channel s Lo signal width MXIO_OK Refer to Return Codes Pulse2K_GetOutputCounts This function code is used to get the output count int Pulse2K_GetOutputCounts int hConnection BYTE _ bytStartC
177. nnection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read wValue Represents the value of the starting channel 0 disabled 1 enabled Return Value MXIO_OK Refer to Return Codes 6 176 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_AI_ SetChannelStatus This function code is used to set the AI channel statuss of ioLogik es 1200 Module int E1K_AI_SetChannelStatuses int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Visual Basic Declare Function E1K_AI SetChannelStatuses Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments i hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set wValue Represents the value of the starting channel 0 disabled 1 enabled Return Value MXIO_OK Refer to Return Codes 6 177 ioLogik MXIO DLL API Reference Direct I O Command Sets Analog Output Commands AO_Reads This function code is used to read the values of contiguous analog output channels int AO_Reads int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount double dValue 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 an
178. nnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwValue A pointer that stores the contiguous channel s DI DO mode each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 INPUT DI mode 1 OUTPUT DO mode Return Value MXIO_OK Refer to Return Codes 6 105 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_DIO_SetIOModes This function code is used to set contiguous channel s DI DO mode This function will take effect after restart the device int W5K_DIO_SetIOModes int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwMode Visual Basic Declare Function W5K_DIO_SetIOModes Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nMode As Long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwMode A pointer that stores the contiguous channel s DI DO mode each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 INPUT DI mode 1 OUTPUT DO mode Return Value MXIO_OK Refer to Return Codes Digital Outp
179. nnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte dValue As Double As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartchannel Specifies the starting channel bytCount The number of channels to be read dValue An array that stores the temperature value to read The dValue 0 represents start channel 0 When the dValue is 0x8000 it means the sensor is not correctly wired When the operating mode of the TC module is voltage input the unit is uv Use ioAdmin to check the T O module settings Return Value MXIO_OK Refer to Return Codes 6 242 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_TC_ReadRaws This function code is used to read the temperature raw data of contiguous channels int E42_TC_ReadRaws int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD wvValue Visual Basic Declare Function E42_TC_ReadRaws Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartchannel Speci
180. nnel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel The number of channels to be read A pointer that stores the contiguous D O channel s status each bit holds one channel value A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the status of the second digital output channel The values of the unused bits are random Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 87 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_DO_ Writes This function code is used to write the output statuses of contiguous D O channels int W5K_DO_Writes int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function W5K_DO_Writes Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nValue As Long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel The number of channels to be written Stores the channel statuses of contiguous D O channels each bit holds one channel status A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the second digital output channel s status The values of the unused bits are random Return Value MXIO_O
181. nnel As Byte ByVal bytCount As Byte nOutputCounts As Long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read dwOutputCounts An array that stores the contiguous pulse channel s output count dwOutputCounts 0 represents the pulse output count of the starting channel Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 133 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Pulse_SetOutputCount This function code is used to set the contiguous pulse channel s output s count int W5K_Pulse_SetOutputCounts int hConnection BYTE _ bytStartChannel BYTE bytCount DWORD dwOutputCounts Visual Basic Declare Function W5K_Pulse_SetOutputCounts Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nOutputCounts As Long As Long A t Teen hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwOutputCounts An array that stores the contiguous pulse channel s output count dwOutputCounts 0 represents the pulse output count of the starting channel Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 134 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Pulse_GetStartStatuseg This function code is used to
182. nnels The values for all channels are 0 TYPE K 1 TYPE J 2 TYPE T 3 TYPE B 4 TYPER 5 TYPE S 6 TYPEE 7 TYPE N 8 TYPE L 9 TYPE U 10 TYPE C 11 TYPE D 128 10uV Input 78mV 78mV 10uV count 129 1uV Input 32 7mV 32 7mV 1uV count 130 2uV Input 65 5mV 65 5mV 2uV count Others return Illegal Data Value Return Value MXIO_OK Refer to Return Codes 6 246 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_TC_SetSensorType This function code is used to get the Sensor Type for contiguous channels int E42_TC_SetSensorType int hConnection BYTE bytSlot WORD _ wSensorType Visual Basic Declare Function E42_TC_SetSensorType Lib MXIO dIl ByVal hConnection As Long ByVal bytSlot As Byte ByVal iSensorType As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 wSensorType An array that stores the contiguous TC channel s sensor type wSensorType 0 represents the value of all the channels The values for all channels are 0 TYPE K 1 TYPE J 2 TYPE T 3 TYPE B 4 TYPER 5 TYPE S 6 TYPEE 7 TYPE N 8 TYPE L 9 TYPE U 10 TYPE C 11 TYPE D 128 10uV Input 78mV 78mV 10uV count 129 1uV Input 32 7mV 32 7mV 1uV count 130 2uV Input 65 5mV 65 5mV 2uV count Others return Illegal Data Value Return Value MXIO_OK Refer to Return Codes 6 247 7 Click a
183. none 0x08 odd 0x18 even 0x28 mark 0x38 space dwTimeout Timeout in milliseconds for serial adapter communication hCommport Handle of the opened COM port Return Value Succeed MXIO_OK Fail Refer to Return Codes MXSIO_CloseCommport This closes the COM port the COM port handle will be invalid C C int MXSIO_CloseCommport int hCommport Arguments hCommport Handle of the opened COM port Return Value Succeed MXIO_OK Fail Refer to Return Codes 4 2 ioLogik MXIO DLL API Reference System Commands Sets Based on the COM port handle or ioLogik E2000 handle users MXSIO C must use this function to establish an I O device handle for each See 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 Arguments hCommport I O over serial interface will get a serial handle I O server over Ethernet interface will get an Ethernet handle For more details please see the Program Flow IV and Program Flow V in Chapter 2 bytUnitID Modbus unit ID of the I O from 01 to 99 bytTransmissionMod Modbus transmission format ex 0 RTU mode 1 ASCII mode Note that the protocol settings must agree with the hardware settings on the ioLogik 4000 I O and the ioLogik R2000 only supports RTU hConnection Handle of the I O device connection Return Value Succeed MXIO_OK Fail Ref
184. ntiguous channel s power on sequence delay time Second The values are Range 0 300 Return Value MXIO_OK Refer to Return Codes 6 103 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_DO_SetPowerOnSeqDela This function code is used to set contiguous channel s DI DO times mode power off storage enable mode int E1K_DO_SetPowerOnSeqDelaytimes int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Visual Basic Declare Function E1K_DO_SetPowerOnSeqDelaytimes Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel The number of channels to be set A pointer that stores the contiguous channel s power on sequence delay time Second The values are Range 0 300 Return Value MXIO_OK Refer to Return Codes Digital Input Output Commands for ioLogik W5000 6 104 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_DIO GetIOModes _ This function code is used to get contiguous channel s DI DO mode int W5K_DIO_GetIOModes int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwMode Visual Basic Declare Function W5K_DIO_GetIOModes Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nMode As Long As Long Arguments hCo
185. oLogik 5000 module int W5K_GetSafeStatus int hConnection WORD _ wStatus Visual Basic Declare Function W5K_GetSafeStatus Lib MXIO dII ByVal hConnection As Long iStatus As Integer As Long Arguments hConnection The handle for a connection wStatus A pointer that stores the specific module s safe status The values are 0 Normal 1 Safe mode Return Value MXIO_OK Refer to Return Codes WS5K_ClearSafeStatus This function code is used to clear the safe status of the ioLogik 5000 module C C int W5K_ClearSafeStatus int hConnection Visual Basic Declare Function W5K_ClearSafeStatus Lib MXIO dIl ByVal hConnection As Long As Long Arguments hConnection The handle for a connection Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 9 ioLogik MXIO DLL API Reference Direct I O Command Sets Commands for ioLogik E1200 E1K_GetSafeStatus This function code is used to get the safe status of the ioLogik 1200 Module int E1K_GetSafeStatus int hConnection WORD wStatus Visual Basic Declare Function E1K_GetSafeStatus Lib MXIO dII ByVal hConnection As Long iStatus As Integer As Long Arguments hConnection The handle for a connection wStatus A pointer that stores the specific module s safe status The values are 0 Normal 1 Safe mode Return Value MXIO_OK Refer to Return Codes E1K_ClearSafeStatus This function code is used to clear the safe stat
186. oLogik MXIO DLL API Reference Direct I O Command Sets W5K_Pulse_SetSignalWidths This function code is used to set the contiguous pulse channel s Hi Lo 32 signal width 32 bits int W5K_Pulse_SetSignal Widths32 int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwHiWidth DWORD dwLoWidth Visual Basic Declare Function W5K_Pulse_SetSignalWidths32 Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iHiWidth As Long iLoWidth As Long As Long hConnection The handle for an I O device connection Arguments bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwHiWidth An array that stores the contiguous pulse channel s Hi signal width dwHiWidth 0 represents the Hi signal width of the starting channel dwLoWidth An array that stores the contiguous pulse channel s Lo signal width dwLoWidth 0 represents the Lo signal width of the starting channel Return Value MXIO_OK Refer to Return Codes 6 132 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Pulse_GetOutputCoun This function code is used to get the contiguous pulse channel s output ts count int W5K_Pulse_GetOutputCounts int hConnection BYTE bytStartChannel BYTE bytCount DWORD dw0OutputCounts Visual Basic Declare Function W5K_Pulse_GetOutputCounts Lib MXIO dll ByVal hConnection As Long ByVal bytStartCha
187. of contiguous D O channels There may not be contiguous channels if you use ioLogik E2212 DIO channels Please make sure they are contiguous channels or ILLEGAL_DATA_VALUE will be returned int DO_Writes int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount DWORD dwvValue 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 be written dwValue Stores the channel statuses of the contiguous D O channels each bit holds the status of one channel A bit value of 0 represents the digital output status of the start channel A bit value of 1 represents the second digital output channel s status The values of the unused bits are random MXIO_OK Refer to Return Codes DO_Write This function code is used to write the output status for a specific D O channel Arguments Return Value int DO_Write int hConnection BYTE bytSlot BYTE bytChannel BYTE bytValue 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 output status of the desired channel 1 represents ON 0 represents OFF Succeed MXIO_OK Fail Refer to Return Codes 6 75 ioLogik
188. on 3 build D format is A B C D Return Value MXIO_OK Refer to Return Codes E42_ReadFirmwareDate This function reports firmware release date for the ioLogik E4200 Network Adapter C C int E42_ReadFirmwareDate int hConnection WORD wDate Visual Basic Declare Function E42_GetModuleType Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte iDate As Integer As Long Arguments hConnection I O device handle for a connection wDate Firmware release date Ex If Word 0 0x0705 Word 1 0x2005 then firmware release date is July 5 2005 Return Value MXIO_OK Refer to Return Codes 4 13 ioLogik MXIO DLL API Reference System Commands Sets E42_ReadSlotAmount This function code is used to read the number of expansion slots C C int E42_ReadSlotAmount int hConnection WORD wAmount Visual Basic Declare Function E42_ReadSlotAmount Lib MXIO dll ByVal hConnection As Long iAmount As Integer As Long Arguments hConnection The handle for a connection WAmount A pointer that stores the number of expansion slots Return Value MXIO_OK Refer to Return Codes E42_ReadStatus This function code is used to read the status of the ioLogik E4200 network adapter int E42_ReadStatus int hConnection WORD wState WORD wLastErrorCode Visual Basic Declare Function E42_ReadStatus Lib MXIO dll ByVal hConnection As Long wState As Integer wLastErrorCode As Integer As L
189. ong Arguments hConnection The handle for an I O device connection WAmount Stores the Bus status in numerical format The values are O Initial now 1 IO ready 2 Initial fault 3 IO failed wLastErrorCode Stores the Field Power status in numerical format The values are 0 No error 3 No module attached retry 4 Set module parameter need reboot 5 module worm up error need reboot 30 module configuration error need reboot Return Value MXIO_OK Refer to Return Codes 4 14 ioLogik MXIO DLL API Reference System Commands Sets E42_ClearStatus This function code is used to clear the status of the ioLogik E4200 Active Ethernet network adaptors When changing or removing slots from the E4200 you need to reboot the E4200 after clearing the status C C int E42_ClearStatus int hConnection Visual Basic Declare Function E42_ClearStatus Lib MXIO dIl ByVal hConnection As Long As Long Arguments hConnection The handle for an I O device connection Return Value Succeed MXIO_OK Fail Refer to Return Codes E42_GetInternalRegs This function code is used to get the internal registers of ioLogik E4200 Active Ethernet network adaptors int E42_GetInternalRegs int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Visual Basic Declare Function E42_GetInternalRegs Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Int
190. ong iValue As Integer As Long Arguments hConnection The handle for a connection wValue Stores the specific module s IO image map status The values are 0 fix mode 1 dynamic mode Return Value MXIO_OK Refer to Return Codes 4 17 ioLogik MXIO DLL API Reference System Commands Sets E42_Setl1OMapMode This function code is used to set the IO image map mode of the ioLogik E4200 Active Ethernet network adaptors int E42_SetIOMapMode int hConnection WORD wValue Visual Basic Declare Function E42_SetlOMapMode Lib MXIO dll ByVal hConnection As Long ByVal iValue As Integer As Long Arguments hConnection The handle for a connection wValue Stores the specific module s IO image map status The values are 0 fix mode 1 dynamic mode Return Value MXIO_OK Refer to Return Codes E42_Modbus_List This function code is used to set the IO image map mode of the ioLogik E4200 Active Ethernet network adaptors int E42_Modbus_List int hConnection char FilePath Visual Basic Declare Function E42_Modbus_List Lib MXIO dIl ByVal hConnection As Long ByVal FilePath As String As Long Arguments hConnection The handle for a connection FilePath Specific log file path and file name to save module s IO image map list file Ex char FilePath c modbus txt Return Value MXIO_OK Refer to Return Codes 4 18 ioLogik MXIO DLL API Reference System Commands Sets E42_
191. ount value when D I channels in Count mode int W5K_Cnt_Reads int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function W5K_Cnt_Reads Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read dwValue An array that stores the contiguous channel s count value dwValue 0 represents the value of the starting channel Succeed MXIO_OK Fail Refer to Return Codes WS5K_Cnt_Clears This function code is used to clear contiguous channel s count value when D I channel in Count mode int W5K_Cnt_Clears int hConnection BYTE bytStartChannel BYTE bytCount Visual Basic Declare Function W5K_Cnt_Clears Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be clear Ret Val i A Succeed MXIO_OK Fail Refer to Return Codes 6 42 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Cnt_GetOverflows This function code is used to get contiguous channel s overflow status when D I channel in Count mode int W5K_Cnt_GetOverflows in
192. owerOn Values Digital Output Commands for ioLogik E1200 Function Name E1K_DO_Reads E1K_DO_Writes E1K_DO_GetSafeValues_W E1K_DO_SetSafeValues_W E1K_DO_GetModes E1K_DO_SetModes E1K_DO_GetPowerOnValues E1K_DO_SetPowerOnValues E1K_DO_GetPowerOnSeqDelayTimes E1K_DO_SetPowerOnSeqDelayTimes ioLogik MXIO DLL API Reference MXIO API Overview Pulse Output Commands for ioLogik E2000 R2000 Function Name Pulse2K_GetSignalWidths Pulse2K_SetSignalWidths Pulse2K_GetSignalWidth Pulse2K_SetSignalWidth Pulse2K_GetSignalWidths32 Only for ioLogik E2260 Pulse2K_SetSignalWidths32 Only for ioLogik E2260 Pulse2K_GetSignalWidth32 Only for ioLogik E2260 Pulse2K_SetSignalWidth32 Only for ioLogik E2260 Pulse2K_GetOutputCounts Pulse2K_SetOutputCounts Pulse2K_GetOutputCount Pulse2K_SetOutputCount Pulse2K_GetStartStatuses Pulse2K_SetStartStatuses Pulse2K_GetStartStatus Pulse2K_SetStartStatus Pulse2K_GetPowerOn Values Pulse2K_SetPowerOnValues Pulse2K_GetPowerOnValue Pulse2K_SetPowerOnValue Pulse2K_GetSafe Values Pulse2K_SetSafe Values Pulse2K_GetSafe Value Pulse2K_SetSafe Value Pulse Output Commands for ioLogik W5000 Function Name W5K_Pulse_GetSignal Widths32 W5K_Pulse_SetSignalWidths32 W5K_Pulse_GetOutputCounts W5
193. pcHostName __ This function gets the A OPC server alias name of the specific ip address device running A OPC server int W5K_GetOpcHostName char szIP DWORD dwTimeOut char szAliasName Declare Function W5K_GetOpcHostName Lib MXIO dll ByVal szIP As String ByVal nTimeOut As Long ByVal szAliasName As String As Long Visual Basic Arguments szIP IP address of the A OPC Server to be connected dwTimeOut Timeout value for establishing a network connection with the ioLogik Ethernet Adapter The unit is in milliseconds szAliasName A OPC Server alias name MAX 32 Bytes Return Value Succeed MXIO_OK Fail Refer to Return Codes WS5K_ListOpcDevices This function gets the number of ioLogik W5000 units that link to the A OPC server int W5K_ListOpcDevices char sZIP DWORD dwTimeOut WORD wDeviceCount Declare Function W5K_GetOpcHostName Lib MXIO dll ByVal szIP As String ByVal nTimeOut As Long wDeviceCount As Integer As Long Visual Basic Arguments szIP IP address of the A OPC Server to be connected dwTimeOut Timeout value for establishing a network connection with the ioLogik Ethernet Adapter The unit is in milliseconds wDeviceConut Total number of I O devices connected to the A OPC Server Return Value MXIO_OK Refer to Return Codes 6 8 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_GetSafeStatus This function code is used to get the safe status of the i
194. pecifies the starting channel bytCount The number of channels to read wValue An array that stores the temperature values of the contiguous channels in raw data format wValue 0 represents the start channel When wvValue is 0x8000 it means the sensor is not wired correctly or the measured value is out of range When using the RTD module for Resistance Input 1 2000Q 100 mQ 1 count When using the RTD module for Resistance Input 1 327Q 10 mQ 1count When using the RTD module for Resistance Input 1 620Q 20 mQ 1count When the operating mode is temperature sensor 0 1 C F 1count depending on the setting Use the ioAdmin utility to check the current settings for the desired channels MXIO_OK Refer to Return Codes Return Value 6 215 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 int RTD_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 wValue A pointer to the temperature value of the desired channel When wValue is 0x8000 it means the sensor is not wired correctly or the measured value is out of range When using the RTD module for Resistance Input 1 2000Q 10
195. r ioLogik E4200 E42_AO_GetSafeActions This function code is used to get the safe action of contiguous A O channels int E42_AO_GetSafeActions int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount WORD wAction Visual Basic Declare Function E42_AO_GetSafeActions Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte iAction As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 bytStartChannel Specifies the strating channel bytCount The number of channels to bet read wAction An array that stores the contiguous A O channel s safe action to be get The wAction 0 represents the value of the starting channel The values are 0 Safe value 1 Hold last state 2 Low Limit 3 High Limit Return Value MXIO_OK Refer to Return Codes 6 194 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_AO_SetSafeActions This function code is used to set the safe action of contiguous A O channels int E42_AO_SetSafeActions int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount WORD _ wdAction Visual Basic Declare Function E42_AO_SetSafeActions Lib MXIO dIl ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte iAction As Integer As Long A
196. rence Direct I O Command Sets E1K_Cnt_GetOverflows This function code is used to get contiguous channel s overflow status when the D I channel in is Count mode Visual Basic Arguments Return Value int E1K_Cnt_GetOverflows int hConnection BYTE _ bytStartChannel BYTE _ bytCount DWORD dwStatus Declare Function E1K_Cnt_GetOverflows Lib MxXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nStatus As Long As Long hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels dwStatus A pointer that stores the contiguous channel s overflow status each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 Normal 1 Overflow MXIO_OK Refer to Return Codes 6 60 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_Cnt_ClearOverflows Visual Basic Arguments Return Value This function code is used to clear contiguous channel s overflow status when the D I channel is in Count mode int E1K_Cnt_ClearOverflows int hConnection BYTE bytStartChannel BYTE bytCount Declare Function E1K_Cnt_ClearOverflows Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte As Long hConnect
197. rence MXIO API Overview Function Name Cnt2K_SetTriggerType Cnt2K_GetPowerOnValues Cnt2K_SetPowerOnValues Cnt2K_GetPowerOnValue Cnt2K_SetPowerOn Value Cnt2K_GetSafe Values Cnt2K_SetSafe Values Cnt2K_GetSafe Value Cnt2K_SetSafe Value Cnt2K_GetTriggerTypeWords Cnt2K_SetTriggerTypeWords Cnt2K_GetTriggerT ype Word Cnt2K_SetTriggerTypeWord Cnt2K_GetSaveStatusesOnPowerFail Cnt2K_SetSaveStatusesOnPowerFail Counter Commands for ioLogik W5000 Function Name W5K_Cnt_Reads W5K_Cnt_Clears W5K_Cnt_GetOverflows W5K_Cnt_ClearOverflows W5K_Cnt_GetFilters W5K_Cnt_SetFilters W5K_Cnt_GetStartStatuses W5K_Cnt_SetStartStatuses W5K_Cnt_GetTriggerTypes W5K_Cnt_SetTriggerTypes W5K_Cnt_GetPowerOn Values W5K_Cnt_SetPowerOn Values W5K_Cnt_GetSafe Values W5K_Cnt_SetSafe Values W5K_Cnt_GetTriggerTypeWords W5K_Cnt_SetTriggerTypeWords W5K_Cnt_GetSaveStatusesOnPowerFail W5K_Cnt_SetSaveStatusesOnPowerFail ioLogik MXIO DLL API Reference MXIO API Overview Counter Commands for ioLogik E1200 Function Name E1K_Cnt_Reads E1K_Cnt_Clears E1K_Cnt_GetOverflows E1K_Cnt_ClearOverflows E1K_Cnt_GetFilters E1K_Cnt_SetFilters E1K_Cnt_GetStartStatuses E1K_Cnt_SetStartStatuses E1K_Cnt_GetPowerOnValues E1K_Cnt_SetPowerOnValues E1K_Cnt_GetSafe Values E1K_Cnt_SetSafeValues
198. rguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from to 16 bytStartChannel Specifies the strating channel bytCount The number of channels to be set wAction An array that stores the contiguous A O channel s safe action to be set The wAction 0 represents the value of the starting channel The values are 0 Safe value 1 Hold last state 2 Low limit 3 High limit MXIO_OK Refer to Return Codes Return Value 6 195 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_AO_GetPowerOnValues This function code is used to get the power on raw data of contiguous A O channels int E42_AO_GetPowerOnValues int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount WORD wvValue Visual Basic Declare Function E42_AO_GetPowerOnValues Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartChannel Specifies the strating channel bytCount The number of channels to be read wValue An array that stores the contiguous A O channel s power on raw data to be get The wValue 0 represents the value of the starting ch
199. rnal register of the Module2K_SetInternalReg ioLogik 2000 Module int Module2K_SetInternalReg int hConnection BYTE bytChannel WORD wValue Arguments hConnection The handle for a connection bytChannel The specific channel to be read wValue represents the value of the starting channel The values are 0 255 Return Value Succeed MXIO_OK Fail Refer to Return Codes 4 8 ioLogik MXIO DLL API Reference System Commands Sets This function code is used to get the internal register of the Module2K_GetInternalRegs ioLogik 2000 Module int Module2K_GetInternalRegs int hConnection BYTE bytStartChannel BYTE bytCount Arguments WORD wValue hConnection The handle for a connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read Up to 24 wValue represents the value of the starting channel The values are 0 255 Succeed MXIO_OK Fail Refer to Return Codes Return Value This function code is used to get the internal register of the Module2K_GetInternalRegs ioLogik 2000 Module int Module2K_GetInternalRegs int hConnection BYTE bytChannel BYTE bytCount Arguments WORD wValue hConnection The handle for a connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read Up to 24 Return Value wValue represents the value of the starting channel The values are 0 255 Succeed MXIO_OK Fail Refer to Return Codes
200. rtChannel BYTE bytCount WORD wValuef J Visual Basic Declare Function E42_AO_ReadRaws Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartChannel Specifies the starting channel bytCount The number of channels to be read wValue An array that stores the contiguous channel output raw data to be read The wValue 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes 6 201 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_AO_WriteRaws This function code is used to write the output raw data for contiguous channels int E42_AO_WriteRaws int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount WORD _ wvValue Visual Basic Declare Function E42_AO_WriteRaws Lib MXIO dIl ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartChannel Specifies the starting channel b
201. s for ioLogik E2000 Function Name Message2K_Start Message2K_Stop Command for ioLogik E4200 Function Name E42_Message_Start E42_Message_Stop Commands for ioLogik W5000 Function Name W5K_Message_Start W5K_Message_Stop 4 System Command Sets System commands include functions that initialize the connection between a host computer and the T O In addition system commands include functions for obtaining hardware and status information for the I O itself The following topics are covered RS 232 RS 485 I O Connect Commands Ethernet I O Connect Commands General Commands Commands for ioLogik E2000 R2000 Commands for ioLogik NA4000 Commands for ioLogik E4200 Commands for ioLogik W5000 OOOocUOD 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 int MXSIO_OpenCommport char szCommport DWORD dwBaudrate BYTE bytDataFormat DWORD dwTimeout int hCommport 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 bit_cnt bit 0 1 0x00 bit_5 0x01 bit_6 0x02 bit_7 0x03 bit_8 stop_cnt bit 2 0x00 stop_1 0x04 stop_2 parity bit 3 4 5 0x00
202. sents the value of the starting channel Return Value MXIO_OK Refer to Return Codes 6 19 ioLogik MXIO DLL API Reference Direct I O Command Sets WSK_DI SetFilters This function code is used to set the filter of contiguous D I channels int W5K_DI_SetFilters int hConnection BYTE bytStartChannel BYTE bytCount WORD wkKilter Visul Basic Declare Function W5K_DI_SetFilters Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iFilter As Integer As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be sets wFilter An array that stores contiguous D I channel s filter value wFilter 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes 6 20 ioLogik MXIO DLL API Reference Direct I O Command Sets Digital Input Commands for the ioLogik E1200 This functi i h f f E1K_DI Reads is unction code is used to read the status of a group o contiguous D I channels int E1K_DI_Reads int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visul Basic Declare Function E1K_DI_Reads Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChann
203. t AO2K_SetPowerOnValue int hConnection BYTE bytChannel double dValue Arguments hConnection The handle for an I O server connection bytChannel The desired channel dValue Stores the power on value for the desired A O channel The unit is Vdc for the voltage channel and mA for the current channel Return Value MXIO_OK Refer to Return Codes AO2K_GetPowerOnRaws This function code is used to get the power on values of contiguous A O channels in raw data format int AO2K_GetPowerOnRaws int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to read wValue An array that stores the power on values of the contiguous A O channels in raw data format wValue 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes 6 189 ioLogik MXIO DLL API Reference Direct I O Command Sets AO2K_SetPowerOnRaws _ This function code is used to set the power on values of contiguous A O channels in raw data format int AO2K_SetPowerOnRavws int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to set wValue An array that stores the power on values of contiguous A O channels in r
204. t hConnection BYTE bytStartChannel BYTE bytCount DWORD dwStatus Visual Basic Declare Function W5K_Cnt_GetOverflows Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nStatus As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be get dwValue A pointer that stores the contiguous channel s overflow status each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 Normal 1 Overflow Return Value MXIO_OK Refer to Return Codes 6 43 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Cnt_ClearOverflows This function code is used to clear contiguous channel s overflow status when D I channel in Count mode int W5K_Cnt_ClearOverflows int hConnection BYTE bytStartChannel BYTE bytCount Visual Basic Declare Function W5K_Cnt_ClearOverflows Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be clear Return Value Succeed MXIO_OK Fail Refer to Return Codes WS5K_Cnt_GetFilters This function code is used
205. t is Vdc for the voltage module and mA for the current module Return Value MXIO_OK Refer to Return Codes 6 172 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_AI ReadMaxRaws This function code is used to read contiguous A I channel s maximize raw data int E1K_AI_ReadMaxRaws int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Visual Basic Declare Function El1K_AI_ReadMaxRaws Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read wValue An array that stores the contiguous A T channel s maximize raw data wValue 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes 6 173 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_AI_ ResetMaxs This function code is used to reset contiguous A I channel s maximize value int E1K_AI_ResetMaxs int hConnection BYTE bytStartChannel BYTE bytCount Declare Function E1K_AI_ResetMaxs Lib MXIO dlI ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte As Long Visual Basic Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The num
206. tChannel As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytChannel The specific channel to be get wValue An array that stores the contiguous D O channels relay reset time wValue 0 wValue 5 gt sec min hour day month year represents the value of the specific channel Return Value MXIO_OK Refer to Return Codes 6 208 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_RLY_TotalCntReads __ This function code is used to get count value of contiguous D O channels int W5K_RLY_TotalCntReads int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Declare Function W5K_RLY_TotalCntReads Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specificies the starting channel bytCount The number of channels to be set wValue An array that stores the contiguous D O channels relay count wValue 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes 6 209 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_RLY_CurrentCntReads This function code is used to get count value of contiguous D O channels int W5K_RLY_CurrentCntReads int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Declare F
207. tCount The number of channels to read dValue An array that stores the maximize values for contiguous A I channels dValue 0 represents the value of the starting channel The unit is VDC for the voltage module and mA for the current module Return Value MXIO OK Refer to Return Codes 6 145 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 int AIZ2K_ReadMaxRaws int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to read wValue An array that stores the maximize raw data values for the contiguous A I channels wValue 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes AI2K_ResetMaxs This function code is used to reset the maximize values of contiguous A I channels int AI2K_ResetMaxs int hConnection BYTE _ bytStartChannel BYTE _ bytCount Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to be reset Return Value Succeed MXIO_OK Fail Refer to Return Codes AI2K_ReadMax This function code is used to read the maximize value for a specific A I channel int AIZK_ReadMax int hConnection BYTE byt
208. tInternalRegs Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for a connection bytStartchannel Specifies the starting channel bytCount The number of channels up to 24 wValue Represents the value of the starting channel The values are 0 255 MXIO_OK Refer to Return Codes Return Value 6 4 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_SetInternalRegs This function code is used to set the internal registers of ioLogik 5000 Module int W5K_SetInternalRegs int hConnection BYTE bytStartChannel BYTE bytCount WORD _ wvValue Visual Basic Declare Function W5K_SetInternalReg Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long hConnection The handle for a connection Arguments bytStartchannel Specifies the starting channel bytCount The number of channels up to 24 wValue An array that stores contiguous internal register The values are 0 255 Return Value MXIO_OK Refer to Return Codes 6 5 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K_GetGprsSignal This function code is used to get the Click amp Go Logic start status of ioLogik 5000 Ethernet Module int W5K_GetGprsSignal int hConnection WORD wStatus Visual Basic Declare Function W5K_GetGprsSignal Lib
209. tSafeValues_W This function code is used to get output safe values of contiguous D O channels int E1K_DO_GetSafeValues_W int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Visual Basic Declare Function E1K_ DO_GetSafeValues_W Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte nValue As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel The number of channels A pointer that stores the safe value of contiguous D O channels each word holds one channel value A word value of 0 represents the digital output status of the start channel A word value of 1 represents the status of the second digital output channel The values of the unused bits are random 0 OFF 1 ON 2 Hold Last Return Value MXIO_OK Refer to Return Codes 6 97 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_DO _SetSafeValues_W This function code is used to set safe values of contiguous D O channels int E1K_DO_SetSafeValues_W int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Visual Basic Declare Function E1K_DO_SetSafeValues_W Lib MXIO dIl ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte ByVal nValue As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the star
210. tStartChannel 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 Stored the safe values of the contiguous channels each bit holds the safe value of one channel A bit value of 0 represents the safe value of the start channel A bit value of 1 represents the second channel s safe value The values are 0 OFF 1 ON MXIO_OK Refer to Return Codes Return Value 6 36 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 int Cnt2K_GetSafeValue int Arguments hConnection bytChannel bytValue Return Value hConnection BYTE bytChannel BYTE byt Value The handle for an I O connection The desired channel A pointer to the safe value of the desired channel The values are 0 OFF 1 ON MXIO_OK Refer to Return Codes Cnt2K_SetSafeValue This function code is used to set the safe value of a specific D I channel in Counter mode int Cnt2K_SetSafeValue int Arguments hConnection bytChannel bytValue Return Value 6 37 hConnection BYTE bytChannel BYTE bytValue The handle for an I O connection The desired channel Stores the safe value for the desired channel The values are 0 OFF 1 ON MXIO_OK Refer to Retur
211. tStartChannel Specifies the starting channel bytCount The number of channels to read wAction An array that stores the safe actions of the contiguous A O channels wAction 0 represents the value of the starting channel The values are 0 Safe value 1 Hold last state 2 Low Limit 3 High Limit MXIO_OK Refer to Return Codes Return Value 6 191 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 int AO4K_SetSafeActions int Arguments hConnection bytSlot bytStartChannel bytCount wAction Return Value hConnection bytSlot bytStartChannel BYTE bytCount WORD wAction The handle for an I O connection BYTE BYTE Slot number of the I O module from 1 to 32 Specifies the starting channel The number of channels to set An array that stores thesafe actions for the contiguous A O channels wAction 0 represents the value of the starting channel The values are 0 Safe value 1 Hold last state 2 Low Limit 3 High Limit MXIO_OK Refer to Return Codes AO4K_GetSafeAction This function code is used to get the safe action for a specific analog output channel int AO4K_GetSafeAction int hConnection Arguments bytSlot bytChannel wAction Return Value 6 192 hConnection bytSlot bytChannel wAction BYTE BYTE WORD The handle for an I
212. tal Output Commands for ioLogik W5000 Pulse Output Commands for ioLogik E2000 R2000 Analog Input CommandsAnalog Input Commands for ioLogik E2000 R2000 Analog Input Commands for ioLogik W5000 Analog Input Commands for ioLogik E1200 Analog Output Commands Analog Output CommandsAnalog Output Commands for ioLogik E2000 R2000 Analog Output Commands for ioLogik NA4000 Analog Output Commands for ioLogik E4200 Relay Commands for ioLogik 2000 RTD Commands RTD Commands for ioLogik E4200 Thermocouple Commands TC Commands for ioLogik E4200 Q Click amp Go Logic Commands Commands for ioLogik E4200 O Active I O Message Commands Commands for ioLogik W5000 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_GetD1BuildDate MXIO_GetModuleType MXIO_ReadFirmwareRevision MXIO_ReadFirmwareDate MXIO_Restart MXIO_ Reset Commands for ioLogik E2000 R2000 Function Name Module2K_GetSafeStatus Module2K_ClearSafeStatus Module2K_GetInternalReg Module2K_SetInternalReg
213. the TC module is 65 5 65 5 mV 2uV count Use ioAdmin to check the I O module settings MXIO_OK Refer to Return Codes Return Value 6 240 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 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 wValue A pointer to the temperature value to read When wValue is 0x8000 it means the sensor is not correctly wired When the operating mode is temperature sensor 0 1 C F When the operating mode of the TC module is 78 0 78 0 mV 10uV count When the operating mode of the TC module is 32 7 32 7 mV luV count When the operating mode of the TC module is 65 5 65 5 mV 2uV count Use ioAdmin to check the I O module settings Return Value MXIO OK Refer to Return Codes 6 241 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_TC_Reads This function code is used to read the temperature value of contiguous channels int E42_TC_Reads int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount double dValue Visual Basic Declare Function E42_TC_Reads Lib MXIO dII ByVal hCo
214. the value of the starting channel MXIO_OK Refer to Return Codes RTD2K_ReadMaxRaw This function code is used to read the RTD input maximize raw data for a specific channel int RTD2K_ReadMaxRaw int hConnection bytChannel wValue Arguments Return Value 6 218 hConnection BYTE bytChannel WORD wValue The handle for an I O device connection The specific channel to be read A pointer that stores the specific RTD channel s maximize raw data MXIO_OK Refer to Return Codes 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 int RTD2K_ReadMaxRaws int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read wValue An array that stores the contiguous RTD channel s maximize raw data wValue 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes RTD2K_ReadMin This function code is used to read the RTD input minimize value for a specific channel int RTD2K_ReadMin int hConnection BYTE _ bytChannel double dValue Arguments hConnection The handle for an I O device connection bytChannel The specific channel to be read dValue A pointer that stores the specific channel RTD
215. ting channel The number of channels to be set A pointer that stores the safe value of contiguous D O channels each word holds one channel value A word value of 0 represents the digital output status of the start channel A word value of 1 represents the status of the second digital output channel The values of the unused bits are random 0 OFF 1 ON 2 Hold Last Return Value MxXIO_OK Refer to Return Codes 6 98 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_DO_GetModes This function code is used to get the mode of contiguous D O channels int E1K_DO_GetModes int hConnection BYTE bytStartChannel BYTE bytCount WORD wMode Visual Basic Declare Function E1K_DO_GetModes Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iMode As Integer As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel The number of channels An array that stores the mode of contiguous D O channels The values are 0 D O mode 1 Pulse mode Return Value MXIO_OK Refer to Return Codes 6 99 ioLogik MXIO DLL API Reference Direct I O Command Sets E1K_DO _ SetModes This function code is used to set the mode of contiguous D O channels int E1K_DO_SetModes int hConnection BYTE bytStartChannel BYTE bytCount WORD wMode Visual Basic Declare Function E1K_DO_SetModes Lib MXIO dIl
216. tion bytStartChannel Specifies the starting channel bytCount The number of channels to be get dwValue A pointer that stores the contiguous channe s power on values each bit holds one channel power on value A bit value of 0 represents the power on value of the start channel A bit value of 1 represents the second channel s power on value The values are 0 OFF 1 ON Return Value MXIO_OK Refer to Return Codes 6 50 ioLogik MXIO DLL API Reference Direct I O Command Sets W5K_Cnt_SetPowerOnValues This function code is used to set contiguous channel s power Lies saab aaa on values when D I channel in Count mode int W5K_Cnt_SetPowerOnValues hConnection bytStartChannel bytCount dwValue Visual Basic Declare Function W5K_Cnt_SetPowerOnValues Lib MXIO dll ByVal hConnection As Long bytStartChannel As Byte bytCount As Byte nValue As Long As Long Arguments hConnection The handle for an I O device s connection bytStartChannel Specifies the starting channel bytCount The number of channels to be clear dwValue Stored the contiguous channel s power on values each bit holds one channel power on value A bit value of 0 represents the power on value of the start channel A bit value of 1 represents the second channel s power on value The values are 0 OFF 1 ON Return Value MXIO_OK Refer to Return Codes 6 51 ioLogik MXIO DLL API Reference Direct I O Command Sets
217. tive on the ioLogik 2000 bytStartChannel Specifies the starting channel bytCount The number of channels to be read wValue An array that stores the contiguous A I channel d raw data wValue 0 represents the value of the starting channel MXIO_OK Refer to Return Codes Return Value 6 154 ioLogik MXIO DLL API Reference Direct I O Command Sets Analog Input Commands for ioLogik W5000 WSK _AI Reads This function code is used to read contiguous channel s analog input value int W5K_AIT_ Reads int hConnection BYTE bytStartChannel BYTE bytCount double dValue Visual Basic Declare Function W5K_AI_ Reads Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte dValue As Double As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be read dValue An array that stores the contiguous A I channel g value dValue 0 represents the value of the starting channel The unit is Vdc for the voltage module and mA for the current module Return Value MXIO_OK Refer to Return Codes 6 155 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K_AI ReadRaws This function code is used to read contiguous channel s analog input raw data int W5K_AI_ReadRaws int hConnection BYTE bytStartChannel BYTE bytCount WORD wValue Visual
218. to set the engineering unit for a specific RTD channel int RTD2K_SetEngUnit int hConnection bytChannel wEngUnit Arguments Return Value 6 228 hConnection BYTE bytChannel WORD wEngUnit The handle for an I O device connection The specific channel to be set A pointer that stores the specific RTD channel s engineering unit The values for normal channels are 0 Celsius 1 Fahrenheit 2 Ohm Others_ return Illegal Data Value The values for virtual channels are 0 Celsius 1 Fahrenheit Others_ return Illegal Data Value MXIO_OK Refer to Return Codes 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 int RTD2K_GetEngUnits int hConnection BYTE bytStartChannel BYTE bytCount WORD wEngUnit Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to bet read wEngUnit An array that stores the contiguous RTD channel s engineering unit wEngUnit 0 represents the value of the starting channel The values for normal channel are 0 Celsius 1 Fahrenheit 2 Ohm Others_ return Illegal Data Value The values for virtual channels are 0 Celsius 1 Fahrenheit Others_ return Illegal Data Value Return Value MXIO_OK Refer to Return Codes 6 229 ioLogik MXIO DLL API Reference Direct
219. ts the value of the starting channel The values are 0 D I Mode 1 Counter Mode Return Value MXIO_OK Refer to Return Codes 6 12 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 int DIZK_GetMode int hConnection BYTE bytChannel WORD wMode 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 Return Value MXIO_OK Refer to Return Codes DI2K_SetMode This function code is used to set the mode of a specific D I channel int DIZK_SetMode int hConnection BYTE bytChannel WORD wMode 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 Return Value MXIO_OK Refer to Return Codes DI2K_GetFilters This function code is used to get the filter of contiguous D I channels int DIZK_GetFilters int hConnection BYTE bytStartChannel BYTE bytCount WORD _wFilter Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to read wFilter An array that stores the filter values of the contiguous D I channels wFilter 0 represents the value
220. ue 0 represents the value of the starting channel The unit is Vdc for the voltage channel and mA for the current channel Return Value MXIO_OK Refer to Return Codes 6 199 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_AO_ Writes This function code is used to write the output value for contiguous channels int E42_AO_ Writes int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount double dValue Visual Basic Declare Function E42_AO_Writes Lib MXIO dIl ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte dValue As Double As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartChannel Specifies the starting channel bytCount The number of channels to be written dValue An array that stores the contiguous channel output value to write The dValue 0 represents the value of the starting analog output channel The unit is Vdc for the voltage channel and mA for the current channel Return Value MXIO_OK Refer to Return Codes 6 200 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_AO_ReadRaws This function code is used to read the output raw data of contiguou analog output channels int E42_AO_ReadRaws int hConnection BYTE bytSlot BYTE bytSta
221. ulse2K_SetSignalWidth This function code is used to set the Hi Lo signal width for a specific pulse channel int Pulse2K_SetSignal Width int hConnection BYTE bytChannel WORD wHiWiadth 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 wLoWidth A pointer to the Lo signal width of the desired channel Return Value Succeed MXIO_OK Fail Refer to Return Codes Pulse2K_GetSignalWidths32 This function code is used to get the contiguous pulse channel s Hi Lo signal width 32 bits The function code is designed for the ioLogik E2260 only int Pulse2K_GetSignal Widths32 int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwHiWidth DWORD dwLoWiadth Declare Function Pulse2K_GetSignalWidths32 Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte iHiWidth As Long iLoWidth As Long As Long A t peg hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to get dwHiWidth An array that stores the contiguous pulse channel s Hi signal width dwHiWidth 0 represents the Hi signal width of the starting channel dwLo Width An array that stores the contiguous plulse channel s Lo signal width dwLoWidth 0 represents the Lo signal width of the starting channel
222. ult 3 Slot Configuration Failed 4 No Expansion Slot wFPStatus Stores the field power status in numerical format The values are 0 24 VDC Field Power On 1 24 VDC Field Power Off wEWStatus Stores the Watchdog status in numerical format The values are 0 No Error 1 Watchdog activated wESStatus Stores the Modbus Setup Error status in numeric data format supported by NA 4020 amp NA 4021 only 0 No Error 1 Modbus Setup Error wECStatus Stores the Modbus Checksum Error status supported by NA 4020 amp NA 4021 only 0 No Error 1 Three continuous CRC LRC checksum errors have occurred since last restart last clear counters operation or last power up Return Value Succeed MXIO_OK Fail Refer to Return Codes ioLogik MXIO DLL API Reference System Commands Sets This function code is used to clear the status of the ioLogik 4000 Adp4K_ClearStatus adapters C C int Adp4K_ClearStatus int hConnection Arguments hConnection The handle for an I O connection Return Value Succeed MXIO_OK Fail Refer to Return Codes Adp4K_ReadFirmwareDate This function code is used to read the firmware release date C C int Adp4K_ReadFirmwareDate int hConnection WORD wDate Arguments hConnection The handle for a connection wDate An array that stores the firmware release date For a firmware release date of July 5 2005 wDate 0 will be 0X0705 and wDate 1 will be 0X2005 Return Value MXI
223. unction W5K_RLY_CurrentCntReads Lib MXIO dll ByVal hConnection As Long bytStartChannel As Byte bytCount As Byte As long As Long Arguments hConnection The handle for an I O device connection bytStartChannel Specificies the starting channel bytCount The number of channels to be set wValue An array that stores the contiguous D O channels relay count wValue 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes 6 210 ioLogik MXIO DLL API Reference Direct I O Command Sets WS5K_RLY_ResetCnts This function code is used to reset count value of contiguous D O channels int W5K_RLY_ResetCnts int hConnection BYTE bytStartChannel BYTE bytCount Declare Function W5K_RLY_ResetCnts Lib MXIO dll ByVal hConnection As Long ByVal bytStartChannel As Byte ByVal bytCount As Byte As Long A hConnection The handle for an I O device connection rguments bytStartChannel Specificies the starting channel bytCount The number of channels to be reset Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 211 ioLogik MXIO DLL API Reference Direct I O Command Sets Relay Commands for E1200 E1K_RLY_TotalCntReads This function code is used to get count value of contiguous D O channels int E1K_RLY_TotalCntReads int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwvValue Declare Function El1K_RLY_TotalCntReads Lib MXIO dll ByV
224. unt WORD dwMode A hConnection The handle for an I O connection rguments bytStartChannel Specifies the starting channel bytCount The number of channels to get wType A pointer that stores the mode status for contiguous DI DO channels each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 ON 1 OFF Succeed MXIO_OK Fail Refer to Return Codes Return Value 6 40 ioLogik MXIO DLL API Reference Direct I O Command Sets Cnt2K_SetSaveStatuses This function code is used to get the power off storage mode status OnPowerFail for contiguous DI DO channels int Cnt2K_SetSaveStatusesOnPowerFail int hConnection BYTE bytStartChannel BYTE bytCount WORD dwMode A hConnection The handle for an I O connection rguments bytStartChannel Specifies the starting channel bytCount The number of channels to set dwStatus A pointer that stores the mode status for contiguous DI DO channels each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 ON 1 OFF Return Value MXIO_OK Refer to Return Codes 6 41 ioLogik MXIO DLL API Reference Direct I O Command Sets Counter Commands for ioLogik W5000 W5K_Cnt_Reads This function code is used to read contiguous channel s c
225. us This function code is used to set the Click amp Go Logic start status of ioLogik 5000 Ethernet Module int W5K_Logic_SetStartStatus int Visual Basic MXIO dll ByVal ByVal Arguments hConnection iStatus Return Value 7 3 hConnection WORD wStatus Declare Function W5K_Logic_SetStartStatus Lib hConnection As Long iStatus As Integer As Long The handle for a connection Stores the specific module s Click amp Go Logic start status The values are 0 stop 1 start MXIO_OK Refer to Return Codes 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 int Message2K_Start int iProtocol WORD wPort pfnCALLBACK iProcAddress Callback Function Void FunctionName BYTE bytDataf WORD _ wSize Arguments iProtocol Transmission protocol 1 TCP 2 UDP wPort TCP or UDP port number iProcAddress Callback function which is called after receiving an active I O message from an ioLogik E2000 Ethernet I O bytData An array that stores the message wsize Array size Succeed MXIO_OK Fail Refer to Return Codes Message2K_Stop This function code is used to stop receiving active I O messages from an ioLogik E2000 Ethernet I O
226. us of the ioLogik 1200 Module int E1K_ClearSafeStatus int hConnection Visual Basic Declare Function E1K_ClearSafeStatus Lib MXIO dIl ByVal hConnection As Long As Long Arguments hConnection The handle for a connection Return Value Succeed MXIO_OK Fail Refer to Return Codes 6 10 ioLogik MXIO DLL API Reference Direct I O Command Sets 6 11 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 int DIZK_GetModes int hConnection BYTE _ bytStartChannel BYTE _ bytCount WORD wMode Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to read wMode An array that stores the modes of the contiguous D I channels wMode 0 represents the value of the starting channel The values are 0 D I Mode 1 Counter Mode Return Value MXIO_OK Refer to Return Codes DI2K_SetModes This function code is used to set the mode of contiguous D I channels int DIZK_SetModes int hConnection BYTE bytStartChannel BYTE bytCount WORD wMode Arguments hConnection The handle for an I O connection bytStartChannel Specifies the starting channel bytCount The number of channels to set wMode An array that stores the modes of the contiguous D I channels wMode 0 represen
227. ut Commands for ioLogik 4000 6 106 ioLogik MXIO DLL API Reference Direct I O Command Sets DO4K_GetSafeActions This function code is used to get the safe actions of contiguous D O channels int DO4K_GetSafeActions int hConnection BYTE _ bytSlot BYTE _ bytStartChannel BYTE _ bytCount WORD waAction Arguments hConnection The handle for an I O connection bytSlot Slot number of the I O module from 1 to 32 bytStartChannel Specifies the starting channel bytCount The number of channels to read wAction An array that stores the safe actions of contiguous D O channels The values are 0 Safe Value 1 Hold last state MXIO_OK Refer to Return Codes Return Value DO4K_SetSafeActions This function code is used to set the safe actions of contiguous D O channels int DO4K_SetSafeActions int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount WORD wAction Arguments hConnection The handle for an I O connection bytSlot Slot number of the I O module from 1 to 32 bytStartChannel Specifies the starting channel bytCount The number of channels to set wAction An array that stores the safe actions of contiguous D O channels The values are 0 Safe Value 1 Hold last state MXIO_OK Refer to Return Codes Return Value 6 107 ioLogik MXIO DLL API Reference Direct I O Command Sets DO4K_GetSafeAction This function code is used to get the safe action for a specific D O
228. ve for the ioLogik E2000 and R2000 bytChannel The desired channel dValue A pointer to the value of the desired analog output channel The unit is VDC for the voltage channel and mA for the current channel Return Value MXIO_OK Refer to Return Codes AO_Write This function code is used to write the status for a specific analog output channel int AO_Write int hConnection BYTE bytSlot BYTE bytChannel double dValue 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 The unit is VDC for the voltage channel and mA for the current channel Return Value MXIO OK Refer to Return Codes 6 179 ioLogik MXIO DLL API Reference Direct I O Command Sets AO_ReadRaws This function code is used to read the raw data values of contiguous analog output channels int AO_ReadRaws int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount 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 bytStartChannel Specifies the starting channel bytCount The number of channels to read wValue An array that stores the raw data values for the contiguous analog output chann
229. wStatus A pointer that stores the contiguous channel s DI DO mode each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 INPUT DI mode 1 OUTPUT DO mode MXIO_OK Refer to Return Codes Return Value 6 85 ioLogik MXIO DLL API Reference Direct I O Command Sets mode This function will take effect after restart the device int DIO2K_SetIQModes int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwMode Arguments hConnection The handle for an I O device connection bytStartChannel Specifies the starting channel bytCount The number of channels to be set dwMode A pointer that stores the contiguous channel s DI DO mode each bit holds one channel status A bit value of 0 represents the status of the start channel A bit value of 1 represents the second channel s status The values are 0 INPUT DI mode 1 OUTPUT DO mode Succeed MXIO_OK Fail Refer to Return Codes Return Value 6 86 ioLogik MXIO DLL API Reference Direct I O Command Sets Digital Output Commands for ioLogik W5000 W5K_DO Reads This function code is used to read the output statuses of contiguous D O channels int W5K_DO_Reads int hConnection BYTE bytStartChannel BYTE bytCount DWORD dwValue Visual Basic Declare Function W5K_DO_Reads Lib MXIO dll ByVal hConnection As Long ByVal bytStartCha
230. wTimeOut Timeout value for establishing a network connection with the ioLogik Ethernet Adapter The unit is in milliseconds wDeviceCount Total amount for the I O device connected to A OPC Server Return Value MXIO_OK Refer to Return Codes 4 22 ioLogik MXIO DLL API Reference System Commands Sets W5K_GetOpcDevicesInfo This function get amount of ioLogik W5000 that link in A OPC server int W5K_GetOpcDevicesInfo char szIP Visual Basic Arguments Device Status Return Value DWORD dwTimeOut WORD wDeviceCount Char szDevicelnfo Declare Function W5K_GetOpcDevicesInfo Lib MXIO dll ByVal ByVal ByVal ByVal szIP dwTimeOut wDeviceCount szDeviceCount IP Address MAC Address Online Status UnitID Succeed Fail 4 23 szIP As String nTimeOut As Long wDeviceCount As Integer szDeviceInfo As String As Long IP address of the A OPC Server to be connected Timeout value for establishing a network connection with the ioLogik Ethernet Adapter The unit is in milliseconds Total amount for the I O device connected to A OPC Server Each ioLogik W5000 device status request 12 Bytes 4 bytes start from array 0 6 Bytes start from array 4 1 Bytes start from array 10 1 Bytes start from array 11 MXIO_OK Refer to Return Codes ioLogik MXIO DLL API Reference System Commands Sets WS5K_GetOpcAliasName This function get A OPC server alias
231. ytCount The number of channels to be written wValue An array that stores the contiguous channel output raw data to write The wValue 0 represents the value of the starting analog output channel Return Value MXIO_OK Refer to Return Codes 6 202 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_AO_GetFaultValues_ This function code is used to set the output value of contiguous analog output channels int E42_AO_GetFaultValues int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount WORD wValuef J Visual Basic Declare Function E42_AO_GetFaultValues Lib MXIO dIl ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartChannel Specifies the strating channel bytCount The number of channels to retrieve wValue An array that stores the contiguous A O channel s safe raw data to be get The wValue 0 represents the value of the starting channel Return Value MXIO_OK Refer to Return Codes 6 203 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_AO_SetFaultValues This function code is used to set the safe raw data for contiguous A O channels int E42_AO_SetFaultValues int hConn
232. ytStartChannel As Byte ByVal bytCount As Byte dValue As Double As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot number ranges from 1 to 16 But this parameter is inactive on the ioLogik 2000 bytStartChannel Specifies the starting channel bytCount The number of channels to be read dValue An array that stores the temperature value to be read The dValue 0 represents the start channel When the dValue is 0x8000 it means the sensor is not wired correctly or the measured value is out of range When using the E42_RTD module for Resistance Input the unit is Ohm When the operating mode is temperature sensor the unit is C or F depending on the setting Check the ioAdmin utility for current settings Return Value MXIO_OK Refer to Return Codes 6 233 ioLogik MXIO DLL API Reference Direct I O Command Sets E42_RTD_ReadRaws This function code is used to read the temperature raw data for contiguous channels int E42_RTD_ReadRawss int hConnection BYTE bytSlot BYTE bytStartChannel BYTE bytCount WORD _ wvValue Visual Basic Declare Function E42_RTD_ReadRaws Lib MXIO dll ByVal hConnection As Long ByVal bytSlot As Byte ByVal bytStartChannel As Byte ByVal bytCount As Byte iValue As Integer As Long Arguments hConnection The handle for an I O device connection bytslot Slot number of the I O module The Slot numb
Download Pdf Manuals
Related Search
Related Contents
MOLCAS version 7.4 fluke Xerox Guia do usuário Cub Cadet ST228 Trimmer User Manual 『清潔ですか?』 『清浄ですか?』 誰でも 簡単に 迅速に 目に見えない 1 - Axis Communications Betty Crocker BC-2405C Use and Care Manual Guia de instalação - Epson America, Inc. Aqua Smarte Mineral Manual - Spanish Trust Power Adapter for iPod PW-2885 Copyright © All rights reserved.
Failed to retrieve file