Jump to content

Component: Robot Arm v2 (AllCode): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(8 intermediate revisions by 2 users not shown)
Line 53: Line 53:


''<span style="color:red;">No additional examples</span>''
''<span style="color:red;">No additional examples</span>''




Line 61: Line 67:
==Macro reference==
==Macro reference==


===SetWIFIPort===
===DisableMotors===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetWIFIPort'''
| width="90%" class="mtx-class-macrohead" | '''DisableMotors'''
|-
|-
| colspan="2" | Sets the WIFI port number&nbsp;
| colspan="2" | Disables all motors&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Port
|-
|-
| colspan="2" | Default 1245&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 80: Line 81:




===WhileMoving===
===GetAPI===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WhileMoving'''
| width="90%" class="mtx-class-macrohead" | '''GetAPI'''
|-
|-
| colspan="2" | Blocking call that waits up to 10 seconds for the current movement operation to complete. Returns when complete. Return of 1 indicates movement complete, 0 indicates timeout.&nbsp;
| colspan="2" | Gets the API version number&nbsp;
|-
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===SetWIFIPassword===
===GetAngles===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetWIFIPassword'''
| width="90%" class="mtx-class-macrohead" | '''GetAngles'''
|-
|-
| colspan="2" | Configures the WIFI Password string and stores into the none volatie memory onboard the robot arm. Call the SetWifiMode macro after this to action the change.&nbsp;
| colspan="2" | Collects the current joint angles of the motors.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Password
|-
| colspan="2" | Password String, Max 32 Characters&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
===SetCalibrationLengths===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetCalibrationLengths'''
|-
| colspan="2" | Sets the lengths of parameters A and D used as part of the kinematics calculations to get and set the angles using XYZ coordinates&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | LengthA
| width="90%" | Angles
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Float Array To Hold the step position return values&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | LengthD
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 137: Line 114:




===SetMovementSpeed===
===GetColourSensor===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMovementSpeed'''
| width="90%" class="mtx-class-macrohead" | '''GetColourSensor'''
|-
|-
| colspan="2" | Controls the movement speed of the arm and the ramping increment&nbsp;
| colspan="2" | Samples and returns the RGB values read by the colour sensor&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Speed
| width="90%" | RGB
|-
|-
| colspan="2" | Range 0-10000 default 8000&nbsp;
| colspan="2" | Byte Array To Hold the RGB sensor values&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Increment
|-
| colspan="2" | Range 0 to 5000, default 50&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 162: Line 134:


===GetPLCInputs===
===GetPLCInputs===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetPLCInputs'''
| width="90%" class="mtx-class-macrohead" | '''GetPLCInputs'''
|-
|-
| colspan="2" | Reads the inputs on the secondary grove connector used to connect to outputs from a connected PLC or other external switch.&nbsp;
| colspan="2" | Reads the inputs on the secondary grove connector used to connect to outputs from a connected PLC or other external switch.&nbsp;
Line 175: Line 147:




===SetGripper===
===GetPosition===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetGripper'''
| width="90%" class="mtx-class-macrohead" | '''GetPosition'''
|-
|-
| colspan="2" | Sets the new position of the gripper&nbsp;
| colspan="2" | Collects the current step positions of the motors.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Position
| width="90%" | Positions
|-
|-
| colspan="2" | 0 = Closed, 255 = Fully Open&nbsp;
| colspan="2" | UINT Array To Hold the step position return values&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 194: Line 166:




===SetCalibrationPosition===
===GetWifiIP===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetCalibrationPosition'''
| width="90%" class="mtx-class-macrohead" | '''GetWifiIP'''
|-
|-
| colspan="2" | Called when the arm gripper is in the calibration position of X0 Y300 Z5 Reconfigures the kinematics calculations based on this. Performed in factory to calibrate the arm, warning calling this function will effect factory calibration.&nbsp;
| colspan="2" | Collects the IP address of the robot arm WIFI connection.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===StoreAngles===
===GetXYZ===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StoreAngles'''
| width="90%" class="mtx-class-macrohead" | '''GetXYZ'''
|-
|-
| colspan="2" | Stores the specified joint angles into an internal none volatile memory location.&nbsp;
| colspan="2" | Collects the current XYZ position of the end tool.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | PositionIndex
| width="90%" | XYZ
|-
|-
| colspan="2" | Range: 0 to 40&nbsp;
| colspan="2" | INT Array To Hold the X, Y and Z return values&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | AngleA
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
===GotoPosition===
{| class="mtx-class-macrotable wikitable"
|-
|-
| colspan="2" | Range 0.0 to 359.0&nbsp;
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''GotoPosition'''
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| colspan="2" | Recalls a position from the selected internal none volatile memory location. Performs linear interpolated movement to the selected position.&nbsp;
| width="90%" | AngleB
|-
|-
| colspan="2" | Range 0.0 to 359.0&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | AngleC
| width="90%" | PositionIndex
|-
|-
| colspan="2" | Range 0.0 to 359.0&nbsp;
| colspan="2" | Range: 0 to 40&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 242: Line 218:




