Computer Communication
Technical Handbook
019722-101 Rev. 05
88
SC-350/360
12.21 Stopping Machine
This message stops the machine.
12.22 Program Example
Below is an example of a short and simple program, written in Pascal,
that can be used for communication between SC 350/360 and a
computer. It is however necessary to add routines for time-out and
check sum control.
Note!
All settings on page six of the SC 350/360 set-up (
) should hold the value zero (the default
value) for this program to run.
{————————————————————————————----------------------------------------
Program................ :
exampel1.pas
Project................... :
SC360
Date created......... :
960415 by MJ
This version ......... :
1.1
Description .......... :
Example of software for a computer con-
trolling a
connected SC360.
Note:
1 For simplicity the handshake lines are not used in this example.
2 No check sum implemented.
Ver history:V1.1: Added code for version 2.00 of protocol
————————————————————————————----------------------------------------}
program example 1;
uses crt;
const
{ COM1: RS232 port address }
RXTX = $3F8; { $2F8 if COM2: is used }
ACK = 6;
NAK = 21;
ESC = 27;
var
dummy,
checkSum
: integer;
key
: char;
protocol
: integer;
Computer (PC)
SC-350/360
–––––––>
ESC
–––––––>
“M”
–––––––>
“0”
–––––––>
(“M” + “0”) ^ FF
16
<–––––––
ACK (if check sum is correct) or
NAK (if check sum is incorrect)