ICP DAS USA I-8411 User Manual page 94

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

Advertisement

For example, to send a command '$01M' to I-7K I/O module for getting the module name.
#include <stdio.h>
#include "8000E.h"
void main(void)
{
unsigned char InBuf0[60];
InitLib();
/* Initiate the 8000E library */
InstallCom(1,115200,8,0,1);
InstallCom(2,115200,8,0,1);
SendCmdTo7000(2,"$01M",0);
/* Timeout = 50ms, check sum disabled */
ReceiveResponseFrom7000_ms(2,InBuf0,50,0);
printCom(1,"Module Name = %s", InBuf0);
Delay(10);
/* Wait for all data are transmitted to COM port */
RestoreCom(1);
RestoreCom(2);
}
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
/* Initiate the COM1 driver */
/* Initiate the COM2 driver */
/* Send a command to COM2 */
/* Release the COM1 */
/* Release the COM2 */
Page: 94

Advertisement

Table of Contents
loading

This manual is also suitable for:

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

Table of Contents