===GetWifiIP===
===HomeAll===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetWifiIP'''
| width="90%" class="mtx-class-macrohead" | '''HomeAll'''
|-
|-
| colspan="2" | Collects the IP address of the robot arm WIFI connection.&nbsp;
| colspan="2" | Function to automatically home all motors. Macro blocks until complete.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===GetColourSensor===
===HomeAxis===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetColourSensor'''
| width="90%" class="mtx-class-macrohead" | '''HomeAxis'''
|-
|-
| colspan="2" | Samples and returns the RGB values read by the colour sensor&nbsp;
| colspan="2" | Function to automatically home  a specific motor. Macro blocks until complete.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | RGB
| width="90%" | Axis
|-
|-
| colspan="2" | Byte Array To Hold the RGB sensor values&nbsp;
| colspan="2" | 0=A, 1=B, 2=C&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 275: Line 251:




===SetMotor===
===Initialise===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMotor'''
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
|-
| colspan="2" | Sets the step position of a single motor&nbsp;
| colspan="2" | &nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Motor
|-
| colspan="2" | 0=A, 1=B, 2=C&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Position
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===ResetToBoot===
===IsMoving===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ResetToBoot'''
| width="90%" class="mtx-class-macrohead" | '''IsMoving'''
|-
|-
| colspan="2" | Resets the board into bootload mode for reprogramming. Comms port will be closed on calling this macro,&nbsp;
| colspan="2" | Checks to see if the robot arm or gripper is moving. Returns 0 if the arm is not moving and 1 if the arm is still in transit.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===IsMoving===
===ResetToBoot===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IsMoving'''
| width="90%" class="mtx-class-macrohead" | '''ResetToBoot'''
|-
|-
| colspan="2" | Checks to see if the robot arm or gripper is moving. Returns 0 if the arm is not moving and 1 if the arm is still in transit.&nbsp;
| colspan="2" | Resets the board into bootload mode for reprogramming. Comms port will be closed on calling this macro,&nbsp;
|-
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}
Line 328: Line 294:


===SetAngle===
===SetAngle===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAngle'''
| width="90%" class="mtx-class-macrohead" | '''SetAngle'''
|-
|-
| colspan="2" | Sets the angle of a single motor&nbsp;
| colspan="2" | Sets the angle of a single motor&nbsp;
Line 351: Line 317:




===SetXYZ===
===SetAngles===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetXYZ'''
| width="90%" class="mtx-class-macrohead" | '''SetAngles'''
|-
|-
| colspan="2" | Moves the machine so that the end tool is in the specified XYZ position. Returns 1 if the coordinates are within range of the Arm else returns 0.&nbsp;
| colspan="2" | Sets the angle of all motors&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | X
| width="90%" | AngleA
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Range 0.0 to 359.0&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Y
| width="90%" | AngleB
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Range 0.0 to 359.0&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Z
| width="90%" | AngleC
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Range 0.0 to 359.0&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===SetBluetoothPin===
===SetBluetoothMode===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBluetoothPin'''
| width="90%" class="mtx-class-macrohead" | '''SetBluetoothMode'''
|-
|-
| colspan="2" | Configures the Bluetooth pin and stores into the none volatie memory onboard the robot arm. Call the SetBluetoothMode macro after this to action the change.&nbsp;
| colspan="2" | Configures the Bluetooth mode.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Pin
| width="90%" | Mode
|-
|-
| colspan="2" | Pin String, 4 Numeric Characters e.g. "1234"&nbsp;
| colspan="2" | 0=Disabled, 1=Enabled&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 399: Line 365:




