Specifications
RUSKA 7250, 7250i, 7250xi & 7250LP
Users Manual
5-16
ibwrt (device, s, strlen (s));
}
/*--------------------------------------------------------------------*/
/* request_7000 : write a query command and read the response */
/*--------------------------------------------------------------------*/
void request_7000 (char *s)
{
ibwrt (device, s, strlen (s));
ibrd (device, buffer, sizeof (buffer));
}
/*--------------------------------------------------------------------*/
Sample Program 3 - 7250 Serial (RS-232)
Controls Pressure to 20.000 %FS
/*--------------------------------------------------------------------*/
/* Sample Program 3 - 7250 Serial (RS-232) */
/* */
/* Controls pressure to 20.000 %FS */
/*--------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <dos.h>
#include <time.h>
#define TRUE 1
#define FALSE 0
#define TIMEOUT (CLK_TCK * 5) /* 5 second timeout */
#define XON 0x11
#define XOFF 0x13
#define CLEAR 0x03
#define DLE 0x10
#define QUEUE_SIZE 1024
char buffer[QUEUE_SIZE]; /* buffer for input/output strings */
double pressure; /* Pressure read from unit */
int status; /* Status register from unit */
int address;
int portbase;
int intnum;
volatile int transmit_enabled = TRUE;
char inqueue[QUEUE_SIZE];
int inq_in;
int inq_out;
void interrupt (*old_vector) ( );
int check_errors (void);
void serial_initialize (void);
void write_7000_serial (char *s);
void serial_close (void);
int request_7000_serial (char *s);
void serial_write (char ch);
/*--------------------------------------------------------------------*/
void main (void)
{
char *p;
/*-----------------------------*/
/* Initialize Serial Interface */
/*-----------------------------*/
address = 4;
serial_initialize ( );
/*-----------------------------------------------------------*/
/* Initialize 7250 Interface */
/* */
/* UNIT %FS Set units to percent of full scale */
/* PRES 20.0 Set control setpoint to 20 %FS */










