Background Process Service Extension
Open-Source Repository
Overview
The Background Process Service plugin is a universal service plugin that provides background I/O signal processing functionality for Agilebot robots. The plugin enables monitoring, configuration, and control of robot I/O signals and registers through a web interface, supports visual graphical programming, and runs continuously in the robot controller without affecting the main robot program.
This plugin supports complex logic scenarios such as signal-triggered signals, signal-triggered register operations, and data transfer between registers. Through a block-based visual programming interface, it lowers the user threshold and improves development efficiency.
SDK Version Compatibility
This plugin is developed using PYTHON_v2.0.0.0. Please ensure your robot system environment is compatible with this version.
Packaging Instructions
After plugin development is complete, you need to use the Agilebot plugin packaging tool for packaging. For detailed packaging and installation instructions, please refer to:
Packaging and Installation Documentation
Feature List
The plugin provides the following core features:
- Real-time I/O Signal Monitoring - Real-time monitoring of digital input/output signal status
- Register Operations - Supports read/write and arithmetic operations for R, MH, MI registers
- Background Program Management - Create, edit, delete, and copy background programs
- Program Import/Export - Supports program configuration import/export (Web mode/USB mode)
- System Configuration Management - System parameter configuration such as debounce filtering and signal subscription period
- Real-time Status Monitoring - Real-time display of system logs, performance monitoring, and program running status
- Multi-language Support - Supports Chinese, English, Vietnamese, and Japanese interface and log translation
- Enhanced Visual Programming Blocks - Combined triggers/conditions (AND/OR, nestable): Signal edges, levels, registers, robot modes, and program status are all boolean blocks that can be combined with logic AND/OR
Detailed Feature Description
1. Real-time I/O Signal Monitoring
Real-time monitoring of input signals from external devices such as sensors, buttons, limit switches, photoelectric switches, and output signal status.
Features:
- Automatically obtains all configured IO signals from the robot
- Subscribes to all signal status at configured intervals
- Real-time display of signal status (green=active, gray=inactive)
- Supports digital input (DI) and digital output (DO)
Interface Location:
- Navigation menu: I/O Signals
- Input signal area: Grid layout displaying all DI signals
- Output signal area: Grid layout displaying all DO signals
2. Register Operations
Supports read/write and arithmetic operations on various robot registers, including numeric registers, position registers, and string registers.
Supported Register Types:
- R Register: Floating-point numeric register (read/write, arithmetic)
- MH Register: Integer register (read/write, arithmetic)
- MI Register: Integer register (read/write, arithmetic)
Operation Types:
- Read: Read current register value
- Write: Set register to specified value
- Arithmetic: Addition, subtraction, multiplication, division
- Transfer: Copy value from one register to another
4. Background Program Management
Create, edit, delete, and copy background programs, supporting program list management and program status control.
Features:
- Program List: Displays all saved background programs
- Shows program name, status, last modified time
- Supports program search (filter by name)
- Sorted by last modified time (most recently modified first)
- Program Operations:
- New Program: Create new background program
- Edit Program: Modify existing program
- Delete Program: Delete unwanted program
- Copy Program: Copy existing program to create duplicate
- Program Status:
- Running: Program is executing
- Stopped: Program has stopped
- Program Grid: Overview page displays up to 9 active programs
- Shows program name, running status, cycle time
- Supports individual program start/stop
- Supports multi-select batch operations
Interface Location:
- Navigation menu: Background Programs
- Program list: Displays all saved programs
- Program grid: Overview page shows active program running status
4. Program Import/Export
Supports program configuration import/export functionality for convenient program backup, migration, and sharing.
Export Function:
- Web Mode (PC/Collaborative Robot):
- Select programs to export (check boxes)
- Click "Export" button
- Browser automatically downloads zip compressed file
- USB Mode (Industrial Robot Teach Pendant):
- Select programs to export (check boxes)
- Click "Export" button
- Programs automatically saved to USB
/mnt/udisk/background_programs/directory
Import Function:
- Web Mode (PC/Collaborative Robot):
- Click "Import" button
- Select zip file to upload
- System automatically detects conflicts and prompts for handling method
- USB Mode (Industrial Robot Teach Pendant):
- Click "Import" button
- Select zip file from USB file list
- System automatically detects conflicts and prompts for handling method
Conflict Handling: When importing, if duplicate program names are detected, the system displays a conflict dialog, providing three handling methods for each conflict:
- Skip: Do not import this program, keep existing program
- Overwrite: Overwrite existing program with imported program
- Rename: Automatically rename to
OriginalName_1,OriginalName_2, etc. (automatically finds available number)
5. System Configuration Management
Manages system parameter configuration, including debounce filtering, signal subscription period, and other settings.
System Parameters:
- Debounce Filtering: Signal debounce delay time (0-1000ms)
- Default: 50ms
- Minimum: 0ms (no debounce)
- Maximum: 1000ms
- Signal Subscription Period: Signal status subscription period (30-1000ms)
- Default: 50ms
- Minimum: 30ms
- Maximum: 1000ms
Configuration Method:
- Enter "System Settings" page
- Adjust parameter sliders or input boxes
- Click "Save Parameters" button to save configuration
- Configuration automatically saved to
data/config/system.jsonfile
6. Real-time Status Monitoring
Real-time display of system running status, log information, performance monitoring data, and program running status.
System Logs:
- Real-time display of system startup logs, rule execution logs, errors and warnings
- Terminal-style display (dark background, green text)
- Automatically saved to local log files (
data/logs/directory) - Supports log rotation (single file max 10MB, folder max 100MB)
Performance Monitoring:
- CPU usage (backend process)
- Memory usage (backend process)
- Real-time update display
Program Running Status:
- Displays running status of up to 9 active programs
- Each program shows: program name, running status, cycle time
- Supports individual program start/stop operations
- Supports multi-select batch operations
Interface Location:
- Navigation menu: Overview
- System log area: Real-time log display
- Performance monitoring area: CPU and memory usage
- Active program running status area: 9-grid layout
7. Multi-language Support
The plugin supports multi-language interface and log translation functionality, providing a better internationalization experience.
Supported Languages:
- 中文(简体) - Chinese (Simplified) - Default
- English - English
- Tiếng Việt - Vietnamese
- 日本語 - Japanese
Features:
- Interface Multi-language:
- All UI elements (buttons, labels, menus, etc.) support multi-language switching
- Blockly visual programming blocks support multi-language
- Dynamic content such as event logs and program lists support multi-language
- Log Translation:
- System logs support backend translation, displaying translated logs according to user-selected language
- Local log files remain in Chinese for technical staff reference
- Real-time log push automatically translates according to user language preference
- Historical log queries support language parameters
Usage:
- Click the language switch button (globe icon) in the upper right corner of the interface
- Select target language from dropdown menu
- Interface and logs automatically switch to selected language
Typical Use Cases
Scenario 1: Signal Triggers Signal
When one or more input signals are received, immediately output one or more signals.
Example:
- When safety door opens (DI_1=ON), immediately turn off output (DO_1=OFF)
- When start button pressed (DI_2 rising edge), turn on indicator light (DO_2=ON)
Implementation:
- Create background program
- Set trigger condition: DI_1=ON or DI_2 rising edge
- Set action: DO_1=OFF or DO_2=ON
- Save and start program
Scenario 2: Signal Triggers Register Operation
When a signal is received, perform numeric operations on registers.
Example:
- When counting signal received (DI_2 rising edge), increment counter register (MR_1) by 1
- When reset signal received (DI_3=ON), set position register (PR_1) to initial value
Implementation:
- Create background program
- Set trigger condition: DI_2 rising edge or DI_3=ON
- Set action: MR_1 = MR_1 + 1 or PR_1 = initial value
- Save and start program
Scenario 3: Register Data Transfer
When signal triggers, read value from one register and write to another register.
Example:
- When sync signal received (DI_4 rising edge), copy R[1] value to R[2]
Implementation:
- Create background program
- Set trigger condition: DI_4 rising edge
- Set action: R[2] = R[1]
- Save and start program
Scenario 4: Composite Logic Judgment
Execute actions after multiple signal combination judgment.
Example:
- When DI_1=ON and DI_2=OFF, execute register operation and signal output
Implementation:
- Create background program
- Set trigger condition: DI_1=ON and DI_2=OFF
- Set action sequence: register operation + signal output
- Save and start program
Notes
SDK Connection:
- Ensure robot controller is started and can connect
- SDK connection automatically reconnects when disconnected
- Connection failures are logged in system error logs
Program Quantity Limit:
- Maximum 9 background programs running simultaneously
- No limit on total number of programs
File Storage:
- Program configuration files saved in
data/rules/directory - System configuration files saved in
data/config/directory - Log files saved in
data/logs/directory (automatic rotation) - Event logs saved in
data/events/directory
- Program configuration files saved in
Performance Optimization:
- Signal subscription period recommended: 50-100ms
- Debounce filtering set according to actual signal characteristics
- Avoid creating overly complex program logic
Import/Export:
- Export files are in zip format
- Import detects conflicts, please carefully select handling method
- USB mode requires USB drive to be properly mounted, and only supports FAT32 disk format
Log Management:
- Log files automatically rotated (single file max 10MB)
- Log folder automatically cleaned (max 100MB)
- Log files named by timestamp
Changelog
V1.4.0 (2026-01-16)
- Added Multi-language Support:
- Supports Chinese, English, Vietnamese, and Japanese interface
- All UI elements, Blockly blocks, event logs, etc. support multi-language switching
- System logs support backend translation, displaying translated logs according to user language preference
- Local log files remain in Chinese
- Real-time log push automatically translates according to connection language preference
- Interface Optimization:
- Added language switch button (globe icon)
- Optimized language switching interaction experience
- Language preference automatically saved and restored
V1.0.0 (2025-12-29)
- Initial version release
- Supports SDK 2.0.0.0
- Implemented real-time I/O signal monitoring (SubPub subscription mechanism)
- Implemented signal debounce filtering and subscription period configuration
- Implemented register operations (R, MH, MI)
- Implemented background program management (create, edit, delete, copy)
- Implemented program import/export functionality (Web mode/USB mode)
- Implemented system configuration management
- Implemented real-time status monitoring (system logs, performance monitoring, program running status)
- Supports program search and sorting
- Supports log rotation and automatic cleanup