ioLogik MXIO DLL API Reference Second Edition, June 2008 www.moxa.com/product © 2008 Moxa Inc., all rights reserved. Reproduction without permission
ioLogik MXIO DLL API Reference Overview 1-6Function WindowsPC-Linux 2.4PC-Linux 2.6UC-7110-LXUC-7112-LXUC-7408-LX UC-7420-LX IA-240-LXPulse2K_SetPo
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-63 AO2K_SetPowerOnRaw This function code is used to set the power on value of a specific an
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-64AO4K_SetSafeActions This function code is used to set the safe actions of contiguous A/O
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-65AO4K_SetSafeAction This function code is used to set the safe action for a specific chann
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-66RTD_Read This function code is used to read the temperature value for a specific channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-67RTD_ReadRaws This function code is used to read the temperatures for contiguouschannels i
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-68RTD_ReadRaw This function code is used to read the temperature value of a specific channe
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-69RTD2K_ResetMins This function code is used to reset contiguous RTD channel's minimi
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-70RTD2K_ReadMinRaw This function code is used to read the RTD input minimize raw datafor a
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-71RTD2K_ReadMaxRaws This function code is used to read contiguous RTD channel's maximi
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-72RTD2K_ReadMins This function code is used to read contiguous RTD channel's minimize
22 Chapter 2. Programming Flow The process used to obtain access to a remote I/O device on an ioLogik is similar for both Ethernet and serial inte
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-73RTD2K_ReadMaxs This function code is used to read contiguous RTD channel's maximize
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-74RTD2K_SetStartStatus This function code is used to set specific channel's start stat
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-75RTD2K_SetStartStatuses This function code is used to set contiguous channel's start
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-76RTD2K_GetSensorType This function code is used to get the sensor type for a specific RTD
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-77RTD2K_SetSensorType This function code is used to set the sensor type for a specific RTD
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-78RTD2K_GetSensorTypes This function code is used to get contiguous RTD channel's sens
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-79RTD2K_SetSensorTypes This function code is used to set contiguous RTD channel's sens
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-80RTD2K_GetEngUnit This function code is used to get the engineering unit for a specific RT
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-81RTD2K_GetEngUnits This function code is used to get contiguous RTD channel's enginee
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-82RTD2K_SetEngUnits This function code is used to get contiguous RTD channel's enginee
ioLogik MXIO DLL API Reference Programming Flow 2-2Connecting to a Single Ethernet I/O The MXIO Linux Library establishes a data tunnel using Modbus
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-83 RTD2K_SetMathPar This function code is used to set the math parameter for a specific RTD
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-84RTD2K_SetMathPars This function code is used to set contiguous RTD channel's math pa
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-85TC_Read This function code is used to read the temperature value of a specific channel. C
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-86 TC_ReadRaw This function code is used to read the temperature value of a specific channe
77 Chapter 7. Click&Go Logic Commands Click&Go logic commands are for ioLogik E2000 Ethernet I/O only. These commands involve the activati
88 Chapter 8. Active I/O Message Commands Active I/O message commands are for ioLogik E2000 Ethernet I/O only. These commands manage active I/O me
99 Chapter 9. Return Codes Return Value Value Description MXIO_OK 0 Function call was successful. ILLEGAL_FUNCTION 1001 The function code recei
ioLogik MXIO DLL API Reference Return Codes 9-2SIO_CLOSE_FAIL 3003 Unable to close the COM port. SIO_PURGE_COMM_FAIL 3004 Purge COM port error S
1100 Chapter 10. Product Model and ID Reference Table The MXIO DLL library is designed for use by the ioLogik line of remote I/O, including the io
ioLogik MXIO DLL API Reference Product Model and ID Reference Table 10-2 Analog Input 0x3400 0x3401 0x3402 0x3403 0x3410 0x3411 0x3412 0x3413 0x3
ioLogik MXIO DLL API Reference Programming Flow 2-3Connecting to Multiple Ethernet I/O Before multiple Ethernet I/O can be accessed over the network
ioLogik MXIO DLL API Reference Programming Flow 2-4Connecting to a Single Serial I/O ioLogik 4000 and R2000 I/O can be used in RS-485, RS-232 contro
ioLogik MXIO DLL API Reference Programming Flow 2-5Connecting to Multiple RS-485 I/O In most real world applications, multiple RS-485 I/O are often
ioLogik MXIO DLL API Reference Programming Flow 2-6Connecting to the ioLogik E2000 and Attached RS-485 I/O It is possible to combine Ethernet and RS
ioLogik MXIO DLL API Reference Programming Flow 2-7Modbus Command Sets vs. Direct I/O Command Sets The MXIO Library offers two options for accessing
33 Chapter 3. MXIO API Overview The MXIO API is organized into five types of commands: System Command Sets ¾ RS-485/RS-232 I/O Connect Command
ioLogik MXIO DLL API Reference MXIO API Overview 3-2System Command Sets RS-485/RS-232 I/O Connect Commands Function Name MXSIO_OpenCommport MXSIO_Cl
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
ioLogik MXIO DLL API Reference MXIO API Overview 3-3Modbus Command Sets Function Name MXIO_ReadCoils MXIO_WriteCoils MXIO_ReadRegs MXIO_WriteRegs Di
ioLogik MXIO DLL API Reference MXIO API Overview 3-4Counter Commands for ioLogik E2000, R2000 Function Name Cnt2K_Reads Cnt2K_Clears Cnt2K_Read Cnt2
ioLogik MXIO DLL API Reference MXIO API Overview 3-5Digital Output Commands for ioLogik E2000, R2000 Function Name DO2K_GetModes DO2K_SetModes DO2K_
ioLogik MXIO DLL API Reference MXIO API Overview 3-6Analog Input Commands Function Name AI_Reads AI_Read AI_ReadRaws AI_ReadRaw Analog Input Command
ioLogik MXIO DLL API Reference MXIO API Overview 3-7Analog Output Commands for ioLogik E2000, R2000 Function Name AO2K_GetRanges AO2K_SetRanges AO2K
ioLogik MXIO DLL API Reference MXIO API Overview 3-8Function Name RTD2K_GetSensorType RTD2K_SetSensorType RTD2K_GetSensorTypes RTD2K_SetSensorTypes
44 Chapter 4. System Command Sets System commands include functions that initialize the connection between a host computer and the I/O. In additio
ioLogik MXIO DLL API Reference System Commands Sets 4-2RS-232/RS-485 I/O Connect Commands MXSIO_OpenCommport This function opens the local COM port
ioLogik MXIO DLL API Reference System Commands Sets 4-3MXSIO_Connect Based on the COM port handle or ioLogik E2000 handle, users must use this funct
ioLogik MXIO DLL API Reference System Commands Sets 4-4Ethernet I/O Connect Commands MXEIO_Init Initiate the socket, only for windows OS. C/C++ Argu
Table of Contents Chapter 1. Overview ...1-1 What
ioLogik MXIO DLL API Reference System Commands Sets 4-5 MXEIO_Disconnect This will close the connection with the Ethernet I/O; the handle will be in
ioLogik MXIO DLL API Reference System Commands Sets 4-6MXIO_GetModuleType This function reports the model name of the network adapter andI/O modules
ioLogik MXIO DLL API Reference System Commands Sets 4-7MXIO_Restart This function is used to restart the I/O. C/C++ Arguments Return Value int MXIO_
ioLogik MXIO DLL API Reference System Commands Sets 4-8 Adp4K_ReadStatus This function code is used to read the status of the ioLogik 4000 adapter.
ioLogik MXIO DLL API Reference System Commands Sets 4-9Adp4K_ClearStatus This function code is used to clear the status of the ioLogik 4000adapters.
55 Chapter 5. Modbus Command Sets Four basic Modbus commands are provided in the Modbus command set. However, you must refer to the Modbus referen
ioLogik MXIO DLL API Reference Modbus Command Sets 5-2MXIO_WriteCoils This function code is used to write the contiguous status of an I/O coils. C/C
ioLogik MXIO DLL API Reference Modbus Command Sets 5-3MXIO_WriteRegs This function code is used to write the contents of a contiguous block of the I
66 Chapter 6. Direct I/O Command Sets Direct I/O command sets provide an intuitive way to access the data for each channel. The following topics a
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-2Digital Input Commands DI_Reads This function code is used to read the status of a group o
Chapter 5. Modbus Command Sets ...5-1 Chapter 6. Direct I/O Command Sets
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-3Digital Input Commands for ioLogik E2000, R2000 DI2K_GetModes This function code is used t
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-4DI2K_GetMode This function code is used to get the mode of a specific D/I channel. C/C++
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-5DI2K_SetFilters This function code is used to set the filter of contiguous D/I channels. C
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-6Counter Commands for ioLogik E2000, R2000 Cnt2K_Reads This function code is used to read t
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-7Cnt2K_Clear This function code is used to clear the counter value of a specific D/I channe
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-8Cnt2K_GetOverflow This function code is used to get the overflow status of a specific D/I
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-9Cnt2K_SetFilters This function code is used to set the filter values of contiguous D/Ichan
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-10Cnt2K_GetStartStatuses This function code is used to get the start statuses of contiguous
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-11Cnt2K_GetStartStatus This function code is used to get the start status of a specific D/I
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-12Cnt2K_GetTriggerTypes This function code is used to get the trigger types of contiguous D
11 Chapter 1. Overview This reference introduces the MXIO Linux Library for Moxa’s ioLogik 4000, E2000, and R2000 remote I/O. The following topics
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-13Cnt2K_GetTriggerType This function code is used to get the trigger type of a specific D/I
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-14Cnt2K_GetPowerOnValuesThis function code is used to get the power on values of contiguous
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-15Cnt2K_GetPowerOnValue This function code is used to get power on values when specific D/I
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-16Cnt2K_GetSafeValues This function code is used to get the safe values of contiguous D/Ich
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-17Cnt2K_GetSafeValue This function code is used to get the safe value of a specific D/I cha
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-18Digital Output Commands DO_Reads This function code is used to read the output statuses o
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-19DO_Writes This function code is used to write the output statuses of contiguous D/O chann
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-20DO_GetSafeValues This function code is used to get the output safe values of contiguous D
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-21DO_GetSafeValue This function code is used to get the safe value for a specific D/O chann
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-22Digital Output Commands for ioLogik E2000, R2000 DO2K_GetModes This function code is used
ioLogik MXIO DLL API Reference Overview 1-2What is the MXIO Linux Library? The MXIO Linux Library is a set of tools for programmers to use with Moxa
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-23DO2K_GetMode This function code is used to get the mode of a specific D/O channel. C/C++
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-24DO2K_GetPowerOnValuesThis function code is used to get the power on values of contiguous
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-25DO2K_GetPowerOnValue This function code is used to get the power on value for a specificD
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-26DIO2K_SetIOMode This function code is used to set specific channel's DI/DO mode. Thi
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-27DIO2K_SetIOModes This function code is used to set contiguous channel's DI/DO mode.T
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-28DO4K_SetSafeActions This function code is used to set the safe actions of contiguous D/O
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-29DO4K_SetSafeAction This function code is used to set the safe action for a specific chann
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-30Pulse2K_SetSignalWidths This function code is used to set the Hi/Lo signal widths of cont
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-31Pulse2K_SetSignalWidth This function code is used to set the Hi/Lo signal width for a spe
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-32 Pulse2K_SetSignalWidths32This function code is used to set the contiguous pulse channel&
ioLogik MXIO DLL API Reference Overview 1-3Function WindowsPC-Linux 2.4PC-Linux 2.6UC-7110-LXUC-7112-LXUC-7408-LX UC-7420-LX IA-240-LXDI_Reads 3 3
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-33 Pulse2K_GetSignalWidth32This function code is used to get the Hi/Lo signal width (32 bit
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-34Pulse2K_GetSignalWidth32This function code is used to set the Hi/Lo signal width (32 bits
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-35Pulse2K_SetOutputCountsThis function code is used to set the output counts for contiguous
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-36Pulse2K_GetStartStatuses This function code is used to get the start statuses of contiguo
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-37Pulse2K_SetStartStatuses This function code is used to set the start statuses of contiguo
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-38Pulse2K_SetStartStatus This function code is used to set the start status for a specific
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-39Pulse2K_SetPowerOnValuesThis function code is used to set the power on values of contiguo
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-40Pulse2K_SetPowerOnValueThis function code is used to set the power on value for a specifi
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-41Pulse2K_SetSafeValues This function code is used to set the safe value. C/C++ Argumen
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-42Pulse2K_SetSafeValue This function code is used to set the safe value for a specific puls
ioLogik MXIO DLL API Reference Overview 1-4Function WindowsPC-Linux 2.4PC-Linux 2.6UC-7110-LXUC-7112-LXUC-7408-LX UC-7420-LX IA-240-LXRTD2K_ReadMax
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-43AI_Read This function code is used to read the value of a specific analog input channel.
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-44AI_ReadRaw This function code is used to read the raw data value of a specific analog inp
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-45AI2K_ReadMinRaws This function code is used to read the minimize raw data values ofcontig
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-46AI2K_ReadMinRaw This function code is used to read the minimize raw data value fora speci
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-47AI2K_ReadMaxRaws This function code is used to read the maximize raw data values for cont
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-48AI2K_ReadMaxRaw This function code is used to read the maximize raw data value fora speci
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-49AI2K_SetRanges This function code is used to set the ranges of contiguous A/I channels. C
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-50AI2K_SetRange This function code is used to set the range for a specific A/I channel. C/C
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-51AO_Writes This function code is used to write the values of contiguous analogoutput chann
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-52AO_Write This function code is used to write the status for a specific analogoutput chann
ioLogik MXIO DLL API Reference Overview 1-5Function WindowsPC-Linux 2.4PC-Linux 2.6UC-7110-LXUC-7112-LXUC-7408-LX UC-7420-LX IA-240-LXCnt2K_Clears
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-53AO_WriteRaws This function code is used to write the raw data values for contiguous analo
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-54AO_WriteRaw This function code is used to write the raw data value of a specificanalog ou
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-55AO_SetSafeValues This function code is used to set the safe values for contiguous A/O cha
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-56AO_SetSafeValue This function code is used to set the safe value for a specific A/O chann
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-57AO_SetSafeRaws This function code is used to set safe values for contiguous A/O channels
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-58AO_SetSafeRaw This function code is used to set the safe value for a specific A/O channel
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-59AO2K_SetRanges This function code is used to set the ranges of contiguous A/O channels. C
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-60AO2K_SetRange This function code is used to set the range for a specific A/O channel. C/C
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-61AO2K_SetPowerOnValues This function code is used to set the power on values of contiguous
ioLogik MXIO DLL API Reference Direct I/O Command Sets 6-62AO2K_GetPowerOnRaws This function code is used to get the power on values of contiguous A
Kommentare zu diesen Handbüchern