RUSKA 7252
Users Manual
5-16
/*--------------------------------------------------------------------*/
/* write_7000 : write a command to the 7250 */
/*--------------------------------------------------------------------*/
void write_7000 (char *s)
{
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 — RUSKA 7252 Serial (RS-232) — Controls Pressure to 20.000
%FS
/*--------------------------------------------------------------------*/
/* Sample Program 3 - RUSKA 7252 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;
Содержание RUSKA 7252
Страница 3: ...7252 Change Language Hold key for 5 seconds enter mode ...
Страница 4: ......
Страница 10: ...RUSKA 7252 Users Manual vi ...
Страница 12: ...RUSKA 7252 Users Manual viii ...
Страница 20: ...RUSKA 7252 Users Manual 1 6 ...
Страница 40: ...RUSKA 7252 Users Manual 3 6 ...
Страница 72: ...RUSKA 7252 Users Manual 4 32 ...
Страница 114: ...RUSKA 7252 Users Manual 6 22 ...
Страница 118: ...RUSKA 7252 Users Manual 7 4 ...