Skip to main content

Building Control Logic in PMCE for the Bristol FB300 RTU

By NFM Consulting 4 min read

Key Takeaway

How to build control logic in PMCE for the Bristol FB300 — creating tasks, wiring function blocks, implementing pump control sequences, configuring PID loops, and building alarm management strategies for oilfield automation applications.

Quick Answer

PMCE builds control logic for the Bristol FB300 using function blocks wired together within tasks. The block library includes analog operations, logic gates, timers, PID controllers, flow calculators, and math functions — enough to implement most oilfield automation requirements without custom code.

Creating a Control Task

  1. In the PMCE Project Navigator, right-click on Tasks and select Add Task.
  2. Set the task name (e.g., PUMP_CTRL, ALARM_PROC, FLOW_CALC).
  3. Set the scan rate — how frequently this task executes:
    • 100–500 ms: Safety shutdown logic, fast control loops.
    • 1–5 seconds: Standard pump control, alarm processing.
    • 10–60 seconds: Flow calculations, logging, communication-bound operations.
  4. Set the priority — higher-priority tasks preempt lower-priority tasks on the FB300 processor.

Function Block Library

PMCE provides these key function block categories:

Analog Blocks

  • Analog Input (AI): Reads a physical channel with scaling and filtering.
  • Analog Output (AO): Drives an analog output channel (4–20 mA or 0–10 V).
  • Scale: Linear scaling with configurable input/output ranges.
  • Math: Add, subtract, multiply, divide, square root, and absolute value operations.
  • Select: High-select, low-select, and average of multiple analog values (for redundant transmitter voting).

Logic Blocks

  • AND, OR, NOT: Boolean logic gates.
  • Compare: Greater than, less than, equal, and within-range comparisons.
  • Latch (SR/RS): Set/reset flip-flop for latched alarms and interlock memory.
  • Sequence: Step-sequencer blocks for multi-step operations like pump startup sequences.

Timer and Counter Blocks

  • On-Delay Timer (TON): Output turns on after a delay (e.g., 30-second pump restart delay).
  • Off-Delay Timer (TOF): Output stays on for a period after the input turns off.
  • Retentive Timer: Accumulates run time across power cycles (for maintenance hour tracking).
  • Counter: Counts events (e.g., pump starts per day for equipment health monitoring).

PID Block

  • PID: Proportional-Integral-Derivative controller with configurable setpoint, gains, output limits, and anti-windup. Used for pressure regulation, level control, and temperature control.

Flow Calculation Blocks

  • AGA-3: Orifice flow calculation per AGA Report No. 3.
  • AGA-7: Turbine meter flow calculation.
  • AGA-8: Gas compressibility calculation.
  • Accumulator: Totalizes flow over configurable periods (hourly, daily, monthly).

Example: Pump Control Sequence

A common oilfield application — automatically controlling a transfer pump based on tank level:

Logic Design

// Pump Start Conditions (all must be true):
//   1. Tank level above LL setpoint (1.0 ft)
//   2. Discharge valve is OPEN
//   3. No active safety shutdown
//   4. Pump is not in cooldown timer

// Pump Stop Conditions (any one stops the pump):
//   1. Tank level reaches LL setpoint (dry-run protection)
//   2. Discharge valve closes
//   3. Safety shutdown triggered
//   4. Operator issues manual STOP command

// Restart Delay:
//   30-second on-delay timer after stop to prevent rapid cycling

Block Wiring in PMCE

  1. Create an Analog Input block for tank level (TK101_LVL).
  2. Create a Compare block that outputs TRUE when level is above the LL setpoint (1.0 ft).
  3. Create a Digital Input block for discharge valve status (VLV301_OPEN).
  4. Create an AND block combining: level above LL, valve open, no shutdown active, no cooldown timer active.
  5. Wire the AND output to an On-Delay Timer (30 seconds) to implement the restart delay.
  6. Wire the timer output to the Digital Output block for the pump start relay (PMP201_START).
  7. Create a separate OR block for stop conditions, and wire it to reset the pump start latch.

Example: PID Pressure Control

For maintaining a constant pipeline pressure using a control valve:

  1. Create an Analog Input block for the pressure transmitter (PIP401_PRESS).
  2. Create a PID block with:
    • Process Variable (PV): Wire to the pressure reading.
    • Setpoint (SP): The target pressure (e.g., 150 PSI), configurable from SCADA.
    • Proportional gain (Kp): Start with 1.0 and tune.
    • Integral time (Ti): Start with 60 seconds and tune.
    • Output limits: 0–100% to match the control valve range.
  3. Wire the PID output to an Analog Output block driving the 4–20 mA signal to the control valve positioner.
  4. Add anti-windup configuration to prevent integral accumulation when the output is saturated (fully open or fully closed).

Compilation and Debugging

  1. Compile the project — PMCE checks for errors including undefined block references, type mismatches between wired parameters, and resource limit violations.
  2. Review warnings — PMCE may warn about unused blocks, unconnected outputs, or scan-rate conflicts. Address all warnings before deploying to production hardware.
  3. Use online monitoring — after download, switch to online mode and step through the logic. Verify that each block's input/output values match expectations. Use the trending tool to plot analog values over time.
  4. Force testing — PMCE allows forcing individual digital inputs and analog values for testing logic without physical field signals. Always remove forces after testing.

Best Practices for Control Logic

  • Separate safety logic from control logic: Put safety shutdowns in a high-priority fast task. Put normal control in a standard-priority task. This ensures safety logic always executes even if the control task encounters an error.
  • Document every block: PMCE supports block comments — use them to explain why each piece of logic exists, not just what it does.
  • Limit task complexity: Keep each task focused on a specific function (pump control, alarm processing, flow calculation). This makes troubleshooting easier and prevents scan-rate overruns.
  • Use consistent naming: Follow the same naming conventions as your I/O points ([AREA]_[EQUIPMENT]_[PARAMETER]).

Frequently Asked Questions

Ready to Get Started?

Our engineers are ready to help with your automation project.