Moxa UC-8416-CE [40/48] Uc 8400 wince application development with the sdk and software libraries

Moxa UC-8430-CE [40/48] Uc 8400 wince application development with the sdk and software libraries
UC-8400 WinCE Application Development with the SDK and Software Libraries
B-3
Function
int mxsp_set_interface(unsigned int fd, int mode);
Description This function sets the type of communication interface for a serial port.
Input <fd> Handle of the open port.
<mode> 0: RS232; 1: RS485_2WIRE; 2: RS422; 3: RS485_4WIRE
Return
When successful, this function returns 0.
Remarks
Function
int mxsp_get_interface(unsigned int fd);
Description This function gets the type of communication interface of a serial port.
Input <fd> Handle of the open port.
Return When successful, this function returns one of the values from 0 to 3.
The function returns a negative value when an error occurs.
Remarks
DIO
Function
HANDLE mxdgio_open(void);
Description This function opens an access to the DIO device.
Input None
Return When successful, this function returns an access to the DIO device.
Otherwise, there is an error.
Remarks
Function
void mxdgio_close(HANDLE fd);
Description This function closes the access to the DIO device.
Input <fd> The access to the device.
Return None
Remarks
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> the port index, from 0 to 3 mapping to DI0 to DI3
(from 0 to 11 mapping to DI0 to DI11, for UC-8418 only)
Return Returns 1 for a high signal or 0 for a low signal, if successful.
Otherwise, returns a value of -1.
Remarks
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> the port index, from 0 to 3 mapping to DO0 to DO3
(from 0 to 11 mapping to DO0 to DO11, for UC-8418 only)
Return Returns 1 for a high signal or 0 for a low signal, if successful.
Otherwise, returns a value of -1.
Remarks

Содержание

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

Скачать