Jump to content

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

From Flowcode Help
XML import
 
No edit summary
Line 1: Line 1:
 
{| style="width:50%"
 
{| width="50%"
|-
|-
| width="20%" style="color: gray;" | Author
| width="20%" style="color:gray;" | Author
| Matrix TSL
| Matrix TSL
|-
|-
| width="20%" style="color: gray;" | Version
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
| 1.0
|-
|-
| width="20%" style="color: gray;" | Category
| width="20%" style="color:gray;" | Category
| AllCode
| AllCode
|}
|}




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


==[[File:Component Icon 76e989d0_a2ed_457f_a293_3025b804f433.png|Image]] Robot Arm v2 component==
==Component Source Code==
Drives the Matrix Robot Arm v2 hardware via the AllCode API.
Allows connections via USB, Bluetooth and WIFI.


==Examples==
Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_RA2_ComponentSource.fcsx FC_Comp_Source_RA2_ComponentSource.fcsx]
''<span style="color:red;">No additional examples</span>''


==Detailed description==


==Downloadable macro reference==
''No detailed description exists yet for this component''


===<span style="font-weight: normal;"><u><tt>WhileMoving</tt></u></span>===
==Examples==
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.
''<span style="color:red;">No additional examples</span>''


'''Parameters'''


:''This macro has no parameters''
==Downloadable macro reference==


{| 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;" | '''SetWIFIPort'''
|-
| colspan="2" | Sets the WIFI port number&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="90%" style="border-top: 2px solid #000;" | ''Return''
|}


'''Return value'''


:[[Variable Types|BOOL]] : Returns true if the operation is a success, else false
{| 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;" | '''WhileMoving'''
|-
| 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" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| 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;" | '''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" | [[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''
|}


==Simulation macro reference==


===<span style="font-weight: normal;"><u><tt>SetWIFIPort</tt></u></span>===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Sets the WIFI port number
|-
| 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="90%" | LengthA
|-
| colspan="2" | &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="90%" style="border-top: 2px solid #000;" | ''Return''
|}


'''Parameters'''


:[[Variable Types|UINT]] ''Port''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::Default 1245
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMovementSpeed'''
|-
| colspan="2" | Controls the movement speed of the arm and the ramping increment&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="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="90%" style="border-top: 2px solid #000;" | ''Return''
|}




'''Return value'''
{| 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;" | '''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;
|-
|-
| 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''
|}


:''This call does not return a value''


{| 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;" | '''SetGripper'''
|-
| colspan="2" | Sets the new position of the gripper&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Position
|-
| 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="90%" style="border-top: 2px solid #000;" | ''Return''
|}


===<span style="font-weight: normal;"><u><tt>SetWIFIPassword</tt></u></span>===
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.
{| 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;" | '''SetCalibrationPosition'''
|-
| 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" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


'''Parameters'''


:[[Variable Types|<- STRING]] ''Password''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::Password String, Max 32 Characters
|-
::''This parameter may be returned back to the caller''
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StoreAngles'''
|-
| colspan="2" | Stores the specified joint angles into an internal none volatile memory location.&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-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="90%" style="border-top: 2px solid #000;" | ''Return''
|}




'''Return value'''
{| 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;" | '''GetWifiIP'''
|-
| 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-string-icon.png]] - STRING
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


:''This call does not return a value''


{| 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;" | '''GetColourSensor'''
|-
| colspan="2" | Samples and returns the RGB values read by the colour sensor&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | RGB
|-
| colspan="2" | Byte Array To Hold the RGB sensor values&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''
|}


===<span style="font-weight: normal;"><u><tt>SetCalibrationLengths</tt></u></span>===
Sets the lengths of parameters A and D used as part of the kinematics calculations


to get and set the angles using XYZ coordinates
{| 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;" | '''SetMotor'''
|-
| colspan="2" | Sets the step position of a single motor&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| 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''
|}


'''Parameters'''


:[[Variable Types|FLOAT]] ''LengthA''
{| 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;" | '''ResetToBoot'''
|-
| 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-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


:[[Variable Types|FLOAT]] ''LengthD''


{| 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;" | '''IsMoving'''
|-
| 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-bool-icon.png]] - BOOL
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


'''Return value'''


:''This call does not return a value''
{| 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;" | '''SetAngle'''
|-
| colspan="2" | Sets the angle of a single motor&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Motor
|-
| colspan="2" | 0=A, 1=B, 2=C&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Angle
|-
| 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="90%" style="border-top: 2px solid #000;" | ''Return''
|}




===<span style="font-weight: normal;"><u><tt>SetMovementSpeed</tt></u></span>===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Controls the movement speed of the arm and the ramping increment
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Y
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | Z
|-
| colspan="2" | &nbsp;
|-
| 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''
|}


'''Parameters'''


:[[Variable Types|UINT]] ''Speed''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::Range 0-10000 default 8000
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBluetoothPin'''
|-
| 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-string-icon.png]] - STRING
| width="90%" | Pin
|-
| 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="90%" style="border-top: 2px solid #000;" | ''Return''
|}


