Jump to content

Component: Robot Arm AllCode SIM (AllCode)

From Flowcode Help
Revision as of 09:59, 27 January 2023 by Wiki bot (talk | contribs)
Author Matrix TSL
Version 1.0
Category AllCode


Robot Arm AllCode SIM 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_Simulation_Source.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_RA_Simulation_Source.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Industrial Tanks

A simple example showing the hoppers, valves and pipes working together. Each tank automatically empties in turn.

Industrial Tanks

Macro reference

LEDOn
Switches on a single LED, LA0-LA7 
- BYTE Index
0=LA0, 1=LA1, 2=LA2, 3=LA3, 4=LA4, 5=LA5, 6=LA6, 7=LA7 
- VOID Return


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


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. 
- BYTE Line
The line to clear, zero being the first (top) line of the display 
- VOID Return


LEDOff
Switches off a single LED, LA0-LA7 
- BYTE Index
0=LA0, 1=LA1, 2=LA2, 3=LA3, 4=LA4, 5=LA5, 6=LA6, 7=LA7 
- VOID Return


SetMovementSpeed
Controls the speed of the robot movement 
- BYTE MovementSpeed
1=Normal Speed (Default), 2=DoubleSpeed 
- VOID Return


LEDWrite
Allows a value to be sent to control all eight LEDs LA0-LA7 at once 
- BYTE Value
(0-63) 0b000000 
- VOID Return


LinearInterpolation
Moves the robot to the new position so that all axis arrive at the same time. 
- BYTE pos0
 
- BYTE pos1
 
- BYTE pos2
 
- BYTE pos3
 
- BYTE pos4
 
- VOID Return


GripperOpen
Fully opens the gripper at the end of the arm ready to pick something up. 
- VOID Return


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


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


SetAllServos
Move all the servo positions between 0-180 Deg 
- BYTE Servo0_Base
Position of servo0 in degrees (0-180) 
- BYTE Servo1_Shoulder
Position of servo1 in degrees (0-180) 
- BYTE Servo2_Elbow
Position of servo2 in degrees (0-180) 
- BYTE Servo3_Wrist
Position of servo3 in degrees (0-180) 
- BYTE Servo4_WristRotate
Position of servo4 in degrees (0-180) 
- VOID Return


Park
Parks the Robot ARM and switches off the servo motors 
- VOID Return


StorePosition
Stores the current position of the ARMs 5 axis. 
- BYTE Index
Save Index - Range 0-29 
- VOID Return


ReadPressure
Read the value of the pressure sensor on the ARM gripper. Returns the value as a byte 
- BYTE Return


GotoPosition
Recalls a previously saved position for the ARMs 5 axis. 
- BYTE Index
Save Index - Range 0-29 
- VOID Return


MotorsMoving
Checks to see if any of the motors are still moving. 
- BYTE Return


Beep
Allows the beeper to output a warning 
- BYTE Iterations
 
- UINT OnDelay
Delay in ms 
- UINT OffDelay
Delay in ms 
- VOID Return


SetTrim
Allows minor adjustment on the 5 axis servo motors 
- BYTE Index
Motor Index Range 0-4 
- BYTE Trim
Amount of Trim Range 0-255, Default Value 128 
- VOID Return


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


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 
- BYTE Pressure
Range 1 - 100, Default Pressure = 20 
- BYTE Return


LCDCursor
Moves the cursor on the LCD Display 
- BYTE X
Set the cursor position in the X plane, 0 is the left most cell (0-15) 
- BYTE Y
Set the cursor position in the Y plane, 0 is the top most cell (0-1) 
- VOID Return


LCDPrintNum
Will allow you to print a number. This is limited to a signed-INT, -32768 to 32767 
- INT Number
Enter the number or variable to print to the LCD 
- VOID Return


LCDClear
Clears the entire contents of the display. 
- VOID Return



Property reference

Properties
Starting Conditions
 

==Macro reference==

LEDOn
Switches on a single LED, LA0-LA7 
- BYTE Index
0=LA0, 1=LA1, 2=LA2, 3=LA3, 4=LA4, 5=LA5, 6=LA6, 7=LA7 
- VOID Return


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


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. 
- BYTE Line
The line to clear, zero being the first (top) line of the display 
- VOID Return


LEDOff
Switches off a single LED, LA0-LA7 
- BYTE Index
0=LA0, 1=LA1, 2=LA2, 3=LA3, 4=LA4, 5=LA5, 6=LA6, 7=LA7 
- VOID Return


SetMovementSpeed
Controls the speed of the robot movement 
- BYTE MovementSpeed
1=Normal Speed (Default), 2=DoubleSpeed 
- VOID Return


