Component: Robot Arm AllCode API (Misc)

From Flowcode Help
Jump to navigationJump to search
Author Matrix TSL
Version 1.0
Category Misc


Robot Arm AllCode API component

Matrix 5-axis Robot Arm with Gripper. Compatible with the Matrix Robot ARM Training Curriculum and Hardware. Features gripper pressure sensor, light sensor, colour sensor, Potentiometer, Magnetic sensor.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_RA_API_Component_Source.fcsx

Please click here to view the component source code (Beta): FC_Comp_Source_RA_API_Component_Source.fcsx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples








Macro reference

Beep

Fc9-comp-macro.png Beep
Allows the beeper to output a warning 
Fc9-u8-icon.png - BYTE Iterations
Number of times to repeat 
Fc9-u16-icon.png - UINT OnDelay
Delay in ms 
Fc9-u16-icon.png - UINT OffDelay
Delay in ms 
Fc9-u8-icon.png - BYTE Return


GetAPIVersion

Fc9-comp-macro.png GetAPIVersion
Gets the API version of the Robot ARM Firmware 
Fc9-u8-icon.png - BYTE Return


GotoPosition

Fc9-comp-macro.png GotoPosition
Recalls a previously saved position for the ARMs 5 axis. 
Fc9-u8-icon.png - BYTE Index
Save Index - Range 0-29 
Fc9-void-icon.png - VOID Return


GripperClose

Fc9-comp-macro.png GripperClose
Fully closes the gripper at the end of the arm ready to pick something up. Closes to a defined pressure using the built in pressure sensor. Returns 0 if nothing detected in the gripper Returns 1 if a valid object is detected 
Fc9-u8-icon.png - BYTE Pressure
Range 1 - 100, Default Pressure = 20 
Fc9-u8-icon.png - BYTE Return


GripperOpen

Fc9-comp-macro.png GripperOpen
Fully opens the gripper at the end of the arm ready to pick something up. 
Fc9-void-icon.png - VOID Return


KineGetXYZ

Fc9-comp-macro.png KineGetXYZ
Calculates the current XYZ position from the current servo position coordinates  
Fc9-u8-icon.png - BYTE Index
Range 0-2 : 0=X, 1=Y, 2=Z 
Fc9-s16-icon.png - INT Return


KineSetXYZ

Fc9-comp-macro.png KineSetXYZ
Sets the XYZ position and calculates the various servo motor angles required. Returns 0=Impossible, 1=InPosition 
Fc9-s16-icon.png - INT X
 
Fc9-s16-icon.png - INT Y
 
Fc9-s16-icon.png - INT Z
 
Fc9-u8-icon.png - BYTE Return


LCDClear

Fc9-comp-macro.png LCDClear
Clears the entire contents of the display. 
Fc9-void-icon.png - VOID Return


LCDClearLine

Fc9-comp-macro.png LCDClearLine
Clears a single line on the display and then moves the cursor to the start of the line to allow you to start populating the line with data. 
Fc9-u8-icon.png - BYTE Line
The line to clear, zero being the first (top) line of the display 
Fc9-void-icon.png - VOID Return


LCDCursor

Fc9-comp-macro.png LCDCursor
Moves the cursor on the LCD Display 
Fc9-u8-icon.png - BYTE X
Set the cursor position in the X plane, 0 is the left most cell (0-15) 
Fc9-u8-icon.png - BYTE Y
Set the cursor position in the Y plane, 0 is the top most cell (0-1) 
Fc9-void-icon.png - VOID Return


LCDPrintNum

Fc9-comp-macro.png LCDPrintNum
Will allow you to print a number. This is limited to a signed-INT, -32768 to 32767 
Fc9-s16-icon.png - INT Number
Enter the number or variable to print to the LCD 
Fc9-void-icon.png - VOID Return


LCDPrintStr

Fc9-comp-macro.png LCDPrintStr
Breaks down a string of text and sends it to the LCD via the private RawSend(byte, mask) macro 
Fc9-string-icon.png - STRING PrintString
Enter the text or variable to print to the LCD 
Fc9-void-icon.png - VOID Return


LCDVerbose

Fc9-comp-macro.png LCDVerbose
Controls if the LCD is in user mode or verbose API mode, 
Fc9-u8-icon.png - BYTE Mode
0=User Mode, 1=API Verbose Mode 
Fc9-void-icon.png - VOID Return


LEDOff

Fc9-comp-macro.png LEDOff
Switches off a single LED, LA0-LA7 
Fc9-u8-icon.png - BYTE Index
0=LA0, 1=LA1, 2=LA2, 3=LA3, 4=LA4, 5=LA5, 6=LA6, 7=LA7 
Fc9-void-icon.png - VOID Return


