Introduction to CAMAC

Download Report

Transcript Introduction to CAMAC

Introducing the CAMAC interface.
The original concept of CAMAC
The CAMAC (Computer Automated Measurement and Control),
standard IEEE 583-1975 was defined by the European Standards
On Nuclear Electronics (ESONE) Committee of the Joint Research
Centre (JRC) Ispra to permit any number of incompatible laboratory
instruments to be interfaced with computers.
The committee suggests the important features are:A modular system with functional plug-in units that mount in a standard crate.
Designed to exploit the highest packing density possible with solid state devices???
Plug-in modules connect to data highway (Dataway) that is part of the crate and carries data,
control signals and power.
Can connect to on-line computer although the use of a computer is optional.
Crates can be connected together by either parallel or serial highways.
CAMAC in astronomy a brief history
Typical applications for CAMAC in the nuclear industry were pulse height
discriminators and rate meters. The HEGRA cosmic ray observatory on La Palma
used CAMAC modules in this application.
Instruments
RGO and other astronomical observatories such as AAO and NOT use CAMAC as a
convenient means to interface instruments, telescopes and detectors to control
computers.
Several early RGO La Palma and AAO instruments were controlled through CAMAC
using Perkin Elmer computers such as Peoples Photometer and QUBES, but by the
late 80s RGO had shifted to an in house control systems programmed in FORTH
designated as the MMS and 4MS instrument controllers. Since ~mid 90s new WHT
instruments have been controlled by EPICS, these have some similarities to
CAMAC but use an in crate processor.
Telescopes
CAMAC was retained for telescope control and has continued after the change over
from Perkin Elmer TCS (INT and JKT) and MicroVax TCS (WHT) to Alpha
workstations.
CAMAC usage in ING Telescope Systems
External
Parallel input absolute encoders, switch closures (limit switches), time service
Parallel output rate demand (WHT only), some indicator lights
Serial input/output RS232 communication (Sony Transducer!)
UP/Down counters incremental encoders
Analogue to digital converters truss/mirror temperature, displacement
Transducers
Digital to Analogue converters rate demand (INT and JKT)
System
Branch extenders Needed when extra crates are added
Crate controller Required to control crate and as a link to other crates
Branch terminator Always required in the final crate
Clock buffer Not really a true CAMAC used for clock fan out
Diagnostic Word generators, Dataway Test Modules
CAMAC Basics (Node addresses)
CAMAC addresses are node (niche) specific they don’t therefore
have DIL switches that select a particular address, the
programmer must specify a slot when addressing a
module.
Node 8
2
Node 12
6 8 10 12 16
Crate 0 The
system crate
by definition
CAMAC Basics (Connecting crates)
Computer with
CAMAC driver
loaded
CAMAC interface
plugged into
computer PCI bus
Branch extender module
Branch 0
Crate 0
Branch 6
Crate 1
Branch 6
Computer interface module
(computer specific)
Branch 6
Crate 2
Branch 6
Crate 3
Crate controller modules
Branch terminator module
CAMAC Basics addressing a module
Branch (only single branches at ING always 0 or 6)
Crate (crate addresses range from 0 to 3 at ING the maximum
possible is 7)
Node (or Niche!) 25 stations or nodes are available in an
a standard CAMAC crate, the rightmost, station 25 is reserved
for a crate controller, addressed modules may be plugged into
stations 1 – 24
Subaddress used for addressing registers in inside
modules, 4 bits are available giving 16 possible subaddresses.
Function used for controlling the available functions within a
module, 5 bits are available giving 32 possible functions for
diagnostic purposes F 0 read and F 16 write are worth
remembering.
CAMAC Basics B C N A F
To communicate with a particular CAMAC module a 4 word
address and a 5 bit function code must be specified. The TCS
programme reads or writes to most modules at 20Hz. A
diagnostic programme is available on the Alpha TCS computer
(CAMTEST) for either writing to or examining the contents of
module registers
Familiarity with the use of CAMTEST is essential for duty engineers
apart from the PLOT program it is the most important tool you
have for tackling telescope problems
Remember:- Branch Crate Node Address Function
CAMAC bus architecture
Command controls Z, I, C
+6 volt 25amp
Read R1 – R24
Write W1 – W24
+24 volt
Module
Controller
-24 volt
-6 volt 25amp
Crate
Timing strobes S1 – S2
Command Lines F1 – F5 & A1 –A4
LAM
Modules you should know about!
RGO 32 bit counter
Used for reading telescope position from incremental encoders
6 of these modules are used in the INT
(illustration) and 8 on the WHT. These 32
bit counters accumulate counts from the
telescope’s incremental encoders and
transfer the instantaneous count to a
parallel register on receipt of a pulse on
the ‘clock’ input.
Clock inputs
32 bit counter architecture (greatly simplified!)
X32
Up
Down
&
&
&
&
A quad B inputs
A
B
CLOCK
20 Hz
&
&
To CAMAC
bus
Things to check on the 32 bit counter
1.
Are the lights incrementing or decrementing as the telescope axis moves?
2.
Is the module being accessed by the system (Caution: these LED are
occasionally faulty).
3.
Using CAMTEST check all 32 bits actually change state, you need to see
each one in a 0 or 1 state, this will involve moving the telescope over it’s
entire angular range.
4.
If you replace a 32 bit counter module ensure the jumper connections are
identical to the module you removed. (Caution: the up/down A quad B links
are identified in the wrong sense on these modules)
5.
To localise the fault try connecting the input from another encoder and
checking if the numbers change on the ‘encoder page’ ONLY do this test in
engineering never in computer mode.
Location of incorrectly
labelled LK8 but just copy
links on the module removed
Access LED
32 LEDs
Clock input
Encoder
input (line
driven)
Modules you should know about!
450-4 Parallel Register
Used to read parallel data such as absolute encoder inputs
Note the air
gaps, this
resulted in a
major
improvement
in reliability
Things to check on 450-4 modules
1.Has the fuse blown? Particularly if the module has been running hot as
when a fan fails or the air conditioning is off.
2. Is the module being accessed by the system
3.Using CAMTEST are all the bits able to change from 0 to 1
4. Is the module really the problem? Blown encoder bulbs and failed line
drivers chips and power supplies all show similar symptoms.
5. These are not used in closed loop situations so you could try inputting
data from another axis to help localise the fault.
6. Unless it is for the focus encoder don’t mess around at night just zeroset
and fix it in the morning.
OR/48 Output Register
Used to write instantaneous velocity to
telescope axes and rotators
This is the actual word being written to the
Marconi rate generator for azimuth in this
particular case 000000000000000011010101 slow!
You could test this module by writing a 24 bit
word to its CAMAC address and checking the
lights. In principle the telescope could be
made to move but in practice it is necessary
to set other bits to enable telescope
movement but it can be done.
How to find out what each CAMAC
module does
Each CAMAC crate has a ‘schedule’ attached to the cabinet door, some
nodes have labels but your best reference by far is the fabulous John Mills
PDF document available at
http://www.ing.iac.es/~eng/electronics/wht/telescope/wht_camac.pdf
This document not only gives the CAMAC addresses but also describes
the function of each bit. By reading and writing the correct bit pattern to
CAMAC modules it is possible to make the telescope and dome move at
any speed and direction you wish providing the CAMAC system modules
are working correctly?
Faults on branch extenders, couplers and terminators as well as CAMAC
back plane faults can cause very odd behaviour. Experience has shown
that CAMAC modules are frequently damaged during electrical storms
even when there is no evidence indicating a ground strike close to the
buildings.
Electrical storm damage
Electrical storms (thunder storms) are less common on La Palma
than in Northern Europe, mostly they occur in the winter and are
sometimes accompanied by falls of snow or soft hail (snow
grains). If you see lightning at a distance or hear thunder whilst on
site then you should anticipate CAMAC problems. Circuits with
long cables such as encoders are generally the first victims but
faults extend to crate controller modules that are inherently
difficult to diagnose.
I am not aware of any preventive action to take but a good policy
is to check the system early following the storm and have CAMAC
cognizant staff available on site despite the snow.
On two occasions I remember horrific CAMAC carnage resulting
from electrical storms!
CAMTEST demonstration
Using a LAT session log onto the TCS with username <engineer> and
password <?> you will be presented with several options but choose
CAMTEST. On the command line type the number of the Branch Crate
Node Address Function, on hitting return the program will present you
with the contents of the register (if it is a read operation F0) in
hexadecimal format.
There is reasonable online help (type help) with examples but I find the
<RADIX> command particularly useful since RADIX bin will present the
24 bit word in binary format making it easier to look for missing bits.
Switch to CAMTEST demonstration
Reading from B0 C0 N10 A0 (time service)
CAMTEST demonstration
Controlling WHT dome rotation
EXEC 6 3 2 1 16 1535 Move dome CW at full speed (hex 5FF)
EXEC 6 3 2 1 16 1047 Move dome CCW at half speed (hex 57F)
Motor run bit 1
CW rotation set
All 8 bits of
speed flat out!