RD Controls Hardware Release Note 20.0
CAMAC C1013 Module
Cryogenic Thermometer Interface
R. West
February 11, 1991
Introduction
The C1013 CAMAC module collects data from a cryogenic thermometer
connected to the module via its RS232 interface.
The data obtained from the meter is pooled in the module's dynamic memory
and may be selectively read by issuing
CAMAC commands using the EPICURE Beamline Control System.
The only device the C1013 module presently supports is a
Lake Shore Cryotronics, Inc., model 820 cyrogenic thermometer with dual
input cards and an 8229 scanner conversion card.
Module Configuration
The C1013 module is based on the CAMAC 1111 single board computer:
- Zilog 8002 16-bit processor
- Zilog 8036 Counter/Timer
- up to 32K of RAM
- up to 32K of ROM
- CMCSLV - CAMAC functions are handled by an ALTERA EP1800 EPLD chip
- DUART - RS232 communication functions are handled by a
dual power MAX232 and Signetics SCN2681 communications chip
- programmable data format
- 7 or 8 data bits plus parity
- odd, even, or no parity
- 1 or 2 stop bits
- programmable baud rate
- no echo
- no RTS
- no CTS
On the front panel of the module are the following buttons and indicators:
- N LED - indicates when the crate controller has initiated a dataway
cycle
addressed to the module's slot
- LAM LED - indicates the module is asserting its slot's dataway LAM
signal
- LAMEN LED - indicates unmasked bits in the LAM source register will
cause
module LAM to be asserted
- HB LED - indicates failure of the processor. The Heart Beat is
generated
by software via the Counter/Timer circuit (2 second one shot).
- RESET Button - resets the processor, peripheral chips, and other
circuits
- ST LEDs - eight status LEDs which may be used by application software
RS232 Interface Configuration
The C1013 module has an RS232 I/O port on the rear of the module
and also on the front. Each port's baud rate may be set to a value from 300 to
19200.
The I/O connector for the rear port has 8 switches which are used to
indicate the type of device
connected to the C1013 module. Switches 1 through 4 indicate the type of the
connected meter and switches 5 through 8 indicate the baud rate. For the C1013
module, switch 2 and switch 6 both in the ON position indicate a 1200 baud
cryogenic thermometer is connected. Any other switch configuration is invalid.
The switches on the cryogenic thermometer must be set so its RS232
interface has the following characteristics:
- 1200 baud
- 7 data bits
- no parity
- 1 stop bit
Lake Shore Cryotronics, Inc., Model 820 Cryogenic Thermometer
The C1013 module has total control of all meter functions and exchanges
ASCII strings in a request/reply fashion. The C1013 module transmits a
request to the meter which consists of a string of ASCII characters
terminated by an end-of-line (EOL) sequence. The EOL terminator sequence
for both sending and receiving is a carriage return, line feed pair.
If data is requested, the meter outputs it immediately upon receipt of the
EOL sequence. A temperature reading has the following format:
sddd.ddddu
where
- s is a blank or a plus or minus sign
- d is one of the ASCII decimal digits 0 through 9 with a maximum of five
decimal digits in the string
- an ASCII decimal point is always present somewhere within the string
- leading zeroes are suppressed
- u units are indicated by one of the following ASCII characters:
- K - Kelvin
- F - Fahrenheidt
- C - Celcius
- R - LogR
- X - Capacitance
The cryogenic thermometer is equipped with dual sensor inputs, A and B.
The optional 8229 Scanner Conversion unit expands the A input to handle
five sensors which are designated as A0 through A4. The C1013 module reads
each of these six sensors once every four seconds. Each ASCII string read
from the meter is converted to a binary value which is pooled in memory
to be read by the appropiate CAMAC command. The four second time interval
is the maximum amount of time the meter requires to obtain a valid reading.
Operation
The cryogenic thermometer cannot be setup to periodically output
data values over its RS232 interface. Therefore, the C1013 module must
write ASCII command strings to the meter to obtain the necessary reading
and status information. This section lists these command strings.
Unless otherwise noted, the module delays one-half
second after reading a response to a command string before writing the next
command string.
- Initialize
- CT0M1Z0RDKADKBF4AF4B
- clear the unit to power up state (C)
- set terminating characters to carriage return-line feed pair (T0)
- set remote interface mode to remote (M1)
- set IEEE EOI status such that EOI line is set/accepted on last
character input or output (Z0)
- reset alarm relay status to the N.0 state (R)
- select units of Kelvin for inputs A and B (DKA and DKB)
- select resolution of X.XXXX for inputs A and B (F4A and F4B)
- Delay one second
- YHYA005YA105YA205YA305YA405YB05 - disable the SCAN function (YH) and set
all dwell times to 5 seconds (YAn05, YB05)
- Delay one second
- W1 - read position, alarm status, and id information
- W2 - read EOI, mode, and terminator status
- WY - read the scan status, dwell times, and scanner position
- Get data from sensor A0
- YHYCA0SA0WY - Disable the SCAN function (YH), select channel 0 for sensor
A (YCA0), select input A0 as the display sensor (SA0),
and read the scan status, dwell times, and scanner position (WY)
- Delay four seconds
- W1 - read position, alarm status, and id information
- WA - read sensor A
- W2 - read EOI, mode, and terminator status
- Get data from sensor A1
- YHYCA1SA1WY - Disable the SCAN function (YH), select channel 1 for sensor
A (YCA1), select input A1 as the display sensor (SA1),
and read the scan status, dwell times, and scanner position (WY)
- Delay four seconds
- W1 - read position, alarm status, and id information
- WA - read sensor A
- W2 - read EOI, mode, and terminator status
- Get data from sensor A2
- YHYCA2SA2WY - Disable the SCAN function (YH), select channel 2 for sensor
A (YCA2), select input A2 as the display sensor (SA2),
and read the scan status, dwell times, and scanner position (WY)
- Delay four seconds
- W1 - read position, alarm status, and id information
- WA - read sensor A
- W2 - read EOI, mode, and terminator status
- Get data from sensor A3
- YHYCA3SA3WY - Disable the SCAN function (YH), select channel 3 for sensor
A (YCA3), select input A3 as the display sensor (SA3),
and read the scan status, dwell times, and scanner position (WY)
- Delay four seconds
- W1 - read position, alarm status, and id information
- WA - read sensor A
- W2 - read EOI, mode, and terminator status
- Get data from sensor A4
- YHYCA4SA4WY - Disable the SCAN function (YH), select channel 4 for sensor
A (YCA4), select input A4 as the display sensor (SA4),
and read the scan status, dwell times, and scanner position (WY)
- Delay four seconds
- W1 - read position, alarm status, and id information
- WA - read sensor A
- W2 - read EOI, mode, and terminator status
- Get data from sensor B
- SB - select input B as the display sensor
- Delay four seconds
- W1 - read position, alarm status, and id information
- WB - read sensor B
- W2 - read EOI, mode, and terminator status
This command sequence is repeatedly executed by the C1013 module. One
execution of the entire sequence requires approximately 40 seconds.
CAMAC Functions
When a CAMAC operation is performed, the Z8002 processor executes a vectored
interrupt to a routine which reads the CMCSLV data lines and determines the
function code. A jump is then executed to the appropriate routine to process
the request.
- Data
- F0 A(0+2n) - Read low 16 bits of data from input sensor An, where n = 0
to 4
- F0 A(1+2n) - Read high 16 bits of data from input sensor An, where n = 0
to 4
- F1 A0 - Read low 16 bits of data from input sensor B
- F1 A1 - Read high 16 bits of data from input sensor B
- F1 A8 - Read module status
- F6 A2 - Read selected options
- Identify
- F6 A0 - Read module number
- F6 A1 - Read software version
- Fast On-line Protocol (FOP) for software diagnostics
- F6 A3 - Read FOP status
- F6 A4 - Read FOP reply data
- F19 A2 - Write FOP command
- F19 A3 - Write FOP data
- Hardware
- F8 A0 - Test LAM
- F9 A0 - Reset module
- LAM
- F1 A13 - Read LAM mask register
- F1 A14 - Read LAM source register
- F17 A13 - Write LAM mask register
- F17 A14 - Write LAM source register
- F17 A15 - Clear selected LAM source register bits
- F24 A0 - Disable LAM
- F26 A0 - Enable LAM
Function Code Descriptions
- F0 A(0+2n) - Read low 16 bits of data from input sensor An, where
n = 0 to 4
- F0 A(1+2n) - Read high 16 bits of data from input sensor An, where
n = 0 to 4
- F1 A0 - Read low 16 bits of data from input sensor B
- F1 A1 - Read high 16 bits of data from input sensor B
- F1 A8 - Read module status, returning
a status bit for the local/remote status of the connected
meter and two status bits for each sensor reading: (1) overload and (2) not
units of kelvin.
- F1 A13 - Read LAM mask register
- F1 A14 - Read LAM source register
- F6 A0 - Read module number, returning the decimal value 1013
- F6 A1 - Read software version, returning
a sixteen-bit value with the major version (release) number
in the most significant byte and the revision level number in the least
significant byte.
- F6 A2 - Read the I/O connector switch settings
which indicate the type of the attached meter. Only the low 8 bits are
significant. DD indicates a 1200 baud cryogenic thermometer is connected.
Any other value is invalid.
- F6 A3 - Read FOP status
- F6 A4 - Read FOP reply data
- F8 A0 - Test LAM. Determine if the module has requested LAM,
independent of whether or not LAM is enabled.
If the module has requested LAM, Q is returned. Otherwise, no Q is
returned.
This function is totally implemented in hardware and does not interrupt the
embedded processor.
- F9 A0 - Reset the module, causing the embedded processor to be reset.
This CAMAC function is
equivalent to pressing the reset button on the module's front
panel. Q is always returned.
However, trying to communicate with the module before the reset is complete
results in no Q. This function is totally implemented in hardware.
- F17 A13 - Write the accompanying 16-bit word to the LAM mask register.
- F17 A14 - Set selected bits in the LAM source register. The user
must supply a 16-bit word which has a bit set for each corresponding LAM bit
which is to be set.
- F17 A15 - Clear selected bits in the LAM source register. The user
must supply a 16-bit word which has a bit set for each corresponding LAM bit
which is to be cleared.
- F19 A2 - Write FOP command
- F19 A3 - Write FOP data
- F24 A0 - Disable the assertion of LAM to the crate controller.
- F26 A0 - Enable the assertion of LAM to the crate controller. Any
LAM request made while LAM was disabled is immediately asserted.
Data Format
The C1013 module converts the ASCII text string from the connected
meter to
a signed 32-bit integer representing the floating point data value
times 10 to the 6th power.
Diagnostics
Diagnostic commands may be directly input to the module by connecting a
computer terminal to one of the RS232 ports. A HELP menu displays the
commands which are available to assist in trouble shooting. The following
commands can be executed at a terminal:
- CS - Clear display
- DB/DW m n - Display bytes/words from addresses m to n
- DR - Display register contents
- GO m - Execute program starting at address m
- HE n - Display help menu n
- HL - Load Intel hex file
- MW m n - Monitor words from addresses m to n
- OM a d - Write data value d to memory address a
- SM/SW - Substitute memory (bytes/words)
- LB - List breakpoints
- RB b - Remove breakpoint b
- SB b a - Set breakpoint b to address a
- CF/SF - Clear/set flag (M, P, or T)
- DS - Display I/O connector switch settings
- TE/TN - Start/stop echoing meter readings to console
- TM s - Write text string s to the device
- TR - Reset the connected meter
- RV/WV - Read/write external value
- RR a t - Repeatedly read address a for t ms
- RW a d t - Repeatedly write value d to address a for t ms
Status LEDs
- ST 0 - RS232 interface error (framing, parity, overrun)
- ST 1 - meter in local mode
- ST 2 - invalid meter reading (overload or units not kelvin)
- ST 3 - null return on reading request
- ST 4 - null return on status request
- ST 5 - not used
- ST 6 - new valid data available for reading via CAMAC
- ST 7 - receiving ASCII character input
Security, Privacy, Legal
rwest@fsus04.fnal.gov