Difference between revisions of "Component: Robot Arm v2 (AllCode)"
From Flowcode Help
Jump to navigationJump to search(One intermediate revision by the same user not shown) | |||
Line 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
− | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/ | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_RA2_ComponentSource.fcsx FC_Comp_Source_RA2_ComponentSource.fcsx] |
− | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/ | + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_RA2_ComponentSource.fcsx FC_Comp_Source_RA2_ComponentSource.fcsx] |
==Detailed description== | ==Detailed description== | ||
Line 53: | Line 53: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
+ | |||
+ | |||
+ | |||
+ | |||
Line 813: | Line 817: | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
− | |||
− | |||
Latest revision as of 13:12, 7 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 DisableMotors
- 5.2 GetAPI
- 5.3 GetAngles
- 5.4 GetColourSensor
- 5.5 GetPLCInputs
- 5.6 GetPosition
- 5.7 GetWifiIP
- 5.8 GetXYZ
- 5.9 GotoPosition
- 5.10 HomeAll
- 5.11 HomeAxis
- 5.12 Initialise
- 5.13 IsMoving
- 5.14 ResetToBoot
- 5.15 SetAngle
- 5.16 SetAngles
- 5.17 SetBluetoothMode
- 5.18 SetBluetoothName
- 5.19 SetBluetoothPin
- 5.20 SetCalibrationLengths
- 5.21 SetCalibrationPosition
- 5.22 SetCalibrationRadius
- 5.23 SetCanId
- 5.24 SetCanMode
- 5.25 SetGripper
- 5.26 SetMotor
- 5.27 SetMotors
- 5.28 SetMovementSpeed
- 5.29 SetRelay
- 5.30 SetWIFIPassword
- 5.31 SetWIFIPort
- 5.32 SetWifiMode
- 5.33 SetWifiSSID
- 5.34 SetXYZ
- 5.35 StoreAngles
- 5.36 StoreCurrentPosition
- 5.37 StoreMotors
- 5.38 WhileMoving
- 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
DisableMotors
![]() |
DisableMotors |
Disables all motors | |
![]() |
Return |
GetAPI
![]() |
GetAPI |
Gets the API version number | |
![]() |
Return |
GetAngles
![]() |
GetAngles |
Collects the current joint angles of the motors. | |
![]() |
Angles |
Float Array To Hold the step position return values | |
![]() |
Return |
GetColourSensor
![]() |
GetColourSensor |
Samples and returns the RGB values read by the colour sensor | |
![]() |
RGB |
Byte Array To Hold the RGB sensor values | |
![]() |
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 |
GetPosition
![]() |
GetPosition |
Collects the current step positions of the motors. | |
![]() |
Positions |
UINT Array To Hold the step position return values | |
![]() |
Return |
GetWifiIP
![]() |
GetWifiIP |
Collects the IP address of the robot arm WIFI connection. | |
![]() |
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 |
GotoPosition
HomeAll
![]() |
HomeAll |
Function to automatically home all motors. Macro blocks until complete. | |
![]() |
Return |
HomeAxis
![]() |
HomeAxis |
Function to automatically home a specific motor. Macro blocks until complete. | |
![]() |
Axis |
0=A, 1=B, 2=C | |
![]() |
Return |
Initialise
![]() |
Initialise |
![]() |
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 |
ResetToBoot
![]() |
ResetToBoot |
Resets the board into bootload mode for reprogramming. Comms port will be closed on calling this macro, | |
![]() |
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 |
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 |
SetBluetoothMode
![]() |
SetBluetoothMode |
Configures the Bluetooth mode. | |
![]() |
Mode |
0=Disabled, 1=Enabled | |
![]() |
Return |
SetBluetoothName
SetBluetoothPin
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 |
SetCalibrationPosition
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 |
SetCanId
![]() |
SetCanId |
Stores the specified CAN ID into an internal none volatile memory location. | |
![]() |
ID |
![]() |
Return |
SetCanMode
![]() |
SetCanMode |
Configures the CAN mode. | |
![]() |
Mode |
0=Disabled, 1=Enabled | |
![]() |
Return |
SetGripper
![]() |
SetGripper |
Sets the new position of the gripper | |
![]() |
Position |
0 = Closed, 255 = Fully Open | |
![]() |
Return |
SetMotor
![]() |
SetMotor |
Sets the step position of a single motor | |
![]() |
Motor |
0=A, 1=B, 2=C | |
![]() |
Position |
![]() |
Return |
SetMotors
![]() |
SetMotors |
Sets the step position of all motors | |
![]() |
PositionA |
![]() |
PositionB |
![]() |
PositionC |
![]() |
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 |
SetRelay
![]() |
SetRelay |
Allows the vacuum relay to be switched on and off. | |
![]() |
State |
![]() |
Return |
SetWIFIPassword
SetWIFIPort
![]() |
SetWIFIPort |
Sets the WIFI port number | |
![]() |
Port |
Default 1245 | |
![]() |
Return |
SetWifiMode
SetWifiSSID
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 |
StoreAngles
StoreCurrentPosition
![]() |
StoreCurrentPosition |
Stores the current position into an internal none volatile memory location. | |
![]() |
PositionIndex |
Range: 0 to 40 | |
![]() |
Return |
StoreMotors
![]() |
StoreMotors |
Stores the specified step position into an internal none volatile memory location. | |
![]() |
PositionIndex |
Range: 0 to 40 | |
![]() |
PositionA |
![]() |
PositionB |
![]() |
PositionC |
![]() |
Return |
WhileMoving