+086-15305925923

K-WANG

Service expert in industrial control field!
NameDescriptionContent
Adequate Inventory, Timely Service
pursuit of excellence 
Ship control system
Equipment control system
Power monitoring system
Current position:
新闻动态
newS
   
Brand

Reliance Electric DCS 5000 Enhanced BASIC Programming Language

From: | Author:Wang | Time :2026-02-05 | 123 visit: | 🔊 Click to read aloud ❚❚ | Share:

Reliance Electric DCS 5000 Enhanced BASIC Programming Language

Reliance Electric DCS 5000 Enhanced BASIC is a programming language suitable for industrial real-time control scenarios. Based on standard BASIC extensions, it supports 5 types of variables (single precision integer/double precision integer/real/boolean/string), multitasking concurrent execution, hardware/software event synchronization, and multi protocol I/O communication (Modbus/Allen Bradley, etc.), providing 34 built-in functions such as arithmetic/string/bit operations. It requires defining global variables and I/O mapping through configuration tasks, implementing control logic through application tasks, and supporting complete error handling mechanisms and version compatibility explanations. Its core is used for industrial equipment control and data processing in DCS 5000 systems.


Basic language characteristics

Program Structure Specification

Line format: Must start with a unique line number from 1-32767, and end the statement with a carriage return ([CR])

Multilingual sentence line: Separate multiple statements with a back slash () or colon (:), with only one line number

Multi line statement: Wrap with&at the end, indent the following lines to improve readability

Annotation method: REM (compile time discard)! (Download with program, supports multiple lines)

Variable system | Variable type | Identification suffix | Value range | Core characteristics|

|Single precision integer |% | -32768~+32767 | 16 bit storage, automatic truncation of decimals|

|Double precision integer |! |-2147483648~+2147483647 | 32-bit storage, internal calculation default dual precision|

|Real number | None | ± 5.42 × 10 ⁻² ⁰~± 9.22 × 10 ¹⁸ | 8 significant digits, supports exponential representation (* *)|

|Boolean | @ | TRUE (1)/FALSE (0) | Variable name up to 7 characters (PC task limit)|

|String | $| Maximum length of 31 characters (variable)/132 characters (expression) | Supports concatenation (+), truncation, and other operations|

|Array | None | Up to 4 dimensions, subscripts 0~32767 | String array elements fixed at 32 bytes per element|


Task and Variable Definition

Task classification and responsibilities

Configuration task: Unique global configuration, defining I/O mappings such as TASK (task type/priority/slot), COMMON/NVEMDEF (global variables), IODEF, etc., requiring priority loading

Application task: Implement specific control logic, define local variables (including arrays and adjustable variables) through LOCAL, and COMMON references global variables

Adjustable variable configuration

Format: LOCAL variable name [CURRENT=initial value, HI=maximum value, LOW=minimum value, STEP=step size]

Restriction: Readable only, cannot be used as an lvalue assignment statement, for runtime adjustable parameters

I/O Definition Statement | Statement | Purpose | Key Parameters|

|IODEF | Local/Foreign I/O | Address=Hexadecimal Address, SLOT=Slot Number|

|NETDEF | Network chassis I/O | DROP=Slave number, REGIST=Register number|

|RIODEF | Remote I/O | MASTER_SLOT=Master Station Slot, DROP=Remote Chassis Number|

|MODDEF | Modbus I/O | Register=30001-31024 (integer), 1-4096 (boolean)|

|ABDEF | Allen Bradley I/O | FILE=B0/B1 (binary), N0/N1 (integer)|

Core statement function

Control flow statement

Jump statements: GOTO (direct jump), GOSUB/RETURN (subroutine call), ON GOTO/ON GOSUB (conditional jump)

Conditional statement: IF-THEN (supports Boolean/relational expressions, can jump or execute multiple statements)

Loop statement: FOR-NEXT (supports STEP step size, unlimited nesting layers, prohibits jumping into loops)

Multi tasking and real-time statements

Event synchronization: EVENT (defining hardware/software events), SET (triggering events), WAIT ON (waiting for events)

Task communication: OPEN CHANNEL (create inter task channel), PRIMT #/INPUT # (channel data transmission)

Real time control: DELAY n TICKS/ECONDS (delay, 1TICK=5.5ms), START EVERY (periodic execution)

I/O operation statement

Device I/O: OPEN "PORTA/PORTB" (serial port configuration), PRIMT/INPUT (data read/write), GET/PUT (single character operation)

Foreign I/O: IOURITE (options, data, address), IOREAD% (options, address), supports byte/double byte/word operations

Data blocks: READ/DATA (predefined data read), ROSE (reset data pointer)


Built in function classification

