
A
PPENDIX
I: TCL P
ROGRAMMING
G
UIDE
139
•
In the subscription option, the User must type in the EXACT event shown previously:
event.alarm.cpu.
•
Delay 10 seconds so the script does not overflow the e-mail system. This is configurable using the command
INTR
while this script is running using the amplisten facility.
TCL Server designed to interact with a TCL user
amppermission off
amplock 1
ampclear 1
set val1 0.0
set val2 0.0
set val3 0.0
while { 1 } {
set s [amplisten]
if {[string length $s] > 0}{
if {$s == “DATA”}{
puts [format “Mach Value = %f; Voltage Value = %f; Current
Value = %f.” $val1 $val2 $val3]
ampresponse
} elseif {$s == “READ1”}{
set
readTarget
[ampexec “READ MACH” 5 “##$$” 1]
scan readTarget “MACH Val %f” val1
puts
“READ1
COMPLETED”
ampresponse
} elseif {$s == “READ2”}{
set readTarget [ampexec “READ VOLTAGE” 5 “##$$” 1]
scan readTarget “VOLT Val %f” val2
puts
“READ2
COMPLETED”
ampresponse
} elseif {$s == “READ3”}{
set readTarget [ampexec “READ CURRENT” 5 “##$$” 1]
scan
readTarget
“AMP
Val
%f”
val3
puts
“READ3
COMPLETED”
ampresponse
} elseif {$s == “CONSOLE”}{
ampunlock
1
puts “Lock Released. Waiting for DONECONSOLE input”
ampresponse
while { [amplisten] != “DONECONSOLE” } {ampdelay 10}
amplock 1
puts
“Lock
Acquired”
ampresponse
} elseif {$s == “QUIT”}{
amppermission
on
ampunlock
1
puts
“Exiting
script”
Allow observers
and operators to
issue commands to
this TCL Service
Lock the console
for this TCL service
to use.
Clear old data in the TCL internal buffer so that there
is no confusion when data is gathered upon user
request.
Initializing variables
Read in user
command.
If the reader requests
the TCL service to re-
acquire one of the three
values, the TCL service
will issue the command
to the target and read in
the value. It will also
respond back to the
requester with a
message,
“COMPLETE”
If user input is “DATA” , format the data associated
with variables val1, val2, val3 in a string and respond
back the user.
If the user input is
“CONSOLE”
relinquish the write
console access lock
and respond with
content “Console Lock
released and waiting
for input
DONECONSOLE”.
If user input is QUIT lock
up permission on TCL
script, unlock write
access and exit script.
Содержание Dominion SX16
Страница 1: ...Installation and Operations Manual SX16 SX32...
Страница 2: ...This page intentionally left blank...
Страница 4: ...This page intentionally left blank...
Страница 6: ...This page intentionally left blank...
Страница 10: ...iv TABLE OF CONTENTS...
Страница 14: ...viii TABLE OF FIGURES...
Страница 24: ...10 DOMINION SX INSTALLATION AND OPERATIONS MANUAL...
Страница 30: ...16 DOMINION SX INSTALLATION AND OPERATIONS MANUAL...
Страница 82: ...68 DOMINION SX INSTALLATION AND OPERATIONS MANUAL...
Страница 84: ...70 DOMINION SX INSTALLATION AND OPERATIONS MANUAL...
Страница 86: ...72 DOMINION SX INSTALLATION AND OPERATIONS MANUAL...
Страница 88: ...74 DOMINION SX INSTALLATION AND OPERATIONS MANUAL...
Страница 102: ...88 DOMINION SX INSTALLATION AND OPERATIONS MANUAL...
Страница 114: ...100 DOMINION SX INSTALLATION AND OPERATIONS MANUAL...
Страница 120: ...106 DOMINION SX INSTALLATION AND OPERATIONS MANUAL...
Страница 132: ...118 DOMINION SX INSTALLATION AND OPERATIONS MANUAL...
Страница 158: ...144 DOMINION SX INSTALLATION AND OPERATIONS MANUAL...
Страница 161: ...APPENDIX K TECHNICAL FAQS 147 DSX 0A E 255 60 2000...
Страница 162: ...148 DOMINION SX INSTALLATION AND OPERATIONS MANUAL...