K-WANG

+086-15305925923
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 | 255 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)

  • SMC C96ST80-600 - Pneumatic Cylinder 80mm Bore 600 Stroke
  • MOORE INDUSTRIES AIM/IO/AI4/IP - Analog Input Module
  • IMAI ELECTRIC NBS-200S-2XSET - SMALL TRANSFORMER
  • FCI OEM-019469-04-02 - Flanged Inline Flow Transmitter
  • FAGOR EC-9PA-DQ1-M - CABLES NEW
  • FAGOR EC-9AM-MB - CABLES NEW
  • ATLAS COPCO LUM22 SR4 - Pneumatic Screwdriver
  • REXROTH HE751863 - VALVE NEW
  • SANYO SDNM-MCA - SERVO DRIVE
  • EGS WTC 303-1761 - TRANSFORMER
  • SQUARE D H362 - Heavy Duty Safety Switch
  • ALLEN BRADLEY 140G-J-FCX04 - Operating Mechanism 250A J Frame
  • GRACO 24E451 - Teach Pendant 120VDC NEW
  • RITTAL SK3125 - AIR/WATER HEAT EXCHANGER 5120BTU 115V/230V
  • FESTO DF00A - Guided Pneumatic Cylinder
  • SMC CDG1BA20-4050-H7B3-XC10 - Pneumatic Cylinder
  • FUJI FKCT33U5AXCYYAA - Differential Pressure Transmitter NEW
  • Allen Bradley 440E-A13082 - Guardmaster Rope Pull Accessory Kit (20m) NEW
  • LECO RT-120-A 1986 - Hardness Test Block Kit AS-IS
  • BALLUFF BCC A313-A313-30-345-VX43W6-300 - Industrial Connecting Cable BCC0HZ8 NEW
  • SIEMENS 6SN1162-0BA02-0AA2 - SINAMICS Cooling Fan Motor Assembly
  • GC VALVES S211YF02N1GJ5 - Solenoid Valve NEW
  • BALLUFF BNI EIP-302-105-R015 - DIGITAL I/O
  • STI RM-3-HA1 - MUTE MODULE
  • ALLEN BRADLEY 284-PWRM29A-M4 - ArmorConnect 3PH Pwr Media Shld Mtr Cbl NEW
  • BALLUFF BNI008A - LED STACK LIGHT
  • Grossenbacher LG-NR.50 70 73 - CIRCUIT BOARD NEW
  • Keyence XG-H1XA V3.1 - Vision System Software DVD NEW
  • IFM GM705S - Inductive Safety Sensor NEW
  • SIEMENS 3RK1207BQ40AA3 - Analog Input Module NEW
  • NACHI 32-O1O15457 - PCB-CONTROL BOARD
  • NACHI 30-OOO17198 - PCB CONTROL BOARD
  • PILZ PU3Z - Safety Control Power Supply / Safety Power Monitoring Unit NEW
  • ICC FR-A7N-ETH - Ethernet Multiprotocol Communication Interface NEW
  • KUKA ESC13 V1.60 A161.00.005.571 - Control PCB Board
  • SMC CP96SDB80-50C - Pneumatic Air Cylinder 80mm Bore 50mm Stroke
  • BRAD CONNECTIVITY 1300062619 - Minihange Cordset 5in 6 m NEW
  • REXNORD P3U239N - PILLOW BLOCK BEARING 2-7/16" BORE NEW
  • REXROTH 0083040 KE310 - Control Interface Module
  • FAG B7206-C-2RSD-T-P4S-UL - HIGH PRECISION BEARING NEW
  • MEMTRON 3512160 - OPERATOR INTERFACE PANEL
  • CUTLERAMMER DH361FGK - Heavy Duty Safety Switch
  • ALLEN BRADLEY 160-BA03PPS1P1 - AC Drive
  • SMC MDNBL50-50-D-A54SDPC - Pneumatic Cylinder
  • MISUMI HFTANK8-4040 - ANCHOR STANDS SET OF 2 NEW
  • ALLEN BRADLEY 442G-MABH-L - Guardmaster Handle Assembly NEW
  • ALLEN BRADLEY 442G-MABH-R - Guardmaster Handle Assembly NEW
  • HARDINGE T18 58 - RECESS TOOL NEW
  • MITSUBISHI 0SA105S5A - ABSOLUTE POSITION ENCODER
  • FANUC A20B-8101-0550 - PC BOARD COMMUNICATION INTERFACE MODULE
  • FESTO EMMB-AS-60-04-S30S - SERVO MOTOR
  • SIEMENS 6AV2123-2JB03-0AX0 - KTP900 Basic HMI Touch Panel
  • BALLUFF BCC A314-A314-30-304-VX44W6-250 - Industrial Connecting Cable BCC0CE3 NEW
  • SIEMENS 6SL3130-6AE15-0AB1 - SINAMICS Smart Line Module 5kW
  • SIEMENS 6FX8002-2EQ10-1BF0 - Signal Cable (15m) NEW
  • SMC AMG550C10D - Water Separator 1" NPT NEW
  • MINARIK DRIVES MM23002D - DC Motor Speed Control NEW
  • SMC AMG550C-N10D - Water Separator 1" NPT NEW
  • PROACE 28800452 - Operator Interface HMI
  • GEHRING 254000 - Industrial Control Interface Module - Missing Terminal
  • GEHRING 254000 - Industrial Control Interface Module - Missing Terminals
  • SIEMENS 3RT1044-1QB44-3MA0 - Contactor 24V NEW
  • SMC CDQ2B50-25DZ-J79W-111G - COMPACT CYLINDER NEW
  • TURCK FDNL-CSG88-W - DeviceNet I/O Block 8-Port Field Module NEW
  • BOSCH REXROTH R900773654 4WE10D40/CW110N9DAL - Directional Control Valve
  • GOULD 68173 - Power Distribution Block 3 Pole 600V CU ONLY NEW
  • INSTRON 2512-228 - Compression Load Cell 100 lb / 500 N
  • RITTAL SZ 4138.350 - Enclosure System Light 230V 30W NEW
  • BALLUFF BNI00CJ - IO-LINK SENSOR ACTUATOR HUB NEW
  • Cutlerammer DH362FGK - Heavy Duty Safety Switch
  • SMC CA2F63TF-400Z - Pneumatic Air Cylinder NEW
  • FCI OEM-019868-04-02 - FLOW SWITCH STAINLESS SENSOR
  • RADEROGEL 5450 0325 00 - Polyurethane Wheel 10" Dia w/Cast Iron Hub - NEW
  • LAMINA G516325UG - NAAMS Guide Pin 63mm x 250mm Unground
  • GEHRING 254000 - Industrial Control Interface Module
  • CINCINNATI MILACRON 3-424-1954A - Blower Unit
  • TURCK FDNP-50808G-TT - DeviceNet I/O Module 8DI 8DO 0.5A NEW
  • EASOM ES-5008-12-DC-024 - Digi-Dog Programmable Limit Switch
  • ALLEN BRADLEY 140G-H2F3-C80 - Molded Case Circuit Breaker 400V 80A Ser. A NEW
  • AUTOMATION SYSTEMS INTERCONNECT P7007-ASI - Safety Foot Switch NEW (Lot of 2)
  • BAHCO COBRA 38517.9/8 - Bandsaw Blade 153 in NEW
  • NSK LY350595BLC2W03P44 - LINEAR GUIDE NEW
  • KEYARROW F46295001-HT03-A5 - CNC Machine Cover
  • INSTRON 2512-144 - TENSION LOAD CELL NEW
  • TELEMECANIQUE GS1U - Fused Switchisconnector
  • SMC TU0805BU-100 - POLYURETHANE TUBING 100M NEW
  • SIEMENS 6SL3210-5HE11-5UF0 - SINAMICS S210 SERVO DRIVE
  • FANUC A20B900161/04A - Flash Memory Module
  • REXROTH INTERBUS-S - SENSORS NEW
  • ANDERSON GREENWOOD CROSBY 951200FFA-P - PILOT OPERATED SAFETY RELIEF VALVE
  • SMC C96SB80-80C - Pneumatic Air Cylinder 80mm Bore 80mm Stroke
  • ATLAS COPCO 4220 1566 80 - Factory Repaired Motor NEW
  • Allen Bradley 440E-D2NNNYS - Guardmaster Lifeline 3 Rope Pull Switch NEW
  • ABB DSQC30 3E 041456 - Robot Control Board
  • SMC CP96SDB1000C - ISO 15552 Pneumatic Cylinder 100mm Bore 50mm Stroke NEW
  • GLOBAL CNC 523032 - 1/4" ID Dual Coolant VDI Static Tool Holder NEW
  • OHM ELECTRIC OC-15 - BOXFAN
  • OMEGA RD202 - CHART ENCODER
  • FANUC A16B-2203-0370 /07C - PCB - Power Supply Unit
  • FANUC A20B-8002-0050/01A - PCB - Genius I/F Module
  • SUPERFLEX 20638/CBL - FLEXIBLE MULTI-CONDUCTOR CABLE
  • SIEMENS CU320P - Sinamics Control Unit PROFIBUS
  • NORDSON 7022004 - DISPENSE VALVEMATE 8000 CONTROLLER
  • OKUMA 1911-3380-0847001 - PLC POWER CONTROLLER MODULE
  • ABB NAMU1C 64702475D - AUXILIARY MEASURING UNIT
  • HONEYWELL 24CE1 - Limit Switch NEW
  • YASKAWA SGDA-08ASP - SERVO CONTROL NEW WITH BOX
  • PARKER WDHC-H-SD50-248-YF2P-03YB165 - PNEUMATIC CYLINDER
  • SANYO SDN-DR1-025 - SERVO DRIVE
  • SMC C96SDB80-25C - ISO Pneumatic Cylinder 80mm Bore 25mm Stroke
  • SMARTEYE SP1056/01 - Infrared Sensor Emitter
  • SMC CNA23DA - 63m Power Lock Cylinder
  • CUTLERAMMER 1492D96G11 - Motor Circuit Protector
  • ELECTRO-MATIC EMRP30014-E30 - Remote Port Access Panel NEW
  • ATHENA T2000-J-S-316-4-G-24-75-0 - Probe
  • PRO-FACE GP577R-TC41-24VP - 10.5 Inch Color TFT HMI Operator Panel
  • DOMINO EPT064422 - Print Head Mount Kit NEW
  • FANUC A06B-0532-B001#7000 - SERVO MOTOR
  • Rexroth 0 608 750 109-GB1 VM310 - Power Module
  • FANUC CFDA-0WPB-0030-AAB - CABLES NEW
  • ALLEN BRADLEY 280-PWRM35A-M10 - POWER CABLE
  • FANUC A16B-3200-0412/03A - Control Module Board
  • BALLUFF BCC A314-A314-30-304-VX44W6-300 - Industrial Connecting Cable BCC0CEE NEW
  • Adept Technology 20000-310 - CX Robot Motion SmartController
  • ADVANCE 71A8473-001D - 400W HPS Ballast Kit 120-277V NEW
  • SMC NCA1F250400 - Heavyuty Pneumatic Cylinder NEW
  • IAI SCON-CB-100WAI-EP-0-2-SP - POSITION CONTROLLER
  • MURR ELEKTRONIK MVK+MPNIO DI8 DO8 IRT - PROFINET I/O Module