LEDWrite
Allows a value to be sent to control all eight LEDs LA0-LA7 at once 
- BYTE Value
(0-63) 0b000000 
- VOID Return


LinearInterpolation
Moves the robot to the new position so that all axis arrive at the same time. 
- BYTE pos0
 
- BYTE pos1
 
- BYTE pos2
 
- BYTE pos3
 
- BYTE pos4
 
- VOID Return


GripperOpen
Fully opens the gripper at the end of the arm ready to pick something up. 
- VOID Return


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


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


SetAllServos
Move all the servo positions between 0-180 Deg 
- BYTE Servo0_Base
Position of servo0 in degrees (0-180) 
- BYTE Servo1_Shoulder
Position of servo1 in degrees (0-180) 
- BYTE Servo2_Elbow
Position of servo2 in degrees (0-180) 
- BYTE Servo3_Wrist
Position of servo3 in degrees (0-180) 
- BYTE Servo4_WristRotate
Position of servo4 in degrees (0-180) 
- VOID Return


Park
Parks the Robot ARM and switches off the servo motors 
- VOID Return


StorePosition
Stores the current position of the ARMs 5 axis. 
- BYTE Index
Save Index - Range 0-29 
- VOID Return


ReadPressure
Read the value of the pressure sensor on the ARM gripper. Returns the value as a byte 
- BYTE Return


GotoPosition
Recalls a previously saved position for the ARMs 5 axis. 
- BYTE Index
Save Index - Range 0-29 
- VOID Return


MotorsMoving
Checks to see if any of the motors are still moving. 
- BYTE Return


Beep
Allows the beeper to output a warning 
- BYTE Iterations
 
- UINT OnDelay
Delay in ms 
- UINT OffDelay
Delay in ms 
- VOID Return


SetTrim
Allows minor adjustment on the 5 axis servo motors 
- BYTE Index
Motor Index Range 0-4 
- BYTE Trim
Amount of Trim Range 0-255, Default Value 128 
- VOID Return


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


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 
- BYTE Pressure
Range 1 - 100, Default Pressure = 20 
- BYTE Return


LCDCursor
Moves the cursor on the LCD Display 
- BYTE X
Set the cursor position in the X plane, 0 is the left most cell (0-15) 
- BYTE Y
Set the cursor position in the Y plane, 0 is the top most cell (0-1) 
- VOID Return


LCDPrintNum
Will allow you to print a number. This is limited to a signed-INT, -32768 to 32767 
- INT Number
Enter the number or variable to print to the LCD 
- VOID Return


LCDClear
Clears the entire contents of the display. 
- VOID Return



Property reference

Properties
Starting Conditions
 

==Macro reference==

LEDOn
Switches on a single LED, LA0-LA7 
- BYTE Index
0=LA0, 1=LA1, 2=LA2, 3=LA3, 4=LA4, 5=LA5, 6=LA6, 7=LA7 
- VOID Return


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


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. 
- BYTE Line
The line to clear, zero being the first (top) line of the display 
- VOID Return


LEDOff
Switches off a single LED, LA0-LA7 
- BYTE Index
0=LA0, 1=LA1, 2=LA2, 3=LA3, 4=LA4, 5=LA5, 6=LA6, 7=LA7 
- VOID Return


SetMovementSpeed
Controls the speed of the robot movement 
- BYTE MovementSpeed
1=Normal Speed (Default), 2=DoubleSpeed 
- VOID Return


LEDWrite
Allows a value to be sent to control all eight LEDs LA0-LA7 at once 
- BYTE Value
(0-63) 0b000000 
- VOID Return


LinearInterpolation
Moves the robot to the new position so that all axis arrive at the same time. 
- BYTE pos0
 
- BYTE pos1
 
- BYTE pos2
 
- BYTE pos3
 
- BYTE pos4
 
- VOID Return


GripperOpen
Fully opens the gripper at the end of the arm ready to pick something up. 
- VOID Return


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


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


SetAllServos
Move all the servo positions between 0-180 Deg 
- BYTE Servo0_Base
Position of servo0 in degrees (0-180) 
- BYTE Servo1_Shoulder
Position of servo1 in degrees (0-180) 
- BYTE Servo2_Elbow
Position of servo2 in degrees (0-180) 
- BYTE Servo3_Wrist
Position of servo3 in degrees (0-180) 
- BYTE Servo4_WristRotate
Position of servo4 in degrees (0-180) 
- VOID Return


Park
Parks the Robot ARM and switches off the servo motors 
- VOID Return


StorePosition
Stores the current position of the ARMs 5 axis. 
- BYTE Index
Save Index - Range 0-29 
- VOID Return


ReadPressure
Read the value of the pressure sensor on the ARM gripper. Returns the value as a byte 
- BYTE Return


