Research Division EED/Controls Software<P> Release Note 127.0<P> EPICURE Cryogenics Control System<P> C1080 Multibus Controller Software

Research Division EED/Controls Software

Release Note 127.0

EPICURE Cryogenics Control System

C1080 Multibus Controller Software

Robert E. West

January 12, 1993

Contents

For a cryogenic area of the beamlines, data is read and written using four different types of I/O modules residing in a multibus crate: A/D, temperature, digital, and actuator. The maximum configuration currently in use is two A/D cards, one temperature card, one digital card, and two actuator cards in a single multibus crate. A specific card may or may not be present in the crate, but if it is, it must be in the slot allocated for it.

The purpose of the C1080 Multibus Controller is to provide control access to the multibus cards via CAMAC commands. The C1080 module and its associated fanout module reside in a CAMAC crate in or near the cryogenic control rack. The C1080 module is cabled to the fanout module in an adjacent slot. The fanout module is connected by a ribbon cable to a buffer card residing in the multibus crate in the control rack. The buffer card generates the read and write control signals to the multibus I/O cards.

The C1080 CAMAC module includes an Intel 80960CA RISC processor operating at 25 Mhz, 128K bytes of ROM, 2M bytes of RAM, and 32K bytes of battery backed RAM. The data and control registers of the multibus I/O cards are mapped into the memory address space of the 80960 processor via the multibus buffer and fanout cards. Critical parameter values are maintained in the battery backed RAM (NVRAM). After the module has been be powered down or reset, it resumes normal operations by reading the necessary parameter values from the NVRAM. It is not necessary to download any values in order to resume normal operations.

Two primary functions which the C1080 module performs in a timed, repetitive manner are data pooling and closed loop control. The C1080 software determines what subset of the maximum I/O card configuration is actually present in the multibus crate. It then reads all input channels of the cards which are present and pools the data in its memory for access via CAMAC read operations. All the data in the memory pool is updated at a minimum rate of 15 Hz. For closed loop control, the C1080 software uses a series Dahlin PID control algorithm with dead time compensation and application of the derivative only to the process measurement. The module is capable of simultaneously controlling twenty different closed loops with each being processed at the maximum data pooling rate of 15 Hz.

When the C1080 module is powered up or is reset, the software goes through an initialization sequence to set variables in memory to the required values and to set the clock chip on the C1080 module to generate an interrupt every millisecond. The software then enters a base level monitor loop. An idle routine is called to loop until the millisecond interrupt flag is set by the clock service routine. When the idle routine sees the flag is set, it clears the flag and then returns to the base level monitor loop. A list of repetitive tasks is examined and those whose timer has elapsed are executed.

The C1080 software execution is directed by interrupts and by a list of tasks each of which is repeatedly executed at various timing intervals. The Intel 80960CA processor provides for 248 possible interrupts at 31 different priority levels. The C1080 uses 2 of these for normal sequencing of its operations and another 3 for notification of abnormal conditions. An interrupt vector table specifies the address of the associated service routine for each defined interrupt. The two principal interrupts defined for the C1080 are used (1) for processing CAMAC requests and (2) for processing a millisecond timer notification from the clock chip. The CAMAC interrupt has the higher priority of the two.

CAMAC Request Processing

When the C1080 hardware receives a CAMAC request, CPU execution is transferred to the CAMAC service routine. This routine reads the vector register of the CAMAC chip. It uses that input as an index into a jump table to transfer control to the routine which processes this particular CAMAC request. If a second CAMAC request is received before the processing of the first one has completed, no interrupt is generated until processing of the first request has completed.

Clock Processing

The C1080 modules contains a clock chip which is initialized by the software to generate an interrupt every millisecond. The service routine for this interrupt is a task scheduler. The first thing this service routine does is to set a flag indicating a millisecond interrupt has occurred. It then processes a list of a tasks each of which is executed repeatedly at some millisecond interval.

Task List

All the tasks the C1080 module performs on a regular basis are contained in a task list. For example, the job of pooling data from the A/D cards is an entry in this list. Another entry is the processing of closed loops. An entry in the task list contains the following fields:

The scheduler processes every entry in the task list. The first thing done is to decrement the count of time remaining. If the result is greater than zero, it is not yet time to perform this task. If the time interval has elapsed, the priority of the entry is checked. Tasks are executed at either of two priority levels: interrupt or base. A task such as the pooling of data from a multibus card is considered to be time critical, meaning it should be done at regular time intervals. Such a task is executed at interrupt level. A task such as the outputting of error messages to the screen can be done at the next available time and hence is done at the base or monitor level. If the priority in the task entry indicates interrupt level, the scheduler calls the specified procedure. When the procedure returns, the scheduler sets the time remaining to the interval time and then processes the next entry in the task list.

