Component: Robot Arm v2 (AllCode)

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

DisableMotors

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


GetAPI

Fc9-comp-macro.png GetAPI
Gets the API version number 
Fc9-u8-icon.png - BYTE 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


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


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


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


GetWifiIP

Fc9-comp-macro.png GetWifiIP
Collects the IP address of the robot arm WIFI connection. 
Fc9-string-icon.png - STRING 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


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


HomeAll

Fc9-comp-macro.png HomeAll
Function to automatically home all motors. Macro blocks until complete. 
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


Initialise

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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.