:[[Variable Types|UINT]] ''Increment''
::Range 0 to 5000, default 50


{| 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;" | '''HomeAll'''
|-
| 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-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


'''Return value'''


:''This call does not return a value''
{| 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;" | '''SetRelay'''
|-
| colspan="2" | Allows the vacuum relay to be switched on and off.&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-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




===<span style="font-weight: normal;"><u><tt>SetGripper</tt></u></span>===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Sets the new position of the gripper
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetCalibrationRadius'''
|-
| 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="90%" | Radius
|-
| 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''
|}


'''Parameters'''


:[[Variable Types|BYTE]] ''Position''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::0 = Closed, 255 = Fully Open
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAngles'''
|-
| colspan="2" | Sets the angle of all motors&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="90%" style="border-top: 2px solid #000;" | ''Return''
|}




'''Return value'''
{| 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;" | '''GotoPosition'''
|-
| colspan="2" | Recalls a position from the selected internal none volatile memory location. Performs linear interpolated movement to the selected position.&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" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


:''This call does not return a value''


{| 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;" | '''SetWifiMode'''
|-
| 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-u8-icon.png]] - BYTE
| width="90%" | Mode
|-
| 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="90%" style="border-top: 2px solid #000;" | ''Return''
|}


===<span style="font-weight: normal;"><u><tt>SetCalibrationPosition</tt></u></span>===
Called when the arm gripper is in the calibration position of X0 Y300 Z5


Reconfigures the kinematics calculations based on this.
{| 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;" | '''HomeAxis'''
|-
| 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="90%" | Axis
|-
| 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="90%" style="border-top: 2px solid #000;" | ''Return''
|}


Performed in factory to calibrate the arm, warning calling this function will effect factory calibration.


'''Parameters'''
{| 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;" | '''GetAngles'''
|-
| colspan="2" | Collects the current joint angles of the motors.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Angles
|-
| colspan="2" | Float 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="90%" style="border-top: 2px solid #000;" | ''Return''
|}


:''This macro has no parameters''


{| 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;
|-
|-
| 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''
|}


'''Return value'''


:''This call does not return a value''
{| 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;" | '''StoreMotors'''
|-
| colspan="2" | Stores the specified step position into an internal none volatile memory location.&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="90%" | PositionA
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PositionB
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PositionC
|-
| 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''
|}




===<span style="font-weight: normal;"><u><tt>StoreAngles</tt></u></span>===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Stores the specified joint angles into an internal none volatile memory location.
|-
| 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%" | ID
|-
| 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''
|}


'''Parameters'''


:[[Variable Types|BYTE]] ''PositionIndex''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::Range: 0 to 40
|-
| 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" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


:[[Variable Types|FLOAT]] ''AngleA''
::Range 0.0 to 359.0


:[[Variable Types|FLOAT]] ''AngleB''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::Range 0.0 to 359.0
|-
| 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-u16-icon.png]] - UINT
| width="90%" | PositionA
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PositionB
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PositionC
|-
| 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''
|}


