Difference between revisions of "Component: Robot Arm v2 (AllCode)"
From Flowcode Help
Jump to navigationJump to searchLine 53: | Line 53: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
+ | |||
+ | |||
Line 59: | Line 61: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===SetWIFIPort=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 77: | Line 80: | ||
+ | ===WhileMoving=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 90: | Line 94: | ||
+ | ===SetWIFIPassword=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 108: | Line 113: | ||
+ | ===SetCalibrationLengths=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 131: | Line 137: | ||
+ | ===SetMovementSpeed=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 154: | Line 161: | ||
+ | ===GetPLCInputs=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 167: | Line 175: | ||
+ | ===SetGripper=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 185: | Line 194: | ||
+ | ===SetCalibrationPosition=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 198: | Line 208: | ||
+ | ===StoreAngles=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 231: | Line 242: | ||
+ | ===GetWifiIP=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 244: | Line 256: | ||
+ | ===GetColourSensor=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 262: | Line 275: | ||
+ | ===SetMotor=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 285: | Line 299: | ||
+ | ===ResetToBoot=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 298: | Line 313: | ||
+ | ===IsMoving=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 311: | Line 327: | ||
+ | ===SetAngle=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 334: | Line 351: | ||
+ | ===SetXYZ=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 362: | Line 380: | ||
+ | ===SetBluetoothPin=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 380: | Line 399: | ||
+ | ===HomeAll=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 393: | Line 413: | ||
+ | ===SetRelay=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 411: | Line 432: | ||
+ | ===SetCalibrationRadius=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 429: | Line 451: | ||
+ | ===SetAngles=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 457: | Line 480: | ||
+ | ===GotoPosition=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 475: | Line 499: | ||
+ | ===SetWifiMode=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 493: | Line 518: | ||
+ | ===HomeAxis=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 511: | Line 537: | ||
+ | ===GetAngles=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 529: | Line 556: | ||
+ | ===DisableMotors=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 542: | Line 570: | ||
+ | ===StoreMotors=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 575: | Line 604: | ||
+ | ===SetCanId=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 593: | Line 623: | ||
+ | ===GetAPI=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 606: | Line 637: | ||
+ | ===SetMotors=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 634: | Line 666: | ||
+ | ===SetCanMode=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 652: | Line 685: | ||
+ | ===SetWifiSSID=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 670: | Line 704: | ||
+ | ===GetPosition=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 688: | Line 723: | ||
+ | ===StoreCurrentPosition=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 706: | Line 742: | ||
+ | ===GetXYZ=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 724: | Line 761: | ||
+ | ===SetBluetoothMode=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 742: | Line 780: | ||
+ | ===Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 755: | Line 794: | ||
+ | ===SetBluetoothName=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- |
Revision as of 11:52, 3 February 2023
Author | Matrix TSL |
Version | 1.0 |
Category | AllCode |
Contents
- 1 Robot Arm v2 component
- 2 Component Source Code
- 3 Detailed description
- 4 Examples
- 5 Macro reference
- 5.1 SetWIFIPort
- 5.2 WhileMoving
- 5.3 SetWIFIPassword
- 5.4 SetCalibrationLengths
- 5.5 SetMovementSpeed
- 5.6 GetPLCInputs
- 5.7 SetGripper
- 5.8 SetCalibrationPosition
- 5.9 StoreAngles
- 5.10 GetWifiIP
- 5.11 GetColourSensor
- 5.12 SetMotor
- 5.13 ResetToBoot
- 5.14 IsMoving
- 5.15 SetAngle
- 5.16 SetXYZ
- 5.17 SetBluetoothPin
- 5.18 HomeAll
- 5.19 SetRelay
- 5.20 SetCalibrationRadius
- 5.21 SetAngles
- 5.22 GotoPosition
- 5.23 SetWifiMode
- 5.24 HomeAxis
- 5.25 GetAngles
- 5.26 DisableMotors
- 5.27 StoreMotors
- 5.28 SetCanId
- 5.29 GetAPI
- 5.30 SetMotors
- 5.31 SetCanMode
- 5.32 SetWifiSSID
- 5.33 GetPosition
- 5.34 StoreCurrentPosition
- 5.35 GetXYZ
- 5.36 SetBluetoothMode
- 5.37 Initialise
- 5.38 SetBluetoothName
- 6 Property reference
Robot Arm v2 component
Drives the Matrix Robot Arm v2 hardware via the AllCode API. Allows connections via USB, Bluetooth and WIFI.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_RA2_ComponentSource.fcsx
Please click here to view the component source code (Beta): FC_Comp_Source_RA2_ComponentSource.fcsx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
SetWIFIPort
![]() |
SetWIFIPort |
Sets the WIFI port number | |
![]() |
Port |
Default 1245 | |
![]() |
Return |
WhileMoving
SetWIFIPassword
SetCalibrationLengths
![]() |
SetCalibrationLengths |
Sets the lengths of parameters A and D used as part of the kinematics calculations to get and set the angles using XYZ coordinates | |
![]() |
LengthA |
![]() |
LengthD |
![]() |
Return |
SetMovementSpeed
![]() |
SetMovementSpeed |
Controls the movement speed of the arm and the ramping increment | |
![]() |
Speed |
Range 0-10000 default 8000 | |
![]() |
Increment |
Range 0 to 5000, default 50 | |
![]() |
Return |
GetPLCInputs
![]() |
GetPLCInputs |
Reads the inputs on the secondary grove connector used to connect to outputs from a connected PLC or other external switch. | |
![]() |
Return |
SetGripper
![]() |
SetGripper |
Sets the new position of the gripper | |
![]() |
Position |
0 = Closed, 255 = Fully Open | |
![]() |
Return |
SetCalibrationPosition
StoreAngles
GetWifiIP
![]() |
GetWifiIP |
Collects the IP address of the robot arm WIFI connection. | |
![]() |
Return |
GetColourSensor
![]() |
GetColourSensor |
Samples and returns the RGB values read by the colour sensor | |
![]() |
RGB |
Byte Array To Hold the RGB sensor values | |
![]() |
Return |
SetMotor
![]() |
SetMotor |
Sets the step position of a single motor | |
![]() |
Motor |
0=A, 1=B, 2=C | |
![]() |
Position |
![]() |
Return |
ResetToBoot
![]() |
ResetToBoot |
Resets the board into bootload mode for reprogramming. Comms port will be closed on calling this macro, | |
![]() |
Return |
IsMoving
![]() |
IsMoving |
Checks to see if the robot arm or gripper is moving. Returns 0 if the arm is not moving and 1 if the arm is still in transit. | |
![]() |
Return |
SetAngle
![]() |
SetAngle |
Sets the angle of a single motor | |
![]() |
Motor |
0=A, 1=B, 2=C | |
![]() |
Angle |
Range 0.0 to 359.0 | |
![]() |
Return |
SetXYZ
![]() |
SetXYZ |
Moves the machine so that the end tool is in the specified XYZ position. Returns 1 if the coordinates are within range of the Arm else returns 0. | |
![]() |
X |
![]() |
Y |
![]() |
Z |
![]() |
Return |
SetBluetoothPin
HomeAll
![]() |
HomeAll |
Function to automatically home all motors. Macro blocks until complete. | |
![]() |
Return |
SetRelay
![]() |
SetRelay |
Allows the vacuum relay to be switched on and off. | |
![]() |
State |
![]() |
Return |
SetCalibrationRadius
![]() |
SetCalibrationRadius |
Sets the lengths of parameters A and D used as part of the kinematics calculations to get and set the angles using XYZ coordinates | |
![]() |
Radius |
![]() |
Return |
SetAngles
![]() |
SetAngles |
Sets the angle of all motors | |
![]() |
AngleA |
Range 0.0 to 359.0 | |
![]() |
AngleB |
Range 0.0 to 359.0 | |
![]() |
AngleC |
Range 0.0 to 359.0 | |
![]() |
Return |
GotoPosition
SetWifiMode
HomeAxis
![]() |
HomeAxis |
Function to automatically home a specific motor. Macro blocks until complete. | |
![]() |
Axis |
0=A, 1=B, 2=C | |
![]() |
Return |
GetAngles
![]() |
GetAngles |
Collects the current joint angles of the motors. | |
![]() |
Angles |
Float Array To Hold the step position return values | |
![]() |
Return |
DisableMotors
![]() |
DisableMotors |
Disables all motors | |
![]() |
Return |
StoreMotors
![]() |
StoreMotors |
Stores the specified step position into an internal none volatile memory location. | |
![]() |
PositionIndex |
Range: 0 to 40 | |
![]() |
PositionA |
![]() |
PositionB |
![]() |
PositionC |
![]() |
Return |
SetCanId
![]() |
SetCanId |
Stores the specified CAN ID into an internal none volatile memory location. | |
![]() |
ID |
![]() |
Return |
GetAPI
![]() |
GetAPI |
Gets the API version number | |
![]() |
Return |
SetMotors
![]() |
SetMotors |
Sets the step position of all motors | |
![]() |
PositionA |
![]() |
PositionB |
![]() |
PositionC |
![]() |
Return |
SetCanMode
![]() |
SetCanMode |
Configures the CAN mode. | |
![]() |
Mode |
0=Disabled, 1=Enabled | |
![]() |
Return |
SetWifiSSID
GetPosition
![]() |
GetPosition |
Collects the current step positions of the motors. | |
![]() |
Positions |
UINT Array To Hold the step position return values | |
![]() |
Return |
StoreCurrentPosition
![]() |
StoreCurrentPosition |
Stores the current position into an internal none volatile memory location. | |
![]() |
PositionIndex |
Range: 0 to 40 | |
![]() |
Return |
GetXYZ
![]() |
GetXYZ |
Collects the current XYZ position of the end tool. | |
![]() |
XYZ |
INT Array To Hold the X, Y and Z return values | |
![]() |
Return |
SetBluetoothMode
![]() |
SetBluetoothMode |
Configures the Bluetooth mode. | |
![]() |
Mode |
0=Disabled, 1=Enabled | |
![]() |
Return |
Initialise
![]() |
Initialise |
![]() |
Return |
SetBluetoothName