ioPAC RTU Controllers
C/C++ Sample Code Programming Guide
|
ioPAC5542 DIO TAG Sample More...
#include "libmoxa_rtu.h"
Functions | |
int | main (int argc, char *argv[]) |
ioPAC5542 DIO TAG Sample
Introduction: This DIO sample code sets the direction of DIO(0-3) to DI and DIO(4-7) to DO, and it reads DIO(0-3) status and output the status to DIO(4-7). Therefore, if you change the DIO(0) status to false, the output of DIO(4) would be false as well. The polling delay is 1 second. Example: 1. Using default: ./ioPAC5542_tag_dio Help:
root@Moxa:/tmp#./ioPAC5542_tag_dio -h DIO TAG sample program. Usage: ./ioPAC5542_tag_dio
Library:
TAG APIs
RTUxpress Project file:
ioPAC5542_tag_dio.rtu
(Please right click on the link and ‘Save Target As…’ to save RTUxpress project file and open it with RTUxpress utility)
int main | ( | int | argc, |
char * | argv[] | ||
) |