ioPAC RTU Controllers
C/C++ Sample Code Programming Guide
|
DIO Sample More...
#include <libmoxa_rtu.h>
Functions | |
int | main (int argc, char **const argv) |
DIO 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: ./dio
Default: Slot = 0
Help:
root@Moxa:/home#./dio -h DIO sample program. Usage: ./dio [OPTIONS] Options: -s Slot of DIO module [0-0]. Default slot = 0
Library:
DIO APIs
int main | ( | int | argc, |
char **const | argv | ||
) |