Moxa ioPAC 8020-5-RJ45-C-T [25/66] I o alarm api

Moxa ioPAC 8020-5-M12-C-T [25/66] I o alarm api
Developer's Guide for Moxa RTU Controllers Programmer's Guide
2-17
MX_Slot_Inserted_Get
UINT32 MX_Slot_Inserted_Get(UINT32 *state);
Gets the current status of inserted slots.
Output Parameters
num
Return Value
Result of the call
Notes
ioPAC 8020-C series only
MX_Slot_Info_Get
UINT32 MX_Slot_Info_Get (UINT32 slot, UINT32 *moduleType);
Gets the inserted module type of the slot. If the slot is empty, moduleType returns with value
IO_MODULE_EMPTY.
Input Parameters
Slot
the slot index, starting from 0
Output Parameters
moduleType
module type
Return Value
Result of the call
Notes
ioPAC 8020-C series only
MX_DIO_Map_Set
UINT32 MX_DIO_Map_Set(UINT32 slot, UINT32 num);
Sets DIO channels to be DI or DO.
Input Parameters
slot
0 = IOLOGIK W5348-C SERIES
n = Expansion Devices
num
Return Value
Result of the call
Notes
ioLogik W5348-C series only
I/O Alarm API
The device node is located at /dev/mxio. Users must include libmoxa_pgm.h. Return values of I/O Alarm
API functions are listed below; they can also be found at libmoxa_pgm.h. In addition, /dev/mxio cannot be
opened if it was opened and not closed yet.
#define IO_ALARM_OVERFLOW -100
#define IO_ALARM_EXCEPTION -101
#define IO_ALARM_INVALID_ACTION -102
#define IO_ALARM_INVALID_PARAMETER -103
#define IO_ALARM_QUEUE_EMPTY -104
Note: “0” (zero) indicates success, and “-1” indicates an illegal action.

Содержание

Скачать