Herunterladen Inhalt Inhalt Diese Seite drucken

Verwendung Von Turboc - COSINUS ESCORT 3145A Bedienungsanleitung

Inhaltsverzeichnis

Werbung

ESCORT 3145A / 3146A
6.8
Verwendung von Turbo C
#include <stdio.h>
#include <conio.h>
#define COM1 0x3f8
#define COM2 0x2f8
#define COM3 0x3e8
#define COM4 0x2e8
#define RS232 COM1
void init_rs232(void);
void send(char);
char read(void);
void send_buffer(char*);
void tkecho(char*);
char* tkdata(char*);
int scan_key(void);
int err;
void main(void)
{
char buffer[35];
clrscr();
init_rs232();
printf("Initial RS232....\n");
send_buffer("RST\015\n");
tkecho("=>\015\n");
successfully.
tkecho("*>\015\n")
initial state.
send_buffer("S101\015\n");
tkecho("=>\015\n");
successfully.
send_buffer("S211\015\n")
tkecho("=>\015\n");
successfully.
sleep(3);
send_buffer("R1\015\n");
reading.
printf("%s",tkdata(buffer));
screen.
tkecho("=>\015\n");
successfully.
send_buffer("R2\015\n");
printf ("%s",tkdata(buffer));
screen.
Cosinus Computermesstechnik GmbH • Tel. 089-665594-0 • www.cosinus.de
//Initial RS232 interface
//Print "Initial RS232...."on screen
//Send "RST" to meter.
//'Waiting "=>" and checking if the command is executed
//Waiting "*>" to make sure the meter is in power on
//Send "S101" to meter.
//'Waiting "=>" and checking if the command is executed
//Send "S101" to meter..
//'Waiting "=>" and checking if the command is executed
//Send "R1" to meter. Read primary display
//Print primary display reading on computer
//'Waiting "=>" and checking if the command is executed
//Send "R2" to meter. Read primary reading.
//Print secondary display reading on computer
//Clear screen
// Wait for 3 seconds.
Seite 6-79

Quicklinks ausblenden:

Werbung

Inhaltsverzeichnis
loading

Diese Anleitung auch für:

Escort 3146a

Inhaltsverzeichnis