Logic Equation Examples

The following examples show how to implement custom logic requirements using the logic equations and timer variables.

Example: Allow Transmitting While Antenna Is Stopped

Suppose that an operational site requires that the radar transmitter be switched off when the antenna is not rotating. This is fine for normal operation, but during maintenance periods there must also be a procedure to allow transmitting while stopped.

When such an override is requested, an audible warning and flashing light must first occur for 20 seconds; only then does the override actually take effect. At that point the horn becomes silent, but the warning light must continue to flash for the duration of the override.

An RCP8 external status input line S0 is used to request the override. Assume that control line C0 activates the horn, and that C1 activates the warning light. The necessary equations are:

EQ00: v0 = cradiate & antstop & s0
EQ01: t0_retard_20 = v0
EQ02: c0 = v0 & !t0_retard_20
EQ03: c1 = v0 & t1_clock_1.5
EQ04: cradiate = (cradiate & !antstop) | t0_retard_20
  1. EQ00 assigns local variable V0 as a qualified override request.

    V0 is TRUE when there is a request to radiate while stopped, and when the external override request line is also TRUE.

  2. EQ03 combines this condition with a 1.5-second periodic clock to produce the flashing light.

    Meanwhile, EQ01 passes V0 through a 20-second "retard" timer.

  3. When the timer output eventually becomes TRUE, EQ04 allows the transmitter to radiate even though the antenna is stopped.

    Meanwhile, EQ02 sounds the horn only during the timer's initial 20-second delay period.

  4. As soon as the antenna starts moving, V0 and the timer output immediately become FALSE.

    The horn and light are extinguished right away, and the override input is ignored. The first & expression in EQ04 then allows the transmitter to be controlled in the normal On/Off manner.

Example: Control Signals

Logic equations can help supply the necessary control signals for getting out of stuck situations. In this example, an antenna servo power unit requires override signals to move away from the low and high elevation physical limit switches. Assume that C0 and C1 enable motion in the up and down directions.

The following equations allow the reset command to activate these lines briefly:

EQ00: c0 = antstop & unsafe & elimlo
EQ01: c1 = antstop & unsafe & elimhi

The unsafe status variable is TRUE for a short interval of time following an RCP8 reset.

Resets from the host computer serial port always give a 1.0-second unsafe interval.

Resets from the RCP8 command line take the number of seconds as an argument, for example, reset 2.5. The antstop test is added as an additional safeguard to insure that the antenna is motionless when the override is attempted.

Example: BITE Information

Logic equations can be used to supply the host computer with BITE information that would not ordinarily be available. To do so, make an assignment to one of the first 14 local variables, as those are then be transmitted in RCP8's Internal BITE Packet. For example, adding the equation:

EQ00: v13 = ovel_az | ovel_el

sends send a "velocity overspeed" bit to the host computer in Bit #6 of Byte #12 (See Internal BITE Packet for the mapping of the local variable bits).

Example: Variable Assignments

When writing sets of logic equations for RCP8, note that assignments to most types of variables cannot be referenced as such on subsequent lines. When control and status variables appear on the right side of an equation, they always refer to their original requested value. Assignments made on the left modify the variable's effective working value and the original requested value still remains unchanged. This is why it is never correct to make more than one assignment to the same control or status variable, and why the pair of equations:

EQ00: cpw0 = cpw1
EQ01: cpw1 = cpw0

would swap the two pulse width control lines without using the temporary intermediate variable that would normally be required for sequential assignments. The only variables that can be referenced immediately after being assigned are the local variables V[0:15]. Thus, the pair of equations:

EQ00: v0 = v1
EQ01: v1 = v0

would not swap the 2 local variables, but instead, would leave both set to the original value of V1 (probably not useful).

Example: Trigger Blanking Variables

As an example of how the trigger blanking variables might be used, consider a hypothetical farmhouse that is close enough to the radar that if the antenna is pointing at it, and the antenna is stationary, we would exceed the allowable microwave radiation limit. However, we are also allowed to average the power exposure over longer periods, so that if the antenna is moving we can radiate at the farmhouse as we sweep past it. We don't want to inhibit the trigger when the antenna stops; only when it stops within one of the protected sectors.

In sum, we want to stop transmitting while the antenna is stationary and is within one of the designated sectors, but we also want the radar to transmit when the antenna is moving. This is accomplished using the equation:

EQ00: TRIG_NORMAL = !ANTSTOP

For a related application in which we want to stop transmitting when the antenna becomes stationary, use:

EQ00: TRIG_BLANK = ANTSTOP

Note that the built-in timers could also be used to permit brief antenna stoppings without producing the trigger side effects immediately.