APPENDIX B: EXTERNAL COMMUNICATIONS INTERFACE SPECIFICATION
LW250 PULSED Nd: YAG LASER
990-605 REV B: May, 1997
B-25
for ( n=0; rs[n] != ETX; n++)
rsout(rs[n]);
rsout(rs[n]);
/* send bcc */
rts
-
off();
}
/* transmit context of BF for ENT */
tx
-
ndat(bf, cnt)
char bf[];
int cnt;
{
Int n;
rts
-
on();
for ( n=0; n <= cnt; n++)
rsout(bf[n]);
/* send data */
rts
-
off();
}
/* transmit id code */
tx
-
id(c)
char c;
{
rts
-
on();
rsout(id[0]);
/* ID code */
rsout(id[1]);
rsout(c);
/* ENQ / ACK */
rts
-
off();
}
/* transmit RENEWD program */
tx
-
update()
{
p0;
tx
-
id(ENQ);
/* send id enq */
if (rx
-i
dack() == NG)
/* wait id ack */
goto p0;
tx
-
buf[0] = rs[0];
/* STX */
tx
-
buf[1] = ‘+’;
/* + */
tx
-
buf[2] = rs[2];
/* p */
tx
-
buf[3] = rs[3];
/* s */
tx
-
buf[4] = rs[4];
/* s */
tx
-
buf[5] = ETX;
set
-
bcc(tx
-
buf, tx
-
cntl);
/* bcc and tx
-
cntl set */
tx
-
ndat(tx
-
buf, tx
-c
ntl);
/* send +pss */
if (rx
-
idack() == NG)
/* wait id ack */