RD Controls Hardware Release Note 16.1
CAMAC C1003 Module
Multifunction RS232 Interface
R. West, W. Knopf, T. O'Brien, A. Thomas, T. Watts
May 7, 1992
Introduction
The C1003 CAMAC module enables readings to be obtained from a connected
meter by issuing CAMAC commands via the EPICURE Beamline Control System.
The C1003 module may be connected via an RS232 interface to one of the
following meters:
- MetroLAB Model PT2025 NMR Teslameter
- Group3 Model DTM-100 Series Hall Effect Teslameter
- Newport Model 269 Digital Pyrometer
The type of device to be supported is selected by switches
on the module I/O connector.
Module Configuration
The C1003 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
- 8 data bits
- 1 stop bit
- no parity
- baud rate selectable from 300 to 19200
- 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 C1003 module has an RS232 I/O connector 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. RS232 serial data transmitted from the teslameter must be formatted
as follows:
- 9600 baud
- 8 data bits
- no parity
- 1 stop bit
I/O Connector
There are 8 switches on the I/O connector used to indicate the type of device
connected to the C1003 module. Switches 1 through 4 indicate the type of the
connected meter and switches 5 through 8 indicate the baud rate. For the C1003
module, switch 1 and switch 5 both in the ON position indicate a 1200 baud
thermocouple is connected. Any other switch configuration indicates a 9600 baud
teslameter is connected.
MetroLAB Model PT2025 NMR Teslameter
The RS232 interface of
the teslameter can operate in two modes: autonomous and conversational.
In the autonomous mode,
the teslameter is controlled solely from the device's front panel.
A message consisting of the present field value is periodically broadcast
by the teslameter at a rate determined by switch settings.
Messages from the C1003 module to the teslameter are ignored.
The autonomous mode is the only mode supported by the C1003 module.
In the conversational mode, the RS232 "host" has total
control of all teslameter functions and exchanges
ASCII strings in a request/reply fashion.
There are currently no plans for the C1003 module to support the conversational
mode.
Switch Settings
To enable the C1003 module to process data from the teslameter,
the jumper on the circuit board of the teslameter's I/O module must be set to
the 9600 baud position and
the micro-switches on the rear panel of the teslameter must be set in the
following manner:
- switch 1 = 1 - send every measured value
- switch 2 = 0
- switch 3 = 0
- switch 4 = 1 - 8 transmission/reception data bits
- switch 5 = 0 - no parity
- switch 6 = 0
- switch 7 = 0 - autonomous mode
- switch 8 = 0 - one stop bit
- switch 9 = 0 - RS232 interface
Message Formats
Approximately once per second, the teslameter transmits to the C1003 module
a string of ASCII characters which is
terminated by a carriage return, line feed pair. Depending upon the
position of the MHz/TESLA toggle switch on the front panel, the string has
one of two formats:
vdd.ddddddFcl in the MHz position
vdd.dddddddTcl in the TESLA position
where
- F indicates units of MHz
- T indicates units of Tesla
- the decimal point is always present
- d is a single ASCII decimal digit from 0 through 9
- leading zeroes are suppressed
- v is one of the following ASCII characters:
- L - LOCKED indicating the teslameter was "locked" during the
measurement cycle and therefore the supplied value is valid.
- N - NOT LOCKED indicating the teslameter has not
seen an NMR signal during the mearuement cycle and
therefore the supplied value is invalid.
- S - SIGNAL indicating an occurrence of the NMR signal
during the last measurement cycle. It may also
indicate that the teslameter is not in the AUTO
mode of operation.
- W - WRONG indicating the reading supplied by the
teslameter has no significance and should be ignored, e.g., after a TRIGGER.
- c is the carriage return character
- l is the line feed character
Group3 Model DTM-100 Series Hall Effect Teslameter
The DTM-100 may be configured by use of DIP switches to transmit
each new reading on the serial line in a known format at a maximum
rate of 2.34 Hz.
The RS232 interface of this device can operate in several other modes,
but this is the only one which is supported by the C1003 module.
Switch Settings
To enable the C1003 module to process data from the teslameter,
the switches on the processor board of the teslameter must be set
appropriately. The 16-position switch used to specify the serial
data bit rate must be set to the 9600 position.
The DIP switches must be set in the following manner:
- switch S1-1 = 0 - zero device address
- switch S1-2 = 0
- switch S1-3 = 0
- switch S1-4 = 0
- switch S1-5 = 0
- switch S1-6 = 1 - one stop bit
- switch S1-7 = 0 - no parity
- switch S1-8 = 1 - 8 transmission/reception data bits
- switch S2-1 = 1 - every reading transmitted
- switch S2-2 = 0 - line feed terminator
- switch S2-3 = 1 - carriage return inserted before line feed terminator
- switch S2-4 = 1 - echoing of commands enabled
- switch S2-5 = 0 - tesla field units
- switch S2-6 = 1 - units symbol inserted after numerical reading
- switch S2-7 = 1 - digital filtering enabled
- switch S2-8 = 1 - system reset enabled
The RS232 jumpers on the processor board must be connected in the following
manner:
- options pins: single device system
- handshake pins: +5 volts for both CTS and DCD
- t/m pins: terminal mode
Message Formats
Approximately 2.34 times per second, the teslameter transmits to the C1003
module a string of ASCII characters which is
terminated by a carriage return, line feed pair:
bddddducl
where
- b is the blank or space ASCII character and is always the first character
- 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:
- c is the carriage return character
- l is the line feed character
Teslameter Initialization
In addition to the physical switch settings, the C1003 module must send the
DTM teslameter certain configuration commands whenever the module is reset
or powered on:
- CTRL-X - reset the system, reinstating all default values and
returning the message RESET
Newport Model 269 Digital Pyrometer
The C1003 module is also capable of interfacing with the Newport thermocouple
meter.
Switch Settings
Type of output is selected by a simple jumper/pin array behind the lens.
The serial output of the thermocouple meter has the following characteristics:
- 1200 baud
- 7 data bits
- odd parity
- 2 stop bits
Message Formats
Each message consits of 9 ASCII characters
sddddd uc
where
- s is a plus or minus sign
- d is numeric data, including a decimal point
- u is C or F for temperature
- c is the carriage return character
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.
- Identify
- F6 A0 - Read module number
- F6 A1 - Read software version
- Hardware
- F8 A0 - Test LAM
- F9 A0 - Reset module
- LAM
- F1 A13 - Read LAM mask register
- F1 A14 - Read LAM source register
- F10 A0 - Clear LAM source register
- F17 A0 - Clear selected LAM source register bits
- F17 A13 - Write LAM mask register
- F17 A14 - Write LAM source register
- F24 A0 - Disable LAM
- F26 A0 - Enable LAM
- 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
- Data
- F0 A0 - Read low 16 bits of most recent data value
- F0 A1 - Read high 16 bits of most recent data value
- F1 A8 - Read module status
- F6 A2 - Read selected options
Function Code Descriptions
- F0 A0 - Read low 16 bits of most recent data value
-
This function returns the low 16 bits of the reading value most recently
acquired from the teslameter.
- F0 A1 - Read high 16 bits of most recent data value
-
This function returns the high 16 bits of the reading value most recently
acquired from the teslameter.
For the DTM teslameter which only returns a 16-bit reading, the value
is placed in the low 16 bits
and the sign bit is extended into the upper 16 bits.
- F1 A8 - Read module status
-
- F1 A13 - Read LAM mask register
-
- F1 A14 - Read LAM source register
-
- F6 A0 - Read module number
-
This function always returns the decimal value 1003.
- F6 A1 - Read software version
-
A sixteen-bit value is returned with the major version number (release)
in the most significant byte and the revision level number in the least
significant byte.
- F6 A2 - Read selected options
-
This function returns a reading of the switch settings on the I/O connector
used to indicate the type of the attached meter. Only the low 8 bits are
significant. EE indicates a 1200 baud thermocouple is connected. Any other
value indicates a 9600 baud teslameter is connected.
- F6 A3 - Read FOP status
-
- F6 A4 - Read FOP reply data
-
- F8 A0 - Test LAM
-
This function indicates 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 module
-
This function is totally implemented in hardware. It is
equivalent to pressing the reset button on the module's front
panel, causing the embedded processor to be reset. Q is always returned.
However, trying to communicate with the module before the reset is complete
results in no Q.
- F10 A0 - Clear LAM source register
-
This function clears the entire LAM source register.
- F17 A0 - Clear selected LAM source register bits
-
This functions clears 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.
- F17 A13 - Write LAM mask register
-
This functions writes the accompanying 16-bit word to the LAM mask register.
- F17 A14 - Write LAM source register
-
This function sets 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.
- F19 A2 - Write FOP command
-
- F19 A3 - Write FOP data
-
- F24 A0 - Disable LAM
-
This function disables the assertion of LAM to the crate controller.
- F26 A0 - Enable LAM
-
This function enables the assertion of LAM to the crate controller. Any
LAM request made while LAM was disabled is immediately asserted.
Data Format
The C1003 module converts the ASCII text string from the connected
device to
a signed 32-bit integer representing the floating point data value
times 10 to the 7th power. In addition, one of the following status codes is
associated with the data value:
- 0x0001 - Reading in units of Tesla
- 0x0002 - Reading in units of degrees F
- 0x0004 - Reading in units of degrees C
- 0x0008 - No NMR signal
- 0x0010 - Teslameter not in AUTO mode
- 0x0020 - Reading not significant
- 0x0040 - Precision greater than 31 bits
- 0x0080 - Reading in units of degress C, not TESLA
- 0x0100 - Reading out of range
- 0x0200 - Reading in units of MHz, not TESLA
- 0x0400 - Invalid units
- 0x0800 - Invalid terminator
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
- DM a b - display memory (byte) from address a to address b
- DR - display registers
- DW a b - display memory (word) from address a to address b
- GO a - go to execute user program at address a
- HE - display help menu
- HL - load intel hex file
- OM a d - output data value d to memory address a
- SM - substitute memory (byte)
- SW - substitute memory (word)
Status LEDs
All status LEDs are cleared whenever a carriage return is received.
- ST 0 - receiving ASCII character input
- ST 1 - new valid data available for reading via CAMAC
- ST 2 - RS232 interface error (framing, parity, overrun)
Security, Privacy, Legal
Security, Privacy, Legal
rwest@fsus04.fnal.gov