Operation Error Codes
This document lists all error codes that can be returned by the ctrlX CORE CommGO application during Enable/Disable commands, HTTP output operations, and exposed through the DataLayer, REST API, and SignalR events.
Error Code Table
| Code | Name | Message | Description |
|---|---|---|---|
| 0 | Success | Operation completed successfully | Command executed successfully without errors. Positive confirmation. |
| -1 | NoLicense | No valid license available | No valid license file found or license has expired. Tool cannot be enabled without a valid license. See Licensing for license installation. |
| -2 | NoStorageAvailable | No storage available (disk space or path issue) | Insufficient disk space for output buffering (available space < MinStorageAvailable threshold), or configured StoragePath is invalid/unwritable. See Output Curves Troubleshooting. |
| -3 | NotCompatible | Protocol version not compatible | Tool protocol version mismatch. For GWK Operator, this typically indicates communication protocol incompatibility. Verify tool firmware version and communication settings. |
| -4 | MaxBufferLimitReached | Maximum buffer limit reached for result files | Output buffer queue is full (queued_items = MaxItemsInQueue). Indicates HTTP endpoint is unavailable or processing slower than tightening rate. See Output Curves Troubleshooting. |
| -5 | PsetNotAvailable | Requested parameter set not available or configuration is empty | The requested Pset (parameter set) number does not exist in appdata.json, or the Psets array is empty. Verify Pset configuration. See Configuration. |
| -6 | ToolNotConnected | Tool is not connected | Tool is not connected via TCP/IP. Check tool is powered on, Ethernet is connected, and IPAddress/IPPort in appdata.json are correct. See Troubleshooting. |
| -7 | ToolAlreadyEnabled | Tool is already enabled | Attempted to enable tool when it is already in enabled state. Disable tool first before enabling with different Pset. |
Error Code Behavior
Negative Values Block Commands
All negative error codes (-1 through -7) indicate conditions that block Enable/Disable commands. When these errors are present:
- Enable command: Returns the error code and refuses to enable the tool
- Disable command: May return error code depending on the specific condition
- Tool remains in safe state: Tool will not perform tightening operations until error is resolved
Where Error Codes Appear
Error codes are exposed through multiple interfaces to support different use cases:
1. REST API (HTTP Endpoints)
Enable endpoint: POST /he-ctrlx-app-commgo/api/v1/tool/enable?iPSet=2
Success response (HTTP 200):
{
"success": true,
"errorCode": 0,
"message": "Operation completed successfully"
}
Error response (HTTP 400):
{
"success": false,
"errorCode": -6,
"message": "Tool is not connected"
}
2. SignalR Real-Time Events
Event: CommandRejected
Payload structure:
{
"errorCode": -5,
"errorMessage": "Requested parameter set not available or configuration is empty",
"command": "Enable",
"timestamp": "2026-01-09T14:32:15Z"
}
Usage: Frontend subscribes to CommandRejected event to display error notifications to operators in real-time when Enable/Disable commands fail.
3. DataLayer (PLC Integration)
Tool state node: he/commgo/app/tool1/state
Structure (FlatBuffers):
{
"connected": false,
"enabled": false,
"pset": 0,
"error_code": -6,
"error_message": "Tool is not connected"
}
Usage: PLC reads error_code field from tool state to determine if tool is operational. Negative values trigger production line error handling logic.
Error Resolution Guide
-1 NoLicense
Problem: Application cannot find valid license file or license has expired.
Resolution:
- Obtain valid license file from vendor
- Place license file in Solutions configuration directory alongside
appdata.json - Restart application
- Verify license is loaded by checking application logs
See: Licensing Guide for detailed installation instructions.
-2 NoStorageAvailable
Problem: Disk space below threshold or storage path invalid.
Resolution:
- Check available disk space: Review
available_disk_space_mbinhe/commgo/buffer/status - Free disk space if low (delete old files, logs, or unused snaps)
- Reduce
MinStorageAvailablethreshold inoutputs.jsonif too conservative - Configure external storage (SD card/USB) via
StoragePath - If output not needed, set
EnableOutput: falseinoutputs.json
See: Output Curves - Storage Full Errors
-3 NotCompatible
Problem: Protocol version mismatch between application and tool.
Resolution:
- Verify tool firmware version is compatible with application version
- Check tool communication settings.
- For GWK Operator: Ensure tool is in proper operating mode
- Review application logs for detailed protocol negotiation errors
- Contact vendor support if protocol incompatibility persists
-4 MaxBufferLimitReached
Problem: Output buffer queue is full, HTTP endpoint not processing results fast enough.
Resolution:
- Check HTTP endpoint is running and accessible
- Test endpoint connectivity:
curl -X POST http://127.0.0.1:8889/x -d '{"test": true}' - Review
he/commgo/buffer/status:- Check
queued_itemsvalue (should be <MaxItemsInQueue) - Check
total_transmittedis incrementing (indicates endpoint responding) - Check
total_failed_attempts(high value indicates HTTP errors)
- Check
- Temporarily increase
MaxItemsInQueueinoutputs.jsonto accommodate backlog - If output not critical, set
EnableOutput: falseto disable buffering
See: Output Curves - Queue Full Errors
-5 PsetNotAvailable
Problem: Requested parameter set (Pset) does not exist in configuration.
Resolution:
- Open
appdata.jsonin Solutions configuration directory - Verify Pset with requested number exists in
Psetsarray - Check Pset numbering is sequential (1, 2, 3, ...)
- Validate JSON syntax (use JSON validator if needed)
- Restart application after fixing configuration
Example valid Psets array:
{
"Psets": [
{ "ParameterSetName": "Bolt M10", "ParameterSetNumber": 1, "WorkpieceId": "M10_BOLT" },
{ "ParameterSetName": "Bolt M12", "ParameterSetNumber": 2, "WorkpieceId": "M12_BOLT" }
]
}
See: Configuration Guide
-6 ToolNotConnected
Problem: TCP/IP connection to tool is not established.
Resolution:
- Verify tool is powered on and operational
- For GWK Operator:
- Check Ethernet connection
- Verify ctrlX CORE is on same network as tool
- Ping tool IP address:
ping 10.10.2.177
- Check
appdata.jsonconfiguration:IPAddress: Must match tool's IP addressIPPort: Must match tool's TCP port (typically 4545 for GWK Operator)
- Restart application after fixing configuration
- Check application logs for TCP connection error details
See: Troubleshooting Connection Issues
-7 ToolAlreadyEnabled
Problem: Attempted to enable tool that is already enabled.
Resolution:
- Send Disable command first
- Wait for tool to enter disabled state (check
statenode or REST API) - Send Enable command with desired Pset number
Note: This is typically a programming error in PLC logic or frontend application. Normal operation should track enabled state and not attempt redundant Enable commands.
Programming Examples
Frontend (TypeScript/Angular)
import { OperationErrorCode, getOperationErrorMessage } from './models/operation-error-code';
// Handle Enable command response
toolService.enableTool(psetNumber).subscribe({
next: (response) => {
if (response.errorCode === OperationErrorCode.Success) {
console.log('Tool enabled successfully');
} else {
const message = getOperationErrorMessage(response.errorCode);
alert(`Enable failed: ${message}`);
}
},
error: (err) => {
console.error('HTTP error:', err);
}
});
// Handle SignalR CommandRejected event
signalRService.commandRejected$.subscribe((event) => {
const message = getOperationErrorMessage(event.errorCode);
this.showNotification(`Command ${event.command} rejected: ${message}`, 'error');
});
PLC (Structured Text)
PROGRAM ToolController
VAR
toolState : ToolState; // Read from he/commgo/app/tool1/state
enableCommand : BOOL;
lastErrorCode : INT;
errorMessage : STRING[255];
END_VAR
// Read tool state from DataLayer
toolState := DataLayer.Read('he/commgo/app/tool1/state');
// Check for errors before enabling
IF enableCommand AND NOT toolState.enabled THEN
IF toolState.error_code < 0 THEN
// Negative error code - cannot enable
lastErrorCode := toolState.error_code;
errorMessage := toolState.error_message;
CASE toolState.error_code OF
-1: (* NoLicense - Critical, stop production *)
ProductionAlarm := TRUE;
AlarmMessage := 'License invalid';
-2: (* NoStorageAvailable - Warning, may continue if output not critical *)
ProductionWarning := TRUE;
-6: (* ToolNotConnected - Common, retry connection *)
RetryConnection := TRUE;
END_CASE;
ELSE
// No errors, send Enable command
DataLayer.Write('he/commgo/app/tool1/command', enableCommand);
END_IF;
END_IF;
Related Documentation
- Configuration Guide - Configuring Psets and connection settings
- Output Curves Export & Posting - Buffering errors -2 and -4
- Licensing Guide - Resolving error -1
- Troubleshooting - General troubleshooting tips
- Data Layer Control - PLC integration and error handling