The task list is processed at the interrupt level by the clock interrupt service routine and also at the base level in the monitor loop. When executing at interrupt level, the count of time remaining is decremented for every entry in the list. The base level processing only checks to see if this count in the base level entries is zero. Other than this difference, processing of the task list is the same at both levels.

Interrupt Level Tasks

Base Level Tasks

The 8-bit registers of the I/O cards in the multibus crate are mapped into the address space of the Intel 80960CA processor starting at memory location hexadecimal B0000200. The offsets of the I/O registers may range from 0 to hex FF, so the last possible multibus address is hex B00002FF. Figure 1 shows the starting offsets for the I/O cards in the maximum multibus configuration currently in use in a beamline cryogenic area. It is possible to improve the data acquisition capability of the cryogenic multibus system by increasing the number of A/D cards to 4 and the number of digital cards to 3. Figure 2 shows the card configuration and the starting I/O offsets for the I/O cards in this enhanced configuration.

Actuator Card

The multibus crate contains a maximum of two actuator cards with each card having 8 channels, providing a maximum of 16 actuator control channels. Figure 3 shows the layout of the I/O registers for the actuator card. The only readable register on the actuator card is the LOCAL/REMOTE status register at offset 0. Each bit in the 8-bit register indicates the status of one actuator control channel where bit 0 is for channel 0. Each time the actuator data pooling task executes, it reads the status register of each actuator card in the multibus crate and writes the data into the pool.

Digital Card

As currently configured, the multibus crate contains a maximum of two digital cards. Each digital card consists of four distinct parts: TTL latches, latching relays, momentary relays, and digital status. The C1080 software considers each part of the digital card to be a separate physical device. There are 16 channels of TTL latches, 2 channels of latching relays, 6 channels of momentary relays, and 40 channels of digital status on a single digital card. Data is pooled for the TTL latches, latching relays, and digital status. The momentary relays are write-only. Figure 4 shows the layout of the I/O registers for the digital card. The digital pooling task reads 8 bytes of data from each digital card and stores them into the data pool. However, it interleaves the reading of data between all the digital cards which are present in the multibus crate. It reads the same byte from each digital card before it reads the next byte on the same card.

Temperature Card

The multibus crate contains a single temperature card which has 48 channels of resistor A/D values (10 bit unsigned). Each time the temperature data pooling task executes, it pools the data for the next channel on the card, resetting to channel 0 after reading channel 47. Figure 5 shows the offsets of the I/O registers on the temperature card. If the channel being processed is one of the first 24 on the card, the task writes the number to the channel selection register at offset E. It then reads the low order data bits from the input register at offset C and the high order data bits from the input register at offset A. If the channel is one of the second 24, the number is reduced by 24 before being written to the channel selection register at offset E. The low order data bits are then read from the input register at offset D and the high order data bits from the input register at offset B.

A/D Card

As currently configured, the multibus crate contains a maximum of two A/D cards. Each A/D card consists of two distinct parts: A/Ds and D/As. The C1080 software considers each part of an A/D card to be a separate physical device. There are 32 channels of A/Ds and 2 channels of D/As. Input and output data is a signed 12 bit value. Data is pooled for the A/Ds. The D/As are write-only. Figure 6 shows the layout of the I/O registers for the A/D card.

Each time the A/D data pooling task executes, it pools the data for the next A/D channel in the system, which may be the first channel of the next card if there is more that one A/D card present. The maximum number of channels in the system is 32 times the number of cards present. Two A/D cards are normally present, so the maximum number of A/D channels is 64, starting with 0 and ending with 63. After the pooling task has collected the data for the highest channel, it restarts with channel number 0. To obtain the reading of an A/D channel, the pooling task performs the following sequence:

Two complications exist in acquiring an A/D value. The first is the A/D cards presently being used are quite slow. The time from initiating a conversion by selecting the channel to the time the data is available is fairly long, on the order of 60 microseconds. Rather than remaining in a loop simply reading the status register and waiting for the conversion bit to be set, the A/D data pooling task is capable of initiating other work tasks such as the pooling of data from other, faster, I/O cards or even the processing of a closed loop. When such an initiated task completes, the A/D value is usually available the next time the pooling task checks the conversion bit. The second complication is at least three data values must be acquired one after the other for the same channel in order for a stable value to be obtained. Therefore, the sequence of selecting-waiting-reading must be repeated at least three times to obtain an accurate reading.

