Structured Text Programming in Telepace Studio for SCADAPack
Key Takeaway
How to write Structured Text programs for SCADAPack RTUs — IEC 61131-3 syntax, data types, conditional logic, and oilfield automation examples.
Quick Answer
SCADAPack E and x70 series support IEC 61131-3 Structured Text through Telepace Studio. ST is preferred for complex calculations, gas flow algorithms, and multi-state sequencing that would be cumbersome in ladder diagram.
When to Use ST
- Gas flow calculations with AGA equations
- Multi-well production sequencers
- Complex alarm logic with multiple conditions
- Data table operations and statistical calculations
Syntax Examples
// Gas flow calculation
IF DiffPressure > 0.0 AND StaticPressure > 14.0 THEN
FlowRate := FlowCoeff * SQRT(DiffPressure * StaticPressure);
ELSE
FlowRate := 0.0;
END_IF;
// Multi-well sequencer
CASE WellStep OF
0: IF StartCommand THEN WellStep := 10; END_IF;
10: OpenValve[WellIndex] := TRUE;
IF ValveOpen[WellIndex] THEN WellStep := 20; END_IF;
20: StartPump := TRUE;
IF PumpRunning THEN WellStep := 30; END_IF;
30: IF StopCommand THEN WellStep := 40; END_IF;
40: StartPump := FALSE;
OpenValve[WellIndex] := FALSE;
WellStep := 0;
END_CASE;For cross-platform ST comparison, see Allen-Bradley ST and IDEC WindLDR ST.
Need help with scada & programming?
Texas-based licensed engineers — get a free, no-obligation assessment.
Frequently Asked Questions
Yes. SCADAPack E and x70 series support all IEC 61131-3 languages. Older 300/500 models have more limited support — verify against specific hardware and firmware.
Yes. Different POUs can use different languages within the same Telepace Studio project.
Still have questions about your setup? Talk to an engineer or call (210) 405-4248.