Moxa IA240-T-LX [83/92] Digital input signal

Moxa IA240-T-LX [83/92] Digital input signal
IA240/241 Linux User’s Manual Programmer’s Guide
6-9
int set_din_event(int diport, void (*func)(int diport), int mode, long int duration)
Description
Set the callback function for digital input port when the state is changed from high to low, low to
high or any sate changed.
Input
int diport - the digital output port number. It is 0 to 3.
void (*func)(int diport) - The call back function point. It will be called when the set event
happens.
int mode - Set the kind event. High to low, low to high or both.
long int duration - We know the digital signal sometime is not reliable. You can the duration time
to except the error signal. If you set to zero, it will not detect the duration time. You can set 40 ms
to 3600000 ms by increase 20 ms.
Output
OK will be zero.
DIN_EVENT_HIGH_TO_LOW
Digital Input Signal
duration
int get_din_event(int diport, int *mode, long int *duration)
Description
Get the set event for digital input port.
Input
int diport - the digital output port number. It is 0 to 3.
int *mode - Save the set event.
long int *duration - Save the set duration time value.
Output
OK will be zero.

Содержание

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

Скачать