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

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
 
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 Pack==
Drives the Matrix Robot Arm v2 hardware via the AllCode API.
 
Allows connections via USB, Bluetooth and WIFI.
 
  
==Examples==
+
FREE
''<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.
 

Latest revision as of 17:21, 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 Pack

FREE

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Fc9-comp-macro.png SetWIFIPort
Sets the WIFI port number 
Fc9-u16-icon.png - UINT Port
Default 1245 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png 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. 
Fc9-bool-icon.png - BOOL Return


Fc9-comp-macro.png 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. 
Fc9-string-icon.png - STRING Password
Password String, Max 32 Characters 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png 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 
Fc9-f32-icon.png - FLOAT LengthA
 
Fc9-f32-icon.png - FLOAT LengthD
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetMovementSpeed
Controls the movement speed of the arm and the ramping increment 
Fc9-u16-icon.png - UINT Speed
Range 0-10000 default 8000 
Fc9-u16-icon.png - UINT Increment
Range 0 to 5000, default 50 
Fc9-void-icon.png - VOID Return


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


Fc9-comp-macro.png SetGripper
Sets the new position of the gripper 
Fc9-u8-icon.png - BYTE Position
0 = Closed, 255 = Fully Open 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png 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. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png StoreAngles
Stores the specified joint angles into an internal none volatile memory location. 
Fc9-u8-icon.png - BYTE PositionIndex
Range: 0 to 40 
Fc9-f32-icon.png - FLOAT AngleA
Range 0.0 to 359.0 
Fc9-f32-icon.png - FLOAT AngleB
Range 0.0 to 359.0 
Fc9-f32-icon.png - FLOAT AngleC
Range 0.0 to 359.0 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetWifiIP
Collects the IP address of the robot arm WIFI connection. 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png GetColourSensor
Samples and returns the RGB values read by the colour sensor 
Fc9-u8-icon.png - BYTE RGB
Byte Array To Hold the RGB sensor values 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetMotor
Sets the step position of a single motor 
Fc9-u8-icon.png - BYTE Motor
0=A, 1=B, 2=C 
Fc9-u16-icon.png - UINT Position
 
Fc9-void-icon.png - VOID Return


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


Fc9-comp-macro.png 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. 
Fc9-bool-icon.png - BOOL Return


Fc9-comp-macro.png SetAngle
Sets the angle of a single motor 
Fc9-u8-icon.png - BYTE Motor
0=A, 1=B, 2=C 
Fc9-f32-icon.png - FLOAT Angle
Range 0.0 to 359.0 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png 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. 
Fc9-s16-icon.png - INT X
 
Fc9-s16-icon.png - INT Y
 
Fc9-s16-icon.png - INT Z
 
Fc9-bool-icon.png - BOOL Return


Fc9-comp-macro.png 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. 
Fc9-string-icon.png - STRING Pin
Pin String, 4 Numeric Characters e.g. "1234" 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png HomeAll
Function to automatically home all motors. Macro blocks until complete. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetRelay
Allows the vacuum relay to be switched on and off. 
Fc9-bool-icon.png - BOOL State
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png 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 
Fc9-f32-icon.png - FLOAT Radius
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetAngles
Sets the angle of all motors 
Fc9-f32-icon.png - FLOAT AngleA
Range 0.0 to 359.0 
Fc9-f32-icon.png - FLOAT AngleB
Range 0.0 to 359.0 
Fc9-f32-icon.png - FLOAT AngleC
Range 0.0 to 359.0 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GotoPosition
Recalls a position from the selected internal none volatile memory location. Performs linear interpolated movement to the selected position. 
Fc9-u8-icon.png - BYTE PositionIndex
Range: 0 to 40 
Fc9-void-icon.png - VOID Return


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


Fc9-comp-macro.png HomeAxis
Function to automatically home a specific motor. Macro blocks until complete. 
Fc9-u8-icon.png - BYTE Axis
0=A, 1=B, 2=C 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetAngles
Collects the current joint angles of the motors. 
Fc9-f32-icon.png - FLOAT Angles
Float Array To Hold the step position return values 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png DisableMotors
Disables all motors 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png StoreMotors
Stores the specified step position into an internal none volatile memory location. 
Fc9-u8-icon.png - BYTE PositionIndex
Range: 0 to 40 
Fc9-u16-icon.png - UINT PositionA
 
Fc9-u16-icon.png - UINT PositionB
 
Fc9-u16-icon.png - UINT PositionC
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetCanId
Stores the specified CAN ID into an internal none volatile memory location. 
Fc9-u16-icon.png - UINT ID
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetAPI
Gets the API version number 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png SetMotors
Sets the step position of all motors 
Fc9-u16-icon.png - UINT PositionA
 
Fc9-u16-icon.png - UINT PositionB
 
Fc9-u16-icon.png - UINT PositionC
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetCanMode
Configures the CAN mode. 
Fc9-bool-icon.png - BOOL Mode
0=Disabled, 1=Enabled 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png 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. 
Fc9-string-icon.png - STRING SSID
Netword ID String, Max 32 Characters 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetPosition
Collects the current step positions of the motors. 
Fc9-u16-icon.png - UINT Positions
UINT Array To Hold the step position return values 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png StoreCurrentPosition
Stores the current position into an internal none volatile memory location. 
Fc9-u8-icon.png - BYTE PositionIndex
Range: 0 to 40 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetXYZ
Collects the current XYZ position of the end tool. 
Fc9-s16-icon.png - INT XYZ
INT Array To Hold the X, Y and Z return values 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetBluetoothMode
Configures the Bluetooth mode. 
Fc9-bool-icon.png - BOOL Mode
0=Disabled, 1=Enabled 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Initialise
 
Fc9-bool-icon.png - BOOL Return


Fc9-comp-macro.png 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. 
Fc9-string-icon.png - STRING Name
Bluetooth Device String, Max 20 Characters 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Simulation Mode
 
Fc9-conn-icon.png API Settings
Fc9-type-16-icon.png 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. 
Fc9-conn-icon.png COM Port Settings
Fc9-type-7-icon.png Autodetect
Autodetects the COM port, only works for USB AllCode connection.