Mathematical functions: SIN/COS/TAN (trigonometric function, radians), LN/EXP (logarithmic/exponential), SQRT (square root, negative prohibited), ABS (absolute value)

String functions: CHR/RIGHT

/MID

(String truncation), LEN% (length), STR $/VAL/VAL% (numeric string conversion)

Bit operation functions: BIT_SET @/BIT_CLR @ (bit detection), BITVNet @ (bit modification), SHIFTL%/SHIFTR% (logical shift), ROTATEL%/ROTATER% (cyclic shift)

Special functions: BCD_IN%/BCD_OUT% (BCD to decimal conversion), BLOCKVNet @ (block transfer, supporting 32767 registers), GATEWAY_CMD-OK @ (gateway communication)


Error handling and compatibility

Error types and handling

Error codes: Compilation error (356-561), runtime error (756-895), fatal error (31, 40-4F)

Processing mechanism: ON ERROR GOTO line number (defines error handler), RESUME (resumes execution)

Predefined variables: ERR% (error code), ERL% (error line number), VNet @ (control INPUT prompt)

Version compatibility differences

V2 → V3: Added TASK statement required, reserved characters cannot be used as variable names, added predefined variables such as ERR%

V3 → V4: Added ABDEF statement, supports hardware event timeout disable (TIMEOUT=Disabled)

  • Metso NP704/B1S1A - Neles Pneumatic Valve Positioner
  • Metso ND9103HU2 - Valve Controller Positioner
  • Metso ND9203HE2-KA3 - Electro Pneumatic Positioner
  • Metso NP724/J30 - Neles Valve Positioner
  • Metso M2 SMART PULP - Consistency Transmitter
  • Metso T00162 - Smart-Pulp Consistency Transmitter
  • Metso K4246-A 1275 - Crown Gear
  • Metso MAC24726 N74525064 - Housing
  • Metso NE724A Straight stroke - Intelligent Valve Positioner
  • Metso NE726A - Intelligent Valve Positioner
  • Metso A413016 - NCU Network Control Unit
  • Metso B1JVU8/35L - Pneumatic Actuator
  • Metso A413310 - Power Supply Unit
  • Metso ND9103HU-K - Intelligent Valve Controller
  • Metso ND9103HUT-DS02 - ND9000 Digital Positioner
  • Metso NE726/S1 - Pneumatic Valve Positioner
  • Metso BB01/BD01 D200625 - Automation Module
  • Metso NDX2512HG-NNON 0000 - Intelligence Valve Positioner
  • Metso FPU - Power Supply Unit
  • Metso XZB10025-013T1 2 - Hydraulic Valve
  • Metso XZB10276-001T1 2 - Hydraulic Valve
  • Metso D100789 - IPU2 Power Unit
  • Metso D200137 - Power Supply Module
  • Metso D200175 - Personality Module
  • Metso T00161 - Smart-Pulp Consistency Transmitter
  • Metso A413240 - Automation Module
  • Metso 7041871500 - Gear Wheel
  • Metso NE724A - Pneumatic Valve Positioner
  • Metso PULP-EL-LL2W - Automation Module
  • Metso MM0237480 - Mechanical Part
  • Metso A413160 - Automation Module
  • Metso APL 3037138 - Pneumatic Cylinder
  • Metso A413082 Ver.08 - CPU Module
  • Metso RAA040AS - Control Valve Actuator
  • Metso NP724/S1 - Pneumatic Valve Positioner
  • Metso GP300 292721 - Mantle Clamping Nut
  • Metso MBM80 - Digital Input Output Module
  • Metso K17584 - Valmet Bridge Component
  • Metso A418183 - IQ Web Color Spectrophotometer
  • Metso NP727/S1 - Pneumatic Valve Positioner
  • Metso AIU 8H A413186 - Analog Input Unit Board
  • Metso IOP351 - Controller Module
  • Metso A413211 - Communication Module
  • Metso A413075 - Field Bus Controller Module
  • Metso 1763 L-SIZE - Bronze Bushing
  • Metso BICU17/55L - 4" Valve Actuator
  • Metso X820-21PA-001N 12 - Hydraulic Valve
  • Metso 9650967800 - Valve Cartridge
  • Metso 917256 - Piping Component
  • Metso A413340 - Automation Module
  • Metso TCU (MCA) Display - Consistency Transmitter Unit
  • Metso A413005 - Valmet CPU Module
  • Metso A413187 - Automation Module
  • Metso SA70295M - Mechanical Component
  • Metso ND7203HE1T - Intelligent Valve Positioner
  • Metso A413000 - CPU Module
  • Metso ND9103HU2T - Valve Controller
  • Metso ND9106HX - Intelligent Valve Controller
  • Metso A413084 Ver.08 - CPU Module
  • Metso MBI8 - 8-Slot PLC Chassis
  • Metso A418134 - IQ Web Caliper Photoelectric Sensor Head
  • Metso ND7000 - Valve Locator
  • Metso A413345 - Power Supply Unit
  • Metso 3/4-4CBSTGR360 0XTB2KU - Hardware Package
  • Metso A413381 - SCSI Unit with HDD
  • Metso RECA1HCJJST - Neles V-port Control Valve
  • Metso R1LA02TTTU - Titanium Pneumatic Wafer V-port Valve
  • Metso ACN MR D202210L - Process Controller
  • Metso ADA7532-D20110 7-4 - FPUS2 Back Up Power Supply
  • Metso NE724/S1 - Electro-pneumatic Valve Positioner
  • Metso Slurry Pump 15 HP - 480V Refurbished Pump
  • Metso ND9106HN - Valve Locator
  • Metso ND9103HN - Valve Locator
  • Metso 815W1122HBXZ - Jamesbury 3” Valve with Actuator
  • Metso QPX1C/MC - Pneumatic Actuator
  • Metso HAN-20 9657552900 - Moog Amplifier Card
  • Metso A4730024 - Smart-Pulp RDU Consistency Transmitter
  • Metso A419319 - Actuator Controller Card
  • Metso PDP601 181585 - Distributed Processing Unit
  • Metso PDP603 181585 - Distributed Processing Unit
  • Metso A4290039C 29DK-3 - Kajaani Module
  • Metso RE0-02CJJST+T10 - Electric Actuator with Jamesbury Valve
  • Metso RECA01CJJST+T10 - Valvcon Electric Actuator
  • Metso 8.50E+11 - Protection Plate
  • Metso A413077 - Field Bus Controller Board
  • Metso HH16 471196B - Main Control Board
  • Metso 1064666524 - Fulcrum Bar
  • Metso XWB10003-000T1 2 - Moog Hydraulic Valve
  • Metso FC1HDWGAS6XKSG - Quadra-powr II Control Valve
  • Metso PV50-360-3004 - Valmet Rotary Actuator
  • Metso QPX1C/K15 - Pneumatic Actuator
  • Metso REDA01DJJST - Segmented Ball Valve
  • Metso QPX3C/MC - Pneumatic Actuator
  • Metso TCU (MCA) OUL00241 - Consistency Analyzer Transmitter
  • Metso FGV2001 - Automation Component
  • Metso XT02CWGAJ2SJGA - Flanged Ball Valve
  • Metso A413370 - Ethernet SCSI Unit
  • Metso 3/4-4CBSTGR360 0XTB2 - Valvcon Hardware
  • Metso A413345 - FPUS Power Unit
  • Metso B-40S0947 - Duff Norton Worm Gear Actuator
  • ibaPADU-S-IT-2x16 Central Unit | Industrial Data Acquisition Interface Module
  • ibaPADU-S-CM Modular Data Acquisition System | High-Performance Industrial Data Logging
  • ibaM-4AI-UI 4-Channel Universal Analog Input Module
  • ibaM-4AI-600V-AC Analog Input Module High Voltage 600V Measurement
  • ibaM-FO-2IO Fiber Optic Digital I/O Interface Module
  • ibaM-4AI-150V-AC Analog Input Module High Voltage Data Acquisition
  • ibaM-COM Communication Module Maintenance and Industrial Interface System
  • ibaM-DAQ Processor Module Industrial Data Acquisition System
  • SAMSUNG SSAS-PRO RSPC-X32 Alarm and Monitoring System Module
  • ABB TC512V1 Communication Module 3BSE018059R1
  • ABB DO880-1 Digital Output Module for Industrial Automation
  • ABB UNS0122A-P Automation Interface Module
  • ABB XXD129A01 Digital Control Module
  • ABB UNS0119A-P V101 Control Interface Module
  • ABB UCD240A101 Universal Control Module for Advanced Automation
  • ABB AM801F Analog Input Module for Industrial Automation
  • ABB EI802F Ethernet Communication Module
  • ABB SD802F Power Supply Module
  • ABB TC820-1 Control Module
  • ABB PM820-1 Processor Module
  • ABB PPC902CE101 Control Processor Module
  • ALSTOM AL129A CD101152 Control Module Industrial Automation System
  • UniOP ETOP306 - Graphic Touch Screen
  • UniOP ETOP12-0050 - Industrial HMI Screen
  • Uniop eTOP507 eTOP507U3P3 eTOP507U2P3 - High Res Touch Panel
  • Uniop ETOP03-0045 - Compact Operator Panel
  • UniOP ETOP507U3P3 - Advanced Touch Interface
  • UniOP eTOP20B-0045 - Industrial Graphic Display