:[[Variable Types|FLOAT]] ''AngleC''
::Range 0.0 to 359.0


{| 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;" | '''SetCanMode'''
|-
| colspan="2" | Configures the CAN mode.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Mode
|-
| colspan="2" | 0=Disabled, 1=Enabled&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''
|}


'''Return value'''


:''This call does not return a value''
{| 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;" | '''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;
|-
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | SSID
|-
| colspan="2" | Netword ID 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''
|}




===<span style="font-weight: normal;"><u><tt>GetWifiIP</tt></u></span>===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Collects the IP address of the robot arm WIFI connection.
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| 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-u16-icon.png]] - UINT
| width="90%" | Positions
|-
| 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="90%" style="border-top: 2px solid #000;" | ''Return''
|}


'''Parameters'''


:''This macro has no parameters''
{| 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;" | '''StoreCurrentPosition'''
|-
| colspan="2" | Stores the current position into an internal none volatile memory location.&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" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




'''Return value'''
{| 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;" | '''GetXYZ'''
|-
| colspan="2" | Collects the current XYZ position of the end tool.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| width="90%" | XYZ
|-
| colspan="2" | INT Array To Hold the X, Y and Z return values&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''
|}


:[[Variable Types|STRING]]


{| 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;" | '''SetBluetoothMode'''
|-
| colspan="2" | Configures the Bluetooth mode.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Mode
|-
| colspan="2" | 0=Disabled, 1=Enabled&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''
|}


===<span style="font-weight: normal;"><u><tt>GetColourSensor</tt></u></span>===
Samples and returns the RGB values read by the colour sensor


'''Parameters'''
{| 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;" | '''Initialise'''
|-
| colspan="2" | &nbsp;
|-
|-
| 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''
|}


:[[Variable Types|BYTE]] ''RGB''
::Byte Array To Hold the RGB sensor values
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>SetMotor</tt></u></span>===
Sets the step position of a single motor
'''Parameters'''
:[[Variable Types|BYTE]] ''Motor''
::0=A, 1=B, 2=C
:[[Variable Types|UINT]] ''Position''
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>IsMoving</tt></u></span>===
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.
'''Parameters'''
:''This macro has no parameters''
'''Return value'''
:[[Variable Types|BOOL]] : Returns true if the operation is a success, else false
===<span style="font-weight: normal;"><u><tt>ResetToBoot</tt></u></span>===
Resets the board into bootload mode for reprogramming.
Comms port will be closed on calling this macro,
'''Parameters'''
:''This macro has no parameters''
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>SetAngle</tt></u></span>===
Sets the angle of a single motor
'''Parameters'''
:[[Variable Types|BYTE]] ''Motor''
::0=A, 1=B, 2=C
:[[Variable Types|FLOAT]] ''Angle''
::Range 0.0 to 359.0
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>SetXYZ</tt></u></span>===
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.
'''Parameters'''
:[[Variable Types|INT]] ''X''
:[[Variable Types|INT]] ''Y''
:[[Variable Types|INT]] ''Z''
'''Return value'''
:[[Variable Types|BOOL]] : Returns true if the operation is a success, else false
===<span style="font-weight: normal;"><u><tt>SetBluetoothPin</tt></u></span>===
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.
'''Parameters'''
:[[Variable Types|<- STRING]] ''Pin''
::Pin String, 4 Numeric Characters e.g. "1234"
::''This parameter may be returned back to the caller''
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>HomeAll</tt></u></span>===
Function to automatically home all motors.
Macro blocks until complete.
'''Parameters'''
:''This macro has no parameters''
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>SetRelay</tt></u></span>===
Allows the vacuum relay to be switched on and off.
'''Parameters'''
:[[Variable Types|BOOL]] ''State''
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>SetCalibrationRadius</tt></u></span>===
Sets the lengths of parameters A and D used as part of the kinematics calculations
to get and set the angles using XYZ coordinates
'''Parameters'''
:[[Variable Types|FLOAT]] ''Radius''
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>GotoPosition</tt></u></span>===
Recalls a position from the selected internal none volatile memory location.
Performs linear interpolated movement to the selected position.
'''Parameters'''
:[[Variable Types|BYTE]] ''PositionIndex''
::Range: 0 to 40
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>SetAngles</tt></u></span>===
Sets the angle of all motors
'''Parameters'''
:[[Variable Types|FLOAT]] ''AngleA''
::Range 0.0 to 359.0
:[[Variable Types|FLOAT]] ''AngleB''
::Range 0.0 to 359.0
:[[Variable Types|FLOAT]] ''AngleC''
::Range 0.0 to 359.0
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>SetWifiMode</tt></u></span>===
Configures the WIFI mode.
When enabled the robot arm can either create its own WIFI network or join an existing WIFI network,
'''Parameters'''
:[[Variable Types|BYTE]] ''Mode''
::0=Disabled, 1=Host Network, 2=Join Network
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>DisableMotors</tt></u></span>===
Disables all motors
'''Parameters'''
:''This macro has no parameters''
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>GetAngles</tt></u></span>===
Collects the current joint angles of the motors.
'''Parameters'''
:[[Variable Types|FLOAT]] ''Angles''
::Float Array To Hold the step position return values
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>HomeAxis</tt></u></span>===
Function to automatically home  a specific motor.
Macro blocks until complete.
'''Parameters'''
:[[Variable Types|BYTE]] ''Axis''
::0=A, 1=B, 2=C
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>StoreMotors</tt></u></span>===
Stores the specified step position into an internal none volatile memory location.
'''Parameters'''
:[[Variable Types|BYTE]] ''PositionIndex''
::Range: 0 to 40
:[[Variable Types|UINT]] ''PositionA''
:[[Variable Types|UINT]] ''PositionB''
:[[Variable Types|UINT]] ''PositionC''
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>SetCanId</tt></u></span>===
Stores the specified CAN ID into an internal none volatile memory location.
'''Parameters'''
:[[Variable Types|UINT]] ''ID''
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>GetAPI</tt></u></span>===
Gets the API version number
'''Parameters'''
:''This macro has no parameters''
'''Return value'''
:[[Variable Types|BYTE]]
===<span style="font-weight: normal;"><u><tt>SetMotors</tt></u></span>===
Sets the step position of all motors
'''Parameters'''
:[[Variable Types|UINT]] ''PositionA''
:[[Variable Types|UINT]] ''PositionB''
:[[Variable Types|UINT]] ''PositionC''
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>SetCanMode</tt></u></span>===
Configures the CAN mode.
'''Parameters'''
:[[Variable Types|BOOL]] ''Mode''
::0=Disabled, 1=Enabled
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>SetWifiSSID</tt></u></span>===
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.
'''Parameters'''
:[[Variable Types|<- STRING]] ''SSID''
::Netword ID String, Max 32 Characters
::''This parameter may be returned back to the caller''
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>GetPosition</tt></u></span>===
Collects the current step positions of the motors.
'''Parameters'''
:[[Variable Types|UINT]] ''Positions''
::UINT Array To Hold the step position return values
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>StoreCurrentPosition</tt></u></span>===
Stores the current position into an internal none volatile memory location.
'''Parameters'''
:[[Variable Types|BYTE]] ''PositionIndex''
::Range: 0 to 40
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>GetXYZ</tt></u></span>===
Collects the current XYZ position of the end tool.
'''Parameters'''
:[[Variable Types|INT]] ''XYZ''
::INT Array To Hold the X, Y and Z return values
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>SetBluetoothMode</tt></u></span>===
Configures the Bluetooth mode.
'''Parameters'''
:[[Variable Types|BOOL]] ''Mode''
::0=Disabled, 1=Enabled
'''Return value'''
:''This call does not return a value''
===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
''<span style="color:red;">No additional information</span>''
'''Parameters'''
:''This macro has no parameters''
'''Return value'''
:[[Variable Types|BOOL]] : Returns true if the operation is a success, else false


 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===<span style="font-weight: normal;"><u><tt>SetBluetoothName</tt></u></span>===
|-
Configures the Bluetooth device name and stores into the none volatie memory onboard the robot arm.
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBluetoothName'''
Call the SetBluetoothMode macro after this to action the change.
|-
 
| 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;
'''Parameters'''
|-
 
|-
:[[Variable Types|<- STRING]] ''Name''
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
::Bluetooth Device String, Max 20 Characters
| width="90%" | Name
::''This parameter may be returned back to the caller''
|-
 
| colspan="2" | Bluetooth Device String, Max 20 Characters&nbsp;
 
|-
'''Return value'''
| 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''
:''This call does not return a value''
|}




Line 613: Line 748:


==Property reference==
==Property reference==
<span style="font-weight: normal;"><u>Simulation Mode</u></span>


This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''SimMode''.
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
''<span style="color:red;">No additional information</span>''
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
|-
 
|-
<span style="font-weight: normal;"><u>Comms Method</u></span>
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Simulation Mode
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''CommsMethod''.
|-
 
| colspan="2" | &nbsp;
Selects the method to communicate with the Matrix 3 Axis Robot Arm.
|-
 
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
USB connection requires the USB drivers to be installed.
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | API Settings
 
|-
Bluetooth connection requires the device first be paired using the Windows Bluetooth control panel.
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
WIFI connection requires the connection settings to be configured first on the robot using USB or Bluetooth.  
| width="90%" | Comms Method
 
|-
CAN connection does not simulate and works on embedded hardware e.g. the MIAC.
| 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;
 
|-
<span style="font-weight: normal;"><u>Autodetect</u></span>
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | COM Port Settings
This property is of type ''True or false'' and can be referenced with the variable name ''Autodetect''.
|-
 
|-
Autodetects the COM port, only works for USB AllCode connection.
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Autodetect
<span style="font-weight: normal;"><u>COM Port</u></span>
|-
 
| colspan="2" | Autodetects the COM port, only works for USB AllCode connection.&nbsp;
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''COMPort1::COM_port''.
|}
 
Selects which port to communicate with, only lists ports which are currently available.
 
<span style="font-weight: normal;"><u>Refresh COM Ports</u></span>
 
This property is of type ''True or false'' and can be referenced with the variable name ''COMPort1::Refresh''.
 
When set to yes the COM port list is rescanned for newly connected or available ports.
 
Note that refreshing the ports list may take a few seconds depending on the number of connected ports.
 
<span style="font-weight: normal;"><u>Network Interface</u></span>
 
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''NetworkComms1::NetworkInterface''.
 
Some computers may have several network interfaces such as ethernet ports and wifi access.
 
Select the correct network interface for the network you wish to connect to.
 
Use the IP address to confirm you are connected to the right network.
 
<span style="font-weight: normal;"><u>Local IP Address</u></span>
 
This property is of type ''Line of text'' and can be referenced with the variable name ''NetworkComms1::IPAddress''.
 
IP Address of the selected network interface.
 
<span style="font-weight: normal;"><u>Arm IP Address</u></span>
 
This property is of type ''Line of text'' and can be referenced with the variable name ''ArmIP''.
 
IP address of the robot arm.
 
You can find the Arm IP address by connecting using USB and running the GetIP component macro.
 
You may first need to configure the Robot Arm by providing the network SSID and Password.
 
<span style="font-weight: normal;"><u>Port</u></span>
 
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''Port''.
 
Allows the Robot Arm TCP/IP Port to be selected. Default 1245.
 
<span style="font-weight: normal;"><u>Channel</u></span>
 
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''can1::CHANNEL_CAN''.
 
Switches between Internal CAN peripheral and External CAN controller IC MCP2515.

Revision as of 17:50, 9 November 2022

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 for the component source code: FC_Comp_Source_RA2_ComponentSource.fcsx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


DisableMotors
Disables all motors 
- VOID Return


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


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


GetAPI
Gets the API version number 
- BYTE Return


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


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


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


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


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


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


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


Initialise
 
- BOOL Return


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



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.