The multibus crate contains a maximum of two actuator cards with each card having 8 channels, providing a maximum of 16 actuator control channels. Figure 3 shows the layout of the I/O registers for the actuator card. The LOCAL/REMOTE status register is at offset 0. Each bit in this 8-bit register indicates the status of the corresponding actuator channel. The actuator data pooling task reads the status register of each actuator card and pools the data in RAM. The actuator control task positions an actuator to a requested setting and then maintains it at that setting as necessary. The bit in the status register entry in the data pool must be 0 indicating REMOTE for the C1080 software to control the corresponding actuator.

To move the actuator connected to channel number N in the OPEN direction, the software writes a pulse count of 1 to 255 to offset 0+2N. The controller hardware then sends a signal to the actuator until the hardware has decremented the pulse count to 0. To move the actuator in the CLOSE direction, the software writes the pulse count to offset 1+2N. To stop an actuator which is moving in either the OPEN or CLOSE direction, the software writes a 0 to the corresponding pulse count register to clear it.

The position of an actuator is expressed in units of percent open and ranges from 0% open, which is closed, to 100% open. However, the actuator control card provides no readback regarding the present position of the actuator. This information is provided by an A/D channel which is associated with the channel of the actuator controller. Therefore, to move an actuator to a specified position requires an actuator control channel and an A/D readback channel. The C1080 software treats such a combination of two or more physical devices as a logical device. In this case, the actuator control channel is one physical device, the A/D channel is the second physical device, and the actuator is the logical device which is composed of these two physical devices.

A logical device is defined by one or more data tables residing in RAM and backed up in NVRAM. The actuator logical device has two such tables: the channel table and the parameter table. The actuator channel table associates an A/D channel with an actuator control channel. The table contains 16 entries, one for each actuator control channel which may exist in the system. An entry in the table contains the number of the associated A/D channel. For example, if A/D channel 63 is wired to read the position of the actuator wired to actuator control channel 0, then entry 0 in the table contains the number 63. The other data table is the actuator parameter table. An entry in this table contains the position to which the actuator is to be set and the acceptable tolerance of the positioning. For example, if a user has requested an actuator be positioned at 50% with a tolerance of 2%, the actuator is considered to be where it is supposed to be if it is at any position from 48% to 52%, inclusive. A user may specify actuator setting and tolerance using commands entered via either CAMAC or a keyboard attached to the front panel of the C1080 module.

The actuator positioning task has an entry on the task list and is called by the scheduler every millisecond at interrupt level to process all actuator channels. For each channel, this task first reads the LOCAL/REMOTE status from the data pool. If the channel is REMOTE, the task gets the number of the associated A/D channel from the parameter table and gets the reading value from the data pool. If the difference between this reading value and the setting from the parameter table is less than or equal to the tolerance value contained in the parameter table, processing proceeds to the next actuator channel. If the reading is out of tolerance some number of consecutive times, the positioning task determines the direction of the correction and writes a pulse count of 255 into the associated controller register. The table entry for this channel is then flagged as moving and processing proceeds to the next actuator channel. When the actuator positioning task processes this channel one millisecond later, it again determines the difference between the setpoint and the present readback. If this difference is within tolerance and if the channel is flagged as moving, then the positioning task writes a pulse count of 0 into the associated controller register to stop the movement of the actuator. If the difference still exceeds the tolerance value and if the actuator has been moving for at least a second, the positioning task again writes 255 to the appropriate controller register.

The parameter table entry for an actuator channel contains several items in addition to the setting and tolerance previously described. These other items may only be modified by using console commands.

The timeout value in the parameter table entry pertains to the situation where the actuator is out of tolerance, the positioning task is setting the controller register to move the actuator, but the A/D position readback value has not changed for some period of time. If this time interval of no change exceeds the timeout and the timeout is greater than zero, then the positioning task sets the setpoint to the current position of the actuator. The position of the actuator is then within tolerance and no additional movement is required. For example, assume the actuator setting is 100% but the actuator is physically prevented from moving higher than 80%. If the timeout value is 5000 ms, the positioning task after 5 seconds changes the requested setting to 80% and hence stops trying to move the actuator because the reading is then within tolerance of the setting.

The local tracking flag in the parameter table entry pertains to the situation where the actuator is switched to LOCAL, its position is changed via the manual control switches, and then it is switched back to REMOTE. If the local tracking flag is nonzero, the positioning task sets the setpoint of the actuator to its position at the time its status changes from LOCAL to REMOTE. Otherwise, the positioning task moves the actuator back to the setting which had previously been specified.

