FS-ROB-001: Robot Control Functions¶
| Property | Value |
|---|---|
| ID | FS-ROB-001 |
| Version | 1.0 |
| Corresponding URS | URS-ROB-001 |
| Status | Draft |
| Author | |
| Approved By | |
| Date |
Architecture Reference¶
Functional Specifications¶
FS-ROB-001.1: Store Robot Master Data¶
Covers URS: URS-ROB-001.1
Input Specification:
| Parameter | Type | Constraints | Required |
|---|---|---|---|
| X, Y, Z | double | Position coordinates | Yes |
| A, B, C | double | Orientation angles | Yes |
| CoordFrame | int | Coordinate frame reference | Yes |
| ToolFrame | int | Tool frame reference | Yes |
| ExternalFrame | int | External frame reference | No |
| Creator | string | Max 30 chars | Yes |
Output Specification:
| Field | Type | Description |
|---|---|---|
| Uid | long | Auto-generated master data UID |
| Timestamp | datetime | Storage time |
| Crc | long | Integrity checksum |
Business Rules: - CRC calculated from all coordinate values + metadata - Master data stored in db_robots
FS-ROB-001.2: Store Robot Position Data¶
Covers URS: URS-ROB-001.2
Input Specification:
| Parameter | Type | Constraints | Required |
|---|---|---|---|
| MasterDataUid | long | Must reference existing master data | Yes |
| MasterOffsetX/Y/Z | double | Master offset values | Yes |
| ToolOffsetX/Y/Z | double | Tool offset values | Yes |
| Creator | string | Max 30 chars | Yes |
Output Specification:
| Field | Type | Description |
|---|---|---|
| Uid | long | Auto-generated position UID |
| MasterDataUid | long | Referenced master data |
FS-ROB-001.3: Calculate Robot Positions¶
Covers URS: URS-ROB-001.3
Functional Description: Calculates effective robot position by combining master data coordinates with master offsets and tool offsets. Calculation is deterministic.
Calculation:
EffectiveX = MasterData.X + MasterOffset.X + ToolOffset.X
EffectiveY = MasterData.Y + MasterOffset.Y + ToolOffset.Y
EffectiveZ = MasterData.Z + MasterOffset.Z + ToolOffset.Z
(Same for A, B, C orientation angles)
Output Specification:
| Field | Type | Description |
|---|---|---|
| X, Y, Z | double | Calculated position |
| A, B, C | double | Calculated orientation |
Error Handling:
| Error Condition | Response | HTTP Status |
|---|---|---|
| Master data not found | "Master data not found" | 404 |
| Position data not found | "Position data not found" | 404 |
FS-ROB-001.4: Execute Robot Master Teach¶
Covers URS: URS-ROB-001.4
Input Specification (16 parameters):
| Parameter | Type | Description |
|---|---|---|
| BaseX, BaseY, BaseZ | double | Base frame position |
| BaseA, BaseB, BaseC | double | Base frame orientation |
| ToolX, ToolY, ToolZ | double | Tool frame position |
| ToolA, ToolB, ToolC | double | Tool frame orientation |
| ExtX, ExtY, ExtZ | double | External frame position |
| Speed | double | Movement speed |
| Acceleration | double | Acceleration |
Output Specification:
| Field | Type | Description |
|---|---|---|
| Uid | long | Generated master data UID |
| Crc | long | Integrity checksum |
Business Rules: - All 16 parameters must be provided - Results stored as new master data record - CRC calculated from all teach parameters
CQRS Handler Mapping¶
| FS Item | Command/Query | Handler |
|---|---|---|
| FS-ROB-001.1 | StoreMasterDataCommand | StoreMasterDataHandler |
| FS-ROB-001.2 | StorePositionDataCommand | StorePositionDataHandler |
| FS-ROB-001.3 | GetCalculatedPositionQuery | GetCalculatedPositionHandler |
| FS-ROB-001.4 | ExecuteRobotMasterTeachCommand | ExecuteRobotMasterTeachHandler |