LAMSP ;SLC/DLG - MICROSCAN PROTOCALL ROUTINE W/O ACK-NAK ;7/20/90 09:49 ;
;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
A L ^LA(T,"P") I '$D(^LA(T,"P")) S ^("P")="MICROSCAN^IN"
S MODE=$P(^LA(T,"P"),"^",2),CTRL=$S($F(IN,"~")=$L(IN):$P(IN,"~",2),1:" ") D @MODE L Q
;
IN ;C= <STX>+<LF>+<CR> or there replaced values.
G:CTRL["D" SETOUT S:CTRL["E" OUT=$C(6),$P(^LA(T,"P"),"^",2)="IN" Q
OUT Q
SETOUT ;Change to output
Q:'$D(^LA(T,"O",0)) Q:^LA(T,"O")'>^LA(T,"O",0) S $P(^LA(T,"P"),"^",2)="OUT" Q
;The MicroScan needs to have the field delimiter set to | (124)
;LF is set to @ (64). Set " to 0.
;Timeout set to a min of 20, Protocall set to ACK/NAK.
;STX = ~B, ETX = ~C, EOT = ~D, ENQ = ~E, ACK = ~F, NAK = ~U
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLAMSP 730 printed Nov 22, 2024@16:54:01 Page 2
LAMSP ;SLC/DLG - MICROSCAN PROTOCALL ROUTINE W/O ACK-NAK ;7/20/90 09:49 ;
+1 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
A LOCK ^LA(T,"P")
IF '$DATA(^LA(T,"P"))
SET ^("P")="MICROSCAN^IN"
+1 SET MODE=$PIECE(^LA(T,"P"),"^",2)
SET CTRL=$SELECT($FIND(IN,"~")=$LENGTH(IN):$PIECE(IN,"~",2),1:" ")
DO @MODE
LOCK
QUIT
+2 ;
IN ;C= <STX>+<LF>+<CR> or there replaced values.
+1 if CTRL["D"
GOTO SETOUT
if CTRL["E"
SET OUT=$CHAR(6)
SET $PIECE(^LA(T,"P"),"^",2)="IN"
QUIT
OUT QUIT
SETOUT ;Change to output
+1 if '$DATA(^LA(T,"O",0))
QUIT
if ^LA(T,"O")'>^LA(T,"O",0)
QUIT
SET $PIECE(^LA(T,"P"),"^",2)="OUT"
QUIT
+2 ;The MicroScan needs to have the field delimiter set to | (124)
+3 ;LF is set to @ (64). Set " to 0.
+4 ;Timeout set to a min of 20, Protocall set to ACK/NAK.
+5 ;STX = ~B, ETX = ~C, EOT = ~D, ENQ = ~E, ACK = ~F, NAK = ~U