GotoPosition
Recalls a previously saved position for the ARMs 5 axis. 
- BYTE Index
Save Index - Range 0-29 
- VOID Return


MotorsMoving
Checks to see if any of the motors are still moving. 
- BYTE Return


Beep
Allows the beeper to output a warning 
- BYTE Iterations
 
- UINT OnDelay
Delay in ms 
- UINT OffDelay
Delay in ms 
- VOID Return


SetTrim
Allows minor adjustment on the 5 axis servo motors 
- BYTE Index
Motor Index Range 0-4 
- BYTE Trim
Amount of Trim Range 0-255, Default Value 128 
- VOID Return


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


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 
- BYTE Pressure
Range 1 - 100, Default Pressure = 20 
- BYTE Return


LCDCursor
Moves the cursor on the LCD Display 
- BYTE X
Set the cursor position in the X plane, 0 is the left most cell (0-15) 
- BYTE Y
Set the cursor position in the Y plane, 0 is the top most cell (0-1) 
- VOID Return


LCDPrintNum
Will allow you to print a number. This is limited to a signed-INT, -32768 to 32767 
- INT Number
Enter the number or variable to print to the LCD 
- VOID Return


LCDClear
Clears the entire contents of the display. 
- VOID Return



Property reference

Properties
Starting Conditions
 

==Macro reference==

LEDOn
Switches on a single LED, LA0-LA7 
- BYTE Index
0=LA0, 1=LA1, 2=LA2, 3=LA3, 4=LA4, 5=LA5, 6=LA6, 7=LA7 
- VOID Return


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


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. 
- BYTE Line
The line to clear, zero being the first (top) line of the display 
- VOID Return


LEDOff
Switches off a single LED, LA0-LA7 
- BYTE Index
0=LA0, 1=LA1, 2=LA2, 3=LA3, 4=LA4, 5=LA5, 6=LA6, 7=LA7 
- VOID Return


SetMovementSpeed
Controls the speed of the robot movement 
- BYTE MovementSpeed
1=Normal Speed (Default), 2=DoubleSpeed 
- VOID Return


LEDWrite
Allows a value to be sent to control all eight LEDs LA0-LA7 at once 
- BYTE Value
(0-63) 0b000000 
- VOID Return


LinearInterpolation
Moves the robot to the new position so that all axis arrive at the same time. 
- BYTE pos0
 
- BYTE pos1
 
- BYTE pos2
 
- BYTE pos3
 
- BYTE pos4
 
- VOID Return


GripperOpen
Fully opens the gripper at the end of the arm ready to pick something up. 
- VOID Return


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


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


SetAllServos
Move all the servo positions between 0-180 Deg 
- BYTE Servo0_Base
Position of servo0 in degrees (0-180) 
- BYTE Servo1_Shoulder
Position of servo1 in degrees (0-180) 
- BYTE Servo2_Elbow
Position of servo2 in degrees (0-180) 
- BYTE Servo3_Wrist
Position of servo3 in degrees (0-180) 
- BYTE Servo4_WristRotate
Position of servo4 in degrees (0-180) 
- VOID Return


Park
Parks the Robot ARM and switches off the servo motors 
- VOID Return


StorePosition
Stores the current position of the ARMs 5 axis. 
- BYTE Index
Save Index - Range 0-29 
- VOID Return


ReadPressure
Read the value of the pressure sensor on the ARM gripper. Returns the value as a byte 
- BYTE Return


GotoPosition
Recalls a previously saved position for the ARMs 5 axis. 
- BYTE Index
Save Index - Range 0-29 
- VOID Return


MotorsMoving
Checks to see if any of the motors are still moving. 
- BYTE Return


Beep
Allows the beeper to output a warning 
- BYTE Iterations
 
- UINT OnDelay
Delay in ms 
- UINT OffDelay
Delay in ms 
- VOID Return


SetTrim
Allows minor adjustment on the 5 axis servo motors 
- BYTE Index
Motor Index Range 0-4 
- BYTE Trim
Amount of Trim Range 0-255, Default Value 128 
- VOID Return


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


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 
- BYTE Pressure
Range 1 - 100, Default Pressure = 20 
- BYTE Return


LCDCursor
Moves the cursor on the LCD Display 
- BYTE X
Set the cursor position in the X plane, 0 is the left most cell (0-15) 
- BYTE Y
Set the cursor position in the Y plane, 0 is the top most cell (0-1) 
- VOID Return


LCDPrintNum
Will allow you to print a number. This is limited to a signed-INT, -32768 to 32767 
- INT Number
Enter the number or variable to print to the LCD 
- VOID Return


LCDClear
Clears the entire contents of the display. 
- VOID Return



Property reference

Properties
Starting Conditions