LEDOn

Fc9-comp-macro.png LEDOn
Switches on a single LED, LA0-LA7 
Fc9-u8-icon.png - BYTE Index
0=LA0, 1=LA1, 2=LA2, 3=LA3, 4=LA4, 5=LA5, 6=LA6, 7=LA7 
Fc9-void-icon.png - VOID Return


LEDWrite

Fc9-comp-macro.png LEDWrite
Allows a value to be sent to control all eight LEDs LA0-LA7 at once 
Fc9-u8-icon.png - BYTE Value
(0-63) 0b000000 
Fc9-void-icon.png - VOID Return


MotorsMoving

Fc9-comp-macro.png MotorsMoving
Checks to see if any of the motors are still moving. 
Fc9-u8-icon.png - BYTE Return


Park

Fc9-comp-macro.png Park
Parks the Robot ARM and switches off the servo motors 
Fc9-void-icon.png - VOID Return


ReadColour

Fc9-comp-macro.png ReadColour
Samples the Colour Sensor and reads the levels of Red, Green and Blue Light back as a 16-bit UINT variable. The colour format is 0b0BBBBBGGGGGRRRRR. The ReadColourChannel macro can be used to get individual channel colours. 
Fc9-u16-icon.png - UINT Return


ReadColourChannel

Fc9-comp-macro.png ReadColourChannel
Reads a single colour channel from the value returned from the ReadColour macro. 
Fc9-u8-icon.png - BYTE Index
0=Red, 1=Green, 2=Blue 
Fc9-u16-icon.png - UINT Colour
 
Fc9-u8-icon.png - BYTE Return


ReadPressure

Fc9-comp-macro.png ReadPressure
Read the value of the pressure sensor on the ARM gripper. Returns the value as a byte 
Fc9-u8-icon.png - BYTE Return


ReadSwitch

Fc9-comp-macro.png ReadSwitch
Read the value of a single switch. Returns the value as a byte 
Fc9-u8-icon.png - BYTE index
0=SA0, 1=SA1, 2=SA2, 3=SA3, 4=SA4, 5=SA5, 6=SA6, 7=SA7 
Fc9-u8-icon.png - BYTE Return


SetAllServos

Fc9-comp-macro.png SetAllServos
Move all the servo positions between 0-180 Deg 
Fc9-u8-icon.png - BYTE Servo0_Base
Position of servo0 in degrees (0-180) 
Fc9-u8-icon.png - BYTE Servo1_Shoulder
Position of servo1 in degrees (0-180) 
Fc9-u8-icon.png - BYTE Servo2_Elbow
Position of servo2 in degrees (0-180) 
Fc9-u8-icon.png - BYTE Servo3_Wrist
Position of servo3 in degrees (0-180) 
Fc9-u8-icon.png - BYTE Servo4_WristRotate
Position of servo4 in degrees (0-180) 
Fc9-void-icon.png - VOID Return


SetServo

Fc9-comp-macro.png SetServo
Move the specified servo motor position between 0-180 Deg 
Fc9-u8-icon.png - BYTE Index
Range 0-4 : 0=Base, 1=Shoulder, 2=Elbow, 3=Wrist, 4=WristRotate 
Fc9-u8-icon.png - BYTE Position
Position of servo in degrees (0-180) 
Fc9-void-icon.png - VOID Return


SetTrim

Fc9-comp-macro.png SetTrim
Allows minor adjustment on the 5 axis servo motors 
Fc9-u8-icon.png - BYTE Index
Motor Index Range 0-4 
Fc9-u8-icon.png - BYTE Trim
Amount of Trim Range 0-255, Default Value 128 
Fc9-void-icon.png - VOID Return


StoreCoords

Fc9-comp-macro.png StoreCoords
Stores the provided coordinates as a position the ARM can recall. 
Fc9-u8-icon.png - BYTE Index
Save Index - Range 0-29 
Fc9-u8-icon.png - BYTE Position0
Range: 0-180 
Fc9-u8-icon.png - BYTE Position1
Range: 0-180 
Fc9-u8-icon.png - BYTE Position2
Range: 0-180 
Fc9-u8-icon.png - BYTE Position3
Range: 0-180 
Fc9-u8-icon.png - BYTE Position4
Range: 0-180 
Fc9-void-icon.png - VOID Return


StorePosition

Fc9-comp-macro.png StorePosition
Stores the current position of the ARMs 5 axis. 
Fc9-u8-icon.png - BYTE Index
Save Index - Range 0-29 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Operating Mode
Fc9-type-16-icon.png Mode