===HomeAll===
===SetBluetoothName===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''HomeAll'''
| width="90%" class="mtx-class-macrohead" | '''SetBluetoothName'''
|-
|-
| colspan="2" | Function to automatically home all motors. Macro blocks until complete.&nbsp;
| colspan="2" | Configures the Bluetooth device name and stores into the none volatie memory onboard the robot arm. Call the SetBluetoothMode macro after this to action the change.&nbsp;
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Name
|-
| colspan="2" | Bluetooth Device String, Max 20 Characters&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 413: Line 384:




===SetRelay===
===SetBluetoothPin===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRelay'''
| width="90%" class="mtx-class-macrohead" | '''SetBluetoothPin'''
|-
|-
| colspan="2" | Allows the vacuum relay to be switched on and off.&nbsp;
| colspan="2" | Configures the Bluetooth pin and stores into the none volatie memory onboard the robot arm. Call the SetBluetoothMode macro after this to action the change.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | State
| width="90%" | Pin
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Pin String, 4 Numeric Characters e.g. "1234"&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 432: Line 403:




===SetCalibrationRadius===
===SetCalibrationLengths===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetCalibrationRadius'''
| width="90%" class="mtx-class-macrohead" | '''SetCalibrationLengths'''
|-
|-
| colspan="2" | Sets the lengths of parameters A and D used as part of the kinematics calculations to get and set the angles using XYZ coordinates&nbsp;
| colspan="2" | Sets the lengths of parameters A and D used as part of the kinematics calculations to get and set the angles using XYZ coordinates&nbsp;
Line 442: Line 413:
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Radius
| width="90%" | LengthA
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | LengthD
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 451: Line 427:




===SetAngles===
===SetCalibrationPosition===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAngles'''
| width="90%" class="mtx-class-macrohead" | '''SetCalibrationPosition'''
|-
|-
| colspan="2" | Sets the angle of all motors&nbsp;
| colspan="2" | Called when the arm gripper is in the calibration position of X0 Y300 Z5 Reconfigures the kinematics calculations based on this. Performed in factory to calibrate the arm, warning calling this function will effect factory calibration.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | AngleA
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
===SetCalibrationRadius===
{| class="mtx-class-macrotable wikitable"
|-
|-
| colspan="2" | Range 0.0 to 359.0&nbsp;
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SetCalibrationRadius'''
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| colspan="2" | Sets the lengths of parameters A and D used as part of the kinematics calculations to get and set the angles using XYZ coordinates&nbsp;
| width="90%" | AngleB
|-
|-
| colspan="2" | Range 0.0 to 359.0&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | AngleC
| width="90%" | Radius
|-
|-
| colspan="2" | Range 0.0 to 359.0&nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 480: Line 460:




===GotoPosition===
===SetCanId===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GotoPosition'''
| width="90%" class="mtx-class-macrohead" | '''SetCanId'''
|-
|-
| colspan="2" | Recalls a position from the selected internal none volatile memory location. Performs linear interpolated movement to the selected position.&nbsp;
| colspan="2" | Stores the specified CAN ID into an internal none volatile memory location.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PositionIndex
| width="90%" | ID
|-
|-
| colspan="2" | Range: 0 to 40&nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 499: Line 479:




===SetWifiMode===
===SetCanMode===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetWifiMode'''
| width="90%" class="mtx-class-macrohead" | '''SetCanMode'''
|-
|-
| colspan="2" | Configures the WIFI mode. When enabled the robot arm can either create its own WIFI network or join an existing WIFI network,&nbsp;
| colspan="2" | Configures the CAN mode.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Mode
| width="90%" | Mode
|-
|-
| colspan="2" | 0=Disabled, 1=Host Network, 2=Join Network&nbsp;
| colspan="2" | 0=Disabled, 1=Enabled&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 518: Line 498:




===HomeAxis===
===SetGripper===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''HomeAxis'''
| width="90%" class="mtx-class-macrohead" | '''SetGripper'''
|-
|-
| colspan="2" | Function to automatically home  a specific motor. Macro blocks until complete.&nbsp;
| colspan="2" | Sets the new position of the gripper&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Axis
| width="90%" | Position
|-
|-
| colspan="2" | 0=A, 1=B, 2=C&nbsp;
| colspan="2" | 0 = Closed, 255 = Fully Open&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 537: Line 517:




===GetAngles===
===SetMotor===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetAngles'''
| width="90%" class="mtx-class-macrohead" | '''SetMotor'''
|-
|-
| colspan="2" | Collects the current joint angles of the motors.&nbsp;
| colspan="2" | Sets the step position of a single motor&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Angles
| width="90%" | Motor
|-
|-
| colspan="2" | Float Array To Hold the step position return values&nbsp;
| colspan="2" | 0=A, 1=B, 2=C&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" | Position
|}
 
 
===DisableMotors===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisableMotors'''
|-
| colspan="2" | Disables all motors&nbsp;
|-
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 570: Line 541:




===StoreMotors===
===SetMotors===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StoreMotors'''
| width="90%" class="mtx-class-macrohead" | '''SetMotors'''
|-
|-
| colspan="2" | Stores the specified step position into an internal none volatile memory location.&nbsp;
| colspan="2" | Sets the step position of all motors&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | PositionIndex
|-
|-
| colspan="2" | Range: 0 to 40&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
Line 604: Line 570:




===SetCanId===
===SetMovementSpeed===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SetMovementSpeed'''
|-
| colspan="2" | Controls the movement speed of the arm and the ramping increment&nbsp;
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetCanId'''
|-
|-
| colspan="2" | Stores the specified CAN ID into an internal none volatile memory location.&nbsp;
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Speed
|-
|-
| colspan="2" | Range 0-10000 default 8000&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | ID
| width="90%" | Increment
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Range 0 to 5000, default 50&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 623: Line 594:




===GetAPI===
===SetRelay===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SetRelay'''
|-
| colspan="2" | Allows the vacuum relay to be switched on and off.&nbsp;
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetAPI'''
|-
|-
| colspan="2" | Gets the API version number&nbsp;
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | State
|-
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===SetMotors===
===SetWIFIPassword===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SetWIFIPassword'''
|-
| colspan="2" | Configures the WIFI Password string and stores into the none volatie memory onboard the robot arm. Call the SetWifiMode macro after this to action the change.&nbsp;
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMotors'''
|-
|-
| colspan="2" | Sets the step position of all motors&nbsp;
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Password
|-
|-
| colspan="2" | Password String, Max 32 Characters&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | PositionA
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
===SetWIFIPort===
{| class="mtx-class-macrotable wikitable"
|-
|-
| colspan="2" | &nbsp;
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SetWIFIPort'''
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| colspan="2" | Sets the WIFI port number&nbsp;
| width="90%" | PositionB
|-
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PositionC
| width="90%" | Port
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Default 1245&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 666: Line 651:




===SetCanMode===
===SetWifiMode===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetCanMode'''
| width="90%" class="mtx-class-macrohead" | '''SetWifiMode'''
|-
|-
| colspan="2" | Configures the CAN mode.&nbsp;
| colspan="2" | Configures the WIFI mode. When enabled the robot arm can either create its own WIFI network or join an existing WIFI network,&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Mode
| width="90%" | Mode
|-
|-
| colspan="2" | 0=Disabled, 1=Enabled&nbsp;
| colspan="2" | 0=Disabled, 1=Host Network, 2=Join Network&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 686: Line 671:


===SetWifiSSID===
===SetWifiSSID===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetWifiSSID'''
| width="90%" class="mtx-class-macrohead" | '''SetWifiSSID'''
|-
|-
| colspan="2" | Configures the WIFI SSID string and stores into the none volatie memory onboard the robot arm. Call the SetWifiMode macro after this to action the change.&nbsp;
| colspan="2" | Configures the WIFI SSID string and stores into the none volatie memory onboard the robot arm. Call the SetWifiMode macro after this to action the change.&nbsp;
Line 704: Line 689:




===GetPosition===
===SetXYZ===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SetXYZ'''
|-
| colspan="2" | Moves the machine so that the end tool is in the specified XYZ position. Returns 1 if the coordinates are within range of the Arm else returns 0.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | X
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| colspan="2" | &nbsp;
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetPosition'''
|-
|-
| colspan="2" | Collects the current step positions of the motors.&nbsp;
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Y
|-
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Positions
| width="90%" | Z
|-
|-
| colspan="2" | UINT Array To Hold the step position return values&nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===StoreCurrentPosition===
===StoreAngles===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StoreCurrentPosition'''
| width="90%" class="mtx-class-macrohead" | '''StoreAngles'''
|-
|-
| colspan="2" | Stores the current position into an internal none volatile memory location.&nbsp;
| colspan="2" | Stores the specified joint angles into an internal none volatile memory location.&nbsp;
|-
|-
|-
|-
Line 736: Line 731:
|-
|-
| colspan="2" | Range: 0 to 40&nbsp;
| colspan="2" | Range: 0 to 40&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | AngleA
|-
| colspan="2" | Range 0.0 to 359.0&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | AngleB
|-
| colspan="2" | Range 0.0 to 359.0&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | AngleC
|-
| colspan="2" | Range 0.0 to 359.0&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 742: Line 752:




===GetXYZ===
===StoreCurrentPosition===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetXYZ'''
| width="90%" class="mtx-class-macrohead" | '''StoreCurrentPosition'''
|-
|-
| colspan="2" | Collects the current XYZ position of the end tool.&nbsp;
| colspan="2" | Stores the current position into an internal none volatile memory location.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | XYZ
| width="90%" | PositionIndex
|-
|-
| colspan="2" | INT Array To Hold the X, Y and Z return values&nbsp;
| colspan="2" | Range: 0 to 40&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 761: Line 771:




===SetBluetoothMode===
===StoreMotors===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''StoreMotors'''
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| colspan="2" | Stores the specified step position into an internal none volatile memory location.&nbsp;
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBluetoothMode'''
|-
|-
| colspan="2" | Configures the Bluetooth mode.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | PositionIndex
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| colspan="2" | Range: 0 to 40&nbsp;
| width="90%" | Mode
|-
|-
| colspan="2" | 0=Disabled, 1=Enabled&nbsp;
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PositionA
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| colspan="2" | &nbsp;
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
===Initialise===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" | PositionB
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PositionC
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===SetBluetoothName===
===WhileMoving===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBluetoothName'''
| width="90%" class="mtx-class-macrohead" | '''WhileMoving'''
|-
|-
| colspan="2" | Configures the Bluetooth device name and stores into the none volatie memory onboard the robot arm. Call the SetBluetoothMode macro after this to action the change.&nbsp;
| colspan="2" | Blocking call that waits up to 10 seconds for the current movement operation to complete. Returns when complete. Return of 1 indicates movement complete, 0 indicates timeout.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Name
|-
| colspan="2" | Bluetooth Device String, Max 20 Characters&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
Line 828: Line 832:
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | API Settings
| width="90%" class="mtx-class-propfolder" | API Settings
|-
|-
|-
|-
Line 837: Line 841:
| colspan="2" | Selects the method to communicate with the Matrix 3 Axis Robot Arm. USB connection requires the USB drivers to be installed. Bluetooth connection requires the device first be paired using the Windows Bluetooth control panel. WIFI connection requires the connection settings to be configured first on the robot using USB or Bluetooth.  CAN connection does not simulate and works on embedded hardware e.g. the MIAC.&nbsp;
| colspan="2" | Selects the method to communicate with the Matrix 3 Axis Robot Arm. USB connection requires the USB drivers to be installed. Bluetooth connection requires the device first be paired using the Windows Bluetooth control panel. WIFI connection requires the connection settings to be configured first on the robot using USB or Bluetooth.  CAN connection does not simulate and works on embedded hardware e.g. the MIAC.&nbsp;
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | COM Port Settings
| width="90%" class="mtx-class-propfolder" | COM Port Settings
|-
|-
|-
|-

Latest revision as of 14:37, 13 July 2026

Author Matrix TSL
Version 1.0
Category AllCode


Robot Arm v2 component

Drives the Matrix Robot Arm v2 hardware via the AllCode API. Allows connections via USB, Bluetooth and WIFI.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_RA2_ComponentSource.fcsx

Please click here to view the component source code (Beta): FC_Comp_Source_RA2_ComponentSource.fcsx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

DisableMotors

DisableMotors
Disables all motors 
- VOID Return


GetAPI

GetAPI
Gets the API version number 
- BYTE Return


GetAngles

GetAngles
Collects the current joint angles of the motors. 
- FLOAT Angles
Float Array To Hold the step position return values 
- VOID Return


GetColourSensor

GetColourSensor
Samples and returns the RGB values read by the colour sensor 
- BYTE RGB
Byte Array To Hold the RGB sensor values 
- VOID Return


GetPLCInputs

GetPLCInputs
Reads the inputs on the secondary grove connector used to connect to outputs from a connected PLC or other external switch. 
- BYTE Return


GetPosition

GetPosition
Collects the current step positions of the motors. 
- UINT Positions
UINT Array To Hold the step position return values 
- VOID Return


GetWifiIP

GetWifiIP
Collects the IP address of the robot arm WIFI connection. 
- STRING Return


GetXYZ

GetXYZ
Collects the current XYZ position of the end tool. 
- INT XYZ
INT Array To Hold the X, Y and Z return values 
- VOID Return


GotoPosition

GotoPosition
Recalls a position from the selected internal none volatile memory location. Performs linear interpolated movement to the selected position. 
- BYTE PositionIndex
Range: 0 to 40 
- VOID Return


HomeAll

HomeAll
Function to automatically home all motors. Macro blocks until complete. 
- VOID Return


HomeAxis

HomeAxis
Function to automatically home a specific motor. Macro blocks until complete. 
- BYTE Axis
0=A, 1=B, 2=C 
- VOID Return


Initialise

Initialise
 
- BOOL Return


IsMoving

IsMoving
Checks to see if the robot arm or gripper is moving. Returns 0 if the arm is not moving and 1 if the arm is still in transit. 
- BOOL Return


ResetToBoot

ResetToBoot
Resets the board into bootload mode for reprogramming. Comms port will be closed on calling this macro, 
- VOID Return


SetAngle

SetAngle
Sets the angle of a single motor 
- BYTE Motor
0=A, 1=B, 2=C 
- FLOAT Angle
Range 0.0 to 359.0 
- VOID Return


SetAngles

SetAngles
Sets the angle of all motors 
- FLOAT AngleA
Range 0.0 to 359.0 
- FLOAT AngleB
Range 0.0 to 359.0 
- FLOAT AngleC
Range 0.0 to 359.0 
- VOID Return


SetBluetoothMode

SetBluetoothMode
Configures the Bluetooth mode. 
- BOOL Mode
0=Disabled, 1=Enabled 
- VOID Return


SetBluetoothName

SetBluetoothName
Configures the Bluetooth device name and stores into the none volatie memory onboard the robot arm. Call the SetBluetoothMode macro after this to action the change. 
- STRING Name
Bluetooth Device String, Max 20 Characters 
- VOID Return


SetBluetoothPin

SetBluetoothPin
Configures the Bluetooth pin and stores into the none volatie memory onboard the robot arm. Call the SetBluetoothMode macro after this to action the change. 
- STRING Pin
Pin String, 4 Numeric Characters e.g. "1234" 
- VOID Return


SetCalibrationLengths

SetCalibrationLengths
Sets the lengths of parameters A and D used as part of the kinematics calculations to get and set the angles using XYZ coordinates 
- FLOAT LengthA
 
- FLOAT LengthD
 
- VOID Return


SetCalibrationPosition

SetCalibrationPosition
Called when the arm gripper is in the calibration position of X0 Y300 Z5 Reconfigures the kinematics calculations based on this. Performed in factory to calibrate the arm, warning calling this function will effect factory calibration. 
- VOID Return


SetCalibrationRadius

SetCalibrationRadius
Sets the lengths of parameters A and D used as part of the kinematics calculations to get and set the angles using XYZ coordinates 
- FLOAT Radius
 
- VOID Return


SetCanId

SetCanId
Stores the specified CAN ID into an internal none volatile memory location. 
- UINT ID
 
- VOID Return


SetCanMode

SetCanMode
Configures the CAN mode. 
- BOOL Mode
0=Disabled, 1=Enabled 
- VOID Return


SetGripper

SetGripper
Sets the new position of the gripper 
- BYTE Position
0 = Closed, 255 = Fully Open 
- VOID Return


SetMotor

SetMotor
Sets the step position of a single motor 
- BYTE Motor
0=A, 1=B, 2=C 
- UINT Position
 
- VOID Return


SetMotors

SetMotors
Sets the step position of all motors 
- UINT PositionA
 
- UINT PositionB
 
- UINT PositionC
 
- VOID Return


SetMovementSpeed

SetMovementSpeed
Controls the movement speed of the arm and the ramping increment 
- UINT Speed
Range 0-10000 default 8000 
- UINT Increment
Range 0 to 5000, default 50 
- VOID Return


SetRelay

SetRelay
Allows the vacuum relay to be switched on and off. 
- BOOL State
 
- VOID Return


SetWIFIPassword

SetWIFIPassword
Configures the WIFI Password string and stores into the none volatie memory onboard the robot arm. Call the SetWifiMode macro after this to action the change. 
- STRING Password
Password String, Max 32 Characters 
- VOID Return


SetWIFIPort

SetWIFIPort
Sets the WIFI port number 
- UINT Port
Default 1245 
- VOID Return


SetWifiMode

SetWifiMode
Configures the WIFI mode. When enabled the robot arm can either create its own WIFI network or join an existing WIFI network, 
- BYTE Mode
0=Disabled, 1=Host Network, 2=Join Network 
- VOID Return


SetWifiSSID

SetWifiSSID
Configures the WIFI SSID string and stores into the none volatie memory onboard the robot arm. Call the SetWifiMode macro after this to action the change. 
- STRING SSID
Netword ID String, Max 32 Characters 
- VOID Return


SetXYZ

SetXYZ
Moves the machine so that the end tool is in the specified XYZ position. Returns 1 if the coordinates are within range of the Arm else returns 0. 
- INT X
 
- INT Y
 
- INT Z
 
- BOOL Return


StoreAngles

StoreAngles
Stores the specified joint angles into an internal none volatile memory location. 
- BYTE PositionIndex
Range: 0 to 40 
- FLOAT AngleA
Range 0.0 to 359.0 
- FLOAT AngleB
Range 0.0 to 359.0 
- FLOAT AngleC
Range 0.0 to 359.0 
- VOID Return


StoreCurrentPosition

StoreCurrentPosition
Stores the current position into an internal none volatile memory location. 
- BYTE PositionIndex
Range: 0 to 40 
- VOID Return


StoreMotors

StoreMotors
Stores the specified step position into an internal none volatile memory location. 
- BYTE PositionIndex
Range: 0 to 40 
- UINT PositionA
 
- UINT PositionB
 
- UINT PositionC
 
- VOID Return


WhileMoving

WhileMoving
Blocking call that waits up to 10 seconds for the current movement operation to complete. Returns when complete. Return of 1 indicates movement complete, 0 indicates timeout. 
- BOOL Return


Property reference

Properties
Simulation Mode
 
API Settings
Comms Method
Selects the method to communicate with the Matrix 3 Axis Robot Arm. USB connection requires the USB drivers to be installed. Bluetooth connection requires the device first be paired using the Windows Bluetooth control panel. WIFI connection requires the connection settings to be configured first on the robot using USB or Bluetooth. CAN connection does not simulate and works on embedded hardware e.g. the MIAC. 
COM Port Settings
Autodetect
Autodetects the COM port, only works for USB AllCode connection.