EasyManua.ls Logo

Moxa Technologies NPort 5600-8-DT Series - Example Program

Moxa Technologies NPort 5600-8-DT Series
112 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
NPort 5600-8-DT/DTL Series The IP Serial Library
12-3
Example Program
char nportip=“192.168.1.10”;
char buffer[255];
int port = 1; int portid; nsio_init();
portid = nsio_open(nportip, port);
nsio_ioctl(portid,
B9600, (BIT_8 | STOP_1 | P_NONE) );
sleep(1000);
nsio_read(port, buffer, 200); nsio_close(portid);
nsio_end();
/*data buffer, 255 chars */
/*1st port */
/* port handle */
/*initial IP Serial Library */
/*1st port, nport IP=192.168.1.10
*/
/*set 9600, N81 */
/* wait for 1000 ms for data */
/* read 200 bytes from port 1 */
/* close this serial port */
/* close IP Serial Library */
www.ipc2u.ru
www.moxa.pro

Table of Contents

Other manuals for Moxa Technologies NPort 5600-8-DT Series

Related product manuals