ICP DAS USA I-8411 User Manual page 84

I-8000 series for c language
Hide thumbs Also See for I-8411:
Table of Contents

Advertisement

For example, reading and receiving data through the COM1.
#include <stdio.h>
#include "8000E.h"
void main(void)
{
int quit=0, data;
InitLib();
/* Initiate the upac5000 library */
InstallCom(1, 115200, 8, 0, 1);
while(!quit)
{
if(IsCom(1))
/* Check if there is any data in the COM port input buffer */
{
data=ReadCom(1);
ToCom(1, data);
if(data=='q') quit=1;
}
}
RestoreCom(1);
}
I-8000 Series (C Language Based) User Manual, Version 1.0.1
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
/* Install the COM1 driver */
/* Read data from COM1 port */
/* Send data via COM1 port */
/* If 'q' is received, exit the program */
/* Release the COM1 */
Page: 84

Advertisement

Table of Contents
loading

This manual is also suitable for:

I-8811I-8431-80I-8831-80I-8431I-8831

Table of Contents