As previously defined, a logical device is combination of two or more physical devices, where a physical device is a channel of an I/O card residing in the multibus. The logical device `actuator' is a combination of a channel on an actuator controller card and a channel on an A/D card. A logical device is defined by one or more data tables residing in RAM and backed up in NVRAM. There is one entry in each table for each channel of the logical device. The actuator logical device has two such tables with each table having 16 entries. Two other logical devices are referenced by the C1080 software: compressor status and engine.

The compressor status logical device is defined to have 16 channels. Each channel is composed of ten digital status channels and three momentary relay channels. This logical device is defined by a single data table which specifies the digital and relay channels used for each logical channel.

The engine logical device is also defined to have 16 channels. Each channel is composed of two A/D channels, one D/A channel, eight digital channels, and three momentary relay channels. This logical device is defined by two data tables. The channel table specifies which physical channels are used for each logical channel. The parameter table specifies the setting and tolerance values for each logical channel. Figure 7 shows the formats of the data tables used for each of the three logical devices.

The values in each of the channel tables may be read and written via CAMAC commands. A utility executes on the VAX for modifying the assignment of physical channels to logical channels if a hardware failure requires a temporary change. Unfortunately, the assignment of status and relay channels is not the same for all the cryogenic beam lines. The channel assignment utility provides for the downloading of area-specific assignment files to the associated C1080 modules. All channel assignment tables in a C1080 module are backed up in NVRAM, so a download from the VAX is only necessary when a change has to be made. When the module powers up, it uses NVRAM to initialize the corresponding parameters.

I/O Timeout

If the C1080 software reads from or writes to a multibus address and the I/O cycle does not terminate within 22 microseconds, the hardware generates a interrupt. The I/O timeout interrupt service routine is then executed. Under normal operations, the multibus is only accessed by the data pooling tasks whose execution is scheduled at the interrupt level of the millisecond service routine, which is lower than that of a timeout interrupt. When a data pooling task starts, it sets a variable identifying itself as the one accessing the multibus. When the task finishes, it clears this identifying variable. As a result, the I/O timeout interrupt service routine knows which card in the multibus was being accessed. The service routine increments the appropriate diagnostic counters. If the counter for the card which timed out exceeds a certain maximum, the card is marked as offline and a message is inserted onto the message queue. Data pooling from that card is then no longer done.

Whenever a change is made to the cards in a multibus crate, the crate is powered off, cards are removed and inserted as necessary, and then the crate is powered on again. The crate being powered off causes all accesses to the multibus to timeout, which causes all the cards to be marked offline and all data pooling to be stopped. When the crate is powered on again, it is desired that data collection resume. Every 5 seconds, a task is scheduled at base level to examine the maximum configuration of multibus I/O cards and mark as online those which are actually present. As previously stated, the types of and number of cards may vary from one multibus to another, but if a specific card is present, it must be in its allocated slot in the multibus. Therefore, a task can determine which cards are physically present.

The online work task uses the timeout interrupt to determine the physical presence of a multibus I/O card. For each card in the maximum multibus configuration, the task first marks the card as offline. It loops ten times reading an address which should access that card and then checking the timeout counter which is incremented by the timeout interrupt service routine. If the timeout counter changes any time during this sequence of ten reads, the task leaves the card marked as offline. If there has been no timeout, the task marks the card as online and data may again be pooled from it.

If a multibus I/O card were just marginally defective, it might be possible for there to be an occasional timeout when the associated data pooling task executes. After a certain number of timeouts on the card, the timeout interrupt service routine will mark the card as offline. When the online task executes, it might access the card without experiencing any timeouts and therefore mark the card as online again. However, the scheduled printing of the error queue would reveal a message for each of these transitions between offline and online, so such a condition should not go unnoticed. In addition, the offline and timeout counters are shown on the online/offline status display of the multibus cards produced by one of the console commands.

Loop Back Tests

The loop back tests are integrity tests for the address and data busses. When the C1080 module is powered up or reset, the software performs as part of its initialization sequence a loop back test first on the fanout card and then on the multibus buffer card. The execution of either of these tests may also be initiated by a console command entered via the RS232 interface. Offsets F0h through F3h in the multibus address space control these tests.

For the loopback test on the fanout card, a byte value of 02h is written to multibus offset F0h to set the test signal MBINH. This enables the loop back drivers on the fanout card and inhibits the multibus buffer card. A loop is then executed to read each of the 256 bytes in the address space of the multibus. A byte value of 02h is then written to multibus offset F1h to clear the inhibit of the multibus buffer card. With MBINH set, the fanout card loops the addressing information back as the data. Hence, the data which is read should be the offset into the multibus address space, starting with 0 and ending with 255. A loop is executed to make this comparison and to print out any mismatches.

For the loopback test on the multibus buffer card, a byte value of 02h is written to multibus offset F2h to set the test signal MBTST on the buffer card. As in the test of the fanout card, a loop is executed to read each of the 256 bytes in the address space of the multibus. A byte value of 02h is then written to multibus offset F3h to clear the MBTST signal. With MBTST set, the multibus buffer card loops the addressing information back as the data. Hence, the data which is read should be the offset into the multibus address space, starting with 0 and ending with 255. A loop is executed to make this comparison and to print out any mismatches.

Multibus Buffer Card

The multibus buffer card contains a number of diagnostic registers which may be read by the C1080 software from the multibus address space.

Figure 8 shows the multibus addressing offsets of the diagnostic registers. None of this information is either pooled or accessed on a scheduled basis. The diagnostic readbacks available from the multibus card may be displayed by entering a console command via the RS232 interface. Readings are displayed in both raw and scaled format. The A/D converter for the temperature and voltage readbacks operates from -5V to +5V. The temperature readback is scaled at 50 mV/degC. A scaling factor of 3.0 is used for the +12V and -12V readbacks and a scaling factor of 1.25 is used for the -5V and +5V readbacks.

Status LEDs

The LEDs on the front panel of the C1080 module indicate the following status conditions:

Because a multibus device (e.g., digital status) may have as many as 80 channels, it is not possible to use only one CAMAC operation to read information from a specific device and channel. It is necessary to first perform a write operation (F17A0) to specify the initial channel number. After that, each read operation directed to a particular device returns the requested information and then increments the channel number. Note that only one channel number variable is maintained. Each time data is to be obtained from a different device, the initial channel number must be specified again. A minimum of 7 bits is required to specify the largest channel number currently being used. A field width of 8 bits is actually used, so the maximum channel number which may potentially be used is 255.

F0An
Read a 16-bit data word and then increment the channel number. A valid reading is returned only for the A/D device and the temperature device. A request for any other device or for a channel number greater than the maximum for the requested device results in a no Q. The average value is calculated using the previous eight data readings.

F0A12
Read the current value of the channel number, which is the number of the channel to be used for the next read or write operation directed to the channel of a device. Note that this channel value will not be the same as the value initially specified if read or write operations have been issued to the device and have caused the channel number to be incremented.
F0A13
Read the selected table ID number and the entry offset. Parameter tables may be associated with particular device and channel combinations. This operation selects the initial entry of a particular table to be referenced by a table read or write operation. As with the channel number variable, there is only one table/offset variable pair. Hence, the table ID and initial entry offset need to be specified prior to referencing parameter table data for a different device.

bits 15 - 8: table ID

bits 7 - 0: entry offset

F0A14
Read a 16-bit data word from the selected parameter table of the selected device and channel and then increment the entry offset to the next word. Note that the channel number is not incremented by this operation nor by the the F1A1.

F1A0
Read engine requested position.

F1A1
Read engine tolerance.

F1A2
Read actuator requested position.

F1A3
Read actuator tolerance.

F1An
Read status register and then increment the channel number

F1A13
Read LAM mask

F1A14
Read LAM request register

F6A0
Read module number

F6A1
Read version number

F6A3
Read FOP status

F6A4
Read FOP data

F6A5
Read the hardware serial number of the module

F8A0
Test LAM

F9A0
Module reset

F10A0
Clear LAM

F17A0
Write the channel number
F17A1
Write the table ID number and the entry offset

bits 15 - 8: table ID

bits 7 - 0: entry offset

F17A2
Write a 16-bit data word to the current entry in the selected table and then increment the entry offset to the next word

F17A3
Write engine requested position.

F17A4
Write engine tolerance.

F17A5
Write actuator requested position.

F17A6
Write actuator tolerance.

F17A13
Write LAM mask

F17A14
Write LAM request register

F19A2
Write FOP command

F19A3
Write FOP data to buffer

F19An
Set to 0 (OFF or OPEN) or 1 (ON or CLOSED) and then increment the channel number

F24A0
Disable LAM

F26A0
Enable LAM

The C1080 Multibus Controller Module implements closed loop control on a system made up of two devices: (1) an input or process device and (2) an output or control device which has some effect upon the process device. A setpoint value is specified which the process device is to achieve and then at which it is to be maintained. This setting value and the current reading value of the process device are input to a PID (Proportional, Integral, Derivative) closed loop algorithm which calculates a new setting value for the control device. After some period of time has elapsed, the new setting of the control device has caused the reading of the process device to change. The PID algorithm is then executed again with the new process reading and a new control setting is again calculated. This sequence is repeated until the difference between the process reading value and the process setpoint is within some tolerance value. How long this convergence takes and how well it occurs, even if it occurs at all, depends on how successful the user has been in tuning the various PID parameters to match the characteristics of the physical system.

The various input and output parameters used for a single closed loop will be described relative to the display screens which are presented to a user by the Closed Loop Utility Program executing on the VAX. Figure 12 shows the display of the closed loop parameters divided into four sections: process, control, constants, and errors. Because the EPICURE database is available on the VAX, all the parameters may be appropriately named and scaled in engineering units. However, the C1080 module works with the data as the raw, unscaled numbers obtained from the multibus hardware. For the C1080's use, the process device and the control device are each identified by a pair of numbers: the device ID and the channel number. Figure 13 shows the correspondence between device ID and the type of multibus hardware.

PROCESS Section

This section displays parameters related to the process device, which is the device the user wants set to a particular value and then have maintained at that value. All the numerical values in this section are expressed in the engineering units of the process device.

Device Name
- the name of an EPICURE device which is located in the multibus crate to which the C1080 controller module is connected. The engineering units associated with this device are displayed either under or to the right of the name.

Reading
- the current reading value of the device

Setting
- the desired setpoint value

Dead Band
- the tolerance or acceptable difference between the reading and the setting. Whenever the calculated difference is less than or equal to the dead band, the PID algorithm is not executed and the setting of the control device is not changed.

Max Error
- some specified period of time has to elapse before the PID algorithm is again applied to the system. However, if the difference between the reading and the setting is greater than the maximum error value, the PID algorithm is executed to calculate a new control device setting independent of how much time has elapsed since the algorithm was last executed.

CONTROL Section

This section displays parameters related to the control device, which is the device the algorithm is setting in order to cause changes in the process device.

Device Name
- the name of an EPICURE device which is located in the multibus crate to which the C1080 controller module is connected. The engineering units associated with this device are displayed either under or to the right of the name. All the numerical values in this section are expressed in the engineering units of the control device.

Reading
- the current reading value of the device

Setting
- the setting value calculated by the PID algorithm

Calculated Correction
- the difference between the previous setting value and the current setting value

Min Step
- the minimum allowable correction in the setting of the control device. If the PID algorithm calculates a correction less than this minimum, the setting value of the control device is not changed.

Max Step
- the maximum allowable correction in the setting of the control device. If the PID algorithm calculates a correction greater than this value, the correction is set to this maximum value.

Min Pos
- if the algorithm calculates a new control setting less than this value, the control device is set to this minimum value.

Max Pos
- if the algorithm calculates a new control setting greater than this value, the control device is set to this maximum value.

CONSTANTS Section

This section displays parameters used either directly or indirectly in the calculations of the PID algorithm.

Loop Constants
- used in the PID equations

Process Constants
- estimates of the characteristics of the system under control. With the exception of the process delay, changing one or more of the PROCESS constants causes a recalculation of the LOOP constants.

ERRORS Section

This section displays the previous (0) and current (1) calculated process error, which is related to the difference between the process setpoint and the process reading. Also included in this section are two parameters related to when the PID algorithm is executed. If the PID closed loop algorithm is to be applied to the system defined by all the specified parameters, the STATUS field is ON. OFF indicates this particular closed loop is not being executed. The SAMPLING INTERVAL specifies the execution interval of this closed loop and is expressed in units of seconds. The smallest time interval possible is 0.001 seconds or 1 ms. However, probably very few meaningful changes in a cryogenic system occur within the time span of a few milliseconds. The maximum time interval possible is 99.999 seconds.

The C1080 Multibus Interface Module implements a series Dahlin PID control algorithm with dead time compensation. The implementation of this algorithm applies the derivative only to the process measurement according to the equation where the LaPlace variable s is approximated by the discrete equation where f is the delay function such that . This implementation also includes a filter parameter to provide a bound on the derivative mode response to the rate of change of the process variable, reducing the adverse effects of noise and the amplitude quantization effects of sampling.

PID Equations

Derivative Calculation

where

Process Error Calculation

where

Controller Output Calculation

if ( )

where

Equation Summary

Recalculation of PID Constants

A feature of the closed loop algorithm which has been implemented is the ability to calculate several of the constants used in the control equations based upon gain and timing estimates supplied by the user. The following parameters all relate to the characteristics of the process under control: When one or more of these values is changed, the C1080 module will recalculate the following PID constants using the sample time T:

Examples

If the derivative filtering and process delay elements are removed by making the following assignments then equations 1 through 4 become

Note that if the proportional gain Kc is now set to 0, the variable dM is always 0 and hence the controller output never changes.

Case 1

Using equations 5 through 8, let derivative time TD = 0 Then the equations become:

(5.1)

(6.1)

(7.1)

(8.1)

Case 2

Using equations 5 through 8, let integral time TI = 0. Then the equations become:

(5.2)

(6.2)

(7.2)

(8.2)

Case 3

Using equations 5 through 8, let Then the equations become:

(6.3)

(7.3)

(8.3)

Case 4

Using equations 5 through 8, let Then the equations become:

(5.4)

(6.4)

(7.4)

(8.4)

In this case, the change dM is closely proportional to the difference between the process setpoint R and the process reading C[k].

Case 5

Using equations 5 through 8, let Then the equations become:

(6.5)

(7.5)

(8.5)

In this case, the change dM is again closely proportional to the difference between the process setpoint R and the process reading C[k].

General

Multibus I/O Cards

Diagnostics

TEST Menu

Figure 1

Multibus I/O Card Addressing Offsets

(Present Configuration)

Offset  Type m                  Channels
------  ----                    --------

A/D Card 00h #1 0 - 31 08h #2 32 - 63

Actuator Card 10h #1 0 - 7 20h #2 8 - 15

Digital Card 30h #1 40h #2

50h Temperature Card 0 - 47

Base Address = B0000200h

Figure 2

Multibus I/O Card Addressing Offsets

(Enhanced Configuration)

Offset  Type                    Channels
------  ----                    --------

Actuator Card 10h #1 0 - 7 20h #2 8 - 15

Digital Card 30h #1 40h #2 50h #3

60h Temperature Card 0 - 47

A/D Card 80h #1 0 - 31 88h #2 32 - 63 90h #3 64 - 95 98h #4 96 - 127

Base Address = B0000200h

Figure 3

Actuator Card Register Layout

READ offset

0 = LOCAL/REMOTE status channel 0 in lsb, 1 => LOCAL

WRITE offsets

pulse count of 0 to 255 written to 0, 2, ..., E = actuators 0 to 7 (OPEN ) 1, 3, ..., F = actuators 0 to 7 (CLOSE)

Figure 4

Digital Card Register Layout

WRITE offsets
        0 = TTL latches  0 -  3   (n = 0)
        2                4 -  7   (n = 1)
        4                8 - 11   (n = 2)
        6               12 - 15   (n = 3)
                bit     when set to 1, writes   to latch #+4n, n = 0 - 3
                ---     ---------------------   ------------------------
                0       0                       3
                1       1                       3
                2       0                       2
                3       1                       2
                4       0                       1
                5       1                       1
                6       0                       0
                7       1                       0
        8 = latching ON/OFF relay 0, 1
                bit     when set to 1, writes   to relay
                ---     ---------------------   --------
                0       0                       1
                1       1                       1
                2       0                       0
                3       1                       0
        A = momentary ON relay 0 - 5
                bit     relay
                ---     -----
                0       5
                1       4
                2       3
                3       2
                4       1
                5       0
READ offsets
        0 = TTL latches 0 - 15 (channel 0 in msb 7, channel 7 in lsb 0)
        2

4 = latching relays 0 - 1

6 = digital status 0 - 39 (5 bytes, 40 bits) 8 A C E

Figure 5

Temperature Card Register Layout

WRITE offset

E = number of channel to read

READ offsets

first 24 channels: C = low byte A = high byte

second 24 channels: D = low byte B = high byte

Figure 6

A/D - D/A Card Register Layout

WRITE offsets

0 = number of A/D channel to read

4 = D/A output register 0 5

6 = D/A output register 1 7

READ offsets

1 = status register bit 7 = convert bit, where 1 => READY 2 = low byte of A/D data 3 = high byte of A/D data

Figure 7

Logical Device Channel and Parameter Table Entry Formats

ACTUATOR
--------

Channel Table Entry:

reading_AtoD A/D channel used to read position

Parameter Table Entry:

setting Requested position tolerance Tolerance max_step Size of maximum step step_delay Delay in ms between intermediate steps timeout Max time in ms to try moving the actuator min_out # of times out of tolerance before moving local_tracking New setting is value when turned online

COMPRESSOR STATUS -----------------

Channel Table Entry:

digital[10] digital status channels momentary_relay[3] Momentary relay channels

ENGINE ------

Channel Table Entry:

speed_AtoD A/D channel used to read engine speed DtoA D/A channel used for setting digital[8] digital status channels momentary_relay[3] Momentary relay channels

Parameter Table Entry:

setting requested position tolerance tolerance

Figure 8

Multibus Addressing Offsets of the Diagnostic Registers

Offset  Type
------  ----

A/D converter

E0h temperature E1h +12V E2h -12V E3h - 5V E4h + 5V

E8h serial number E9h R/W data register

Fanout loop back test (output byte 02h)

F0h SET test signal MBINH F1h CLR test signal MBINH

Multibus1 buffer loop back test (output byte 02h)

F2h SET test signal MBTST F3h CLR test signal MBTST

Base Address = B0000200h

Figure 9

HELP Menu

C1080> HELP
C1080 Version 1.08 (25-November-1992 17:00)
Valid Commands:
Command         Description
----------      ---------------------
help            Display help information for category n
version         Show version
cls             Clear screen
arcmap          Display ARCNET map
tclk            Display TCLK events
display m n;t r Display memory m to n
write m b;t     Write to memory
fill m n b;t r  Fill memory m to n with b
modify m;t      Modify memory
reboot          Warm restart
download        Download INTEL hex files
run m           Run loaded file
a/d             Show A/D reading        [f l r s]
digital         Show digital status     [f l r s]
relay           Show relay setting      [f l r s]
temp            Show temperature        [f l r s]
ttl             Show TTL setting        [f l r s]
act             Show actuator status    [f l r s]
d/a n v         Set D/A n to value v
set {a, m, l, t} n d c  Set n to dir d
pool s n        Pool switch
test s n        Debugging test case
C1080>

Figure 10

TEST Menu

C1080> TEST

Test Options: 1 Display AtoD [option] 2 Display temp [option] 3 Display multibus timeout counts 4 Reset statistics and error counts 5 Set interleave flag 6 Print timer 11 Test actuator 12 Print estimate of idle time 18 Test closed loop 19 Print messages 20 Specify process simulation parameters 21 Specify process load 22 Specify fake data for CAMAC reads 23 Test composition of status word for virtual device 24 Print online multibus cards 25 Set max number of A/D channels to pool each cycle 26 Modify scheduling 27 Multibus diagnostic A/D registers 28 C1080 fanout test - multibus inhibit loop back test 29 MB1BUF Loop back test - loop test on buffer card 30 test card accesses 31 initialize common to default values

C1080>

Figure 11

Diagnostic Counters

Null procedure count

Fault counts: parallel trace operation arithmetic reserved constraint protection type

Interrupt counts: null nmi

timeouts

temperature actuator digital

A/D conversion failures

Figure 12

Closed Loop Utility

Reading Screen Display

 ------------------------------------------------------------------------------
                         CRYO PID CONTROL
  EXIT    SAVE 
 
 Area: TS1           Multibus: 1           Loop:  00            Mode: COOLDOWN
 
 ------------------------------------------------------------------------------
 PROCESS:  TS1PDEW           | CONTROL: TS1EVJBBY                09:35:23
             PSIG            |            %OPN
 Reading:        .012        | Reading:    47.470       Calculated
 Setting:       4.999        | Setting:    47.469       Correction:      .000 
                             |
 Dead Band:      .249        | Min Step:     .999       Max Step        4.999
 Max Error:      .000        | Min Pos:      .000       Max Pos:       59.999
 ----------------------------+-------------------------------------------------
 PROCESS ERRORS:             | LOOP CONSTANTS:          PROCESS CONSTANTS:
                             |
 (0)     4.999               | Kc       .000            Kp        1.000
 (1)     4.999               | TI       .951            tau0       .300
                             | TD       .951            tau1      1.000
 Sampling Interval:  10.000  |  a       .100            tau2      2.000
            Status:     OFF  |  q       .716            Process Delay     0
 ------------------------------------------------------------------------------

Figure 13

Device IDs

ID #    Multibus Device
----    ---------------
1       A/D
2       temperature
3       TTL latch
4       latching relay
5       momentary relay
6       digital status
7       engine
8       actuator controller
9       compressor status

Distribution:  normal
               C. Drennan      M.S. 222
               R. Sanders      M.S. 219
               R. Schmitt      M.S. 219
               R. Stanek       M.S. 219
               P. Wheelwright  M.S. 219

Security, Privacy, Legal

rwest@fsus04.fnal.gov