Moxa V2426A-C2-W7E [26/88] Moxa i o control definitions for counter

Moxa V2426A-C7-T [26/88] Moxa i o control definitions for counter
V2400A Series Expansion Modules Software Installation and Programming Guide
4-6
Moxa functions for DI/DO
Function HANDLE mxdgio_epm3438_open(int HWIndex);
Description This function opens access to the DIO device.
Input <HWIndex> The first or second EPM-3438 board.
Output None
Return When successful, this function gives access to the DIO device. Otherwise, there is an error.
Function void mxdgio_close(HANDLE fd);
Description This function closes the access to the DIO device.
Input <fd> The access to the device.
Output None
Return None
Function int mxdgio_get_input_signal(HANDLE fd, int port);
Description This function gets the signal state of a digital input channel.
Input <fd> The access to the device.
<port> port #
Output <state> DIO_HIGH (1) for high, DIO_LOW (0) for low
Return Returns 1 for a high signal or 0 for a low signal, if successful. Otherwise, it returns a value of -1.
Function int mxdgio_get_output_signal(HANDLE fd, int port);
Description This function gets the signal state of a digital output channel.
Input <fd> The access to the device.
<port> Port number
Output None
Return Returns 1 for a high signal or 0 for a low signal, if successful. Otherwise, it returns a value of -1.
Function int mxdgio_set_output_signal_high(HANDLE fd, int port);
Description This function sets digital output channel to high.
Input <fd> The access to the device.
<port> Port number.
Output none.
Return When successful, this function returns 0. When an error occurs, it returns -1.
Function int mxdgio_set_output_signal_low(HANDLE fd, int port);
Description This function sets a digital output channel to low.
Input <fd> The access to the device.
<port> Port number.
Output none.
Return When successful, this function returns 0. When an error occurs, it returns -1.
Moxa I/O Control Definitions for COUNTER
This table shows the counter interface on the EMP-3438 module. If you want to read the counter value of the
module, you can read it from COUNTER_NODE1. If you have the second EMP-3438 module, read it from
COUNTER_NODE2.
#define
COUNTER_NODE1
/dev/epm_3438_counter1
#define
COUNTER_NODE2
/dev/epm_3438_counter2

Содержание

Похожие устройства

Скачать