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

From Flowcode Help
Jump to navigationJump to search
Line 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


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

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


WhileMoving

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


SetWIFIPassword

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


SetCalibrationLengths

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


SetMovementSpeed

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


GetPLCInputs

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


SetGripper

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


SetCalibrationPosition

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


StoreAngles

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


GetWifiIP

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


GetColourSensor

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


SetMotor

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


ResetToBoot

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


IsMoving

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


SetAngle

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


SetXYZ

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


SetBluetoothPin

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


HomeAll

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


SetRelay

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


SetCalibrationRadius

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


SetAngles

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


GotoPosition

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


SetWifiMode

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


HomeAxis

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


GetAngles

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


DisableMotors

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


StoreMotors

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


SetCanId

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


GetAPI

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


SetMotors

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


SetCanMode

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


SetWifiSSID

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


GetPosition

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


StoreCurrentPosition

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


GetXYZ

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


SetBluetoothMode

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


Initialise

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


SetBluetoothName

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.