Teledyne SyriXus 65x Installation And Operation Manual page 153

Syringe pumps
Table of Contents

Advertisement

Example of Visual C++ Program Showing Conversion of Pump Commands to
// visual C++ version 10.0
// Dasnet.cpp : Defines the entry point for the console application.
// A 'C, C++' example of DASNET serial control
#include "stdafx.h"
#include <windows.h>
#include<stdio.h>
#include<conio.h>
#include<string.h>
void commOpen(int port, long speed);
void conv_das(char *, char *);
void dgets(char *);
void dputs(char *);
void comm_putc(char);
int comm_getc(void);
BOOL GetCTS (void);
char unitnum;
HANDLE hCom;
DCB dcbSerialParams;
int _tmain(int argc, _TCHAR* argv[]) // console appication
{
int commport;
long speed;
char in[512],out[512];
// printf("Starting Program");
printf("Enter Unit ID=");
scanf_s("%d",&unitnum);
printf("Enter Comm port=");
scanf_s("%d",&commport);
printf("Enter Baud Rate=");
scanf_s("%ld",&speed);
fflush(stdin); //clear stdin buffer
commOpen(commport,speed);
while(1)
{
_cputs("\n\rString(Q TO Quit) >>>");
gets_s(in,200);
_strupr_s(in); /*convert to upper case */
if(in[0]=='Q') break;
conv_das(in,out);
_cputs("Dasnet Output >>>");
puts(out);
//printf("\nWriting to serial port");
dputs(out);
_strset_s(out,256,0);
dgets(out);
printf("Dasnet Response>>%s\n",out);
}
EAR99 Technology Subject to Restrictions Contained on the Cover Page
SyriXus Series Pumps Installation and Operation Guide
DASNET Frames
Section 8 Serial Interface
8-11

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Syrixus 260xSyrixus 500xSyrixus 500xvSyrixus 1000x

Table of Contents