Component: Matrix Robot Arm (Electro Mechanical Simulation)
Author | Matrix TSL |
Version | 0.2 (Development) |
Category | Electro Mechanical Simulation |
Contents
- 1 Matrix Robot Arm component
- 2 Examples
- 3 Downloadable macro reference
- 4 Simulation macro reference
- 4.1 LEDOn
- 4.2 ReadLight
- 4.3 StoreCoords
- 4.4 LCDClearLine
- 4.5 LEDOff
- 4.6 LEDWrite
- 4.7 GetAPIVersion
- 4.8 GripperOpen
- 4.9 KineSetXYZ
- 4.10 ReadSwitch
- 4.11 LCDPrintStr
- 4.12 SetAllServos
- 4.13 ReadColourChannel
- 4.14 Park
- 4.15 StorePosition
- 4.16 ReadPressure
- 4.17 GotoPosition
- 4.18 MotorsMoving
- 4.19 Beep
- 4.20 ReadPot
- 4.21 SetTrim
- 4.22 SetServo
- 4.23 GripperClose
- 4.24 KineGetXYZ
- 4.25 ReadColour
- 4.26 LCDVerbose
- 4.27 LCDCursor
- 4.28 LCDPrintNum
- 4.29 LCDClear
- 5 Property reference
Matrix Robot Arm 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.
Examples
No additional examples
Downloadable macro reference
This component does not contain any downloadable macros
Simulation macro reference
LEDOn
Switches on a single LED, LA0-LA7
Parameters
- BYTE Index
- 0=LA0, 1=LA1, 2=LA2, 3=LA3, 4=LA4, 5=LA5, 6=LA6, 7=LA7
Return value
- This call does not return a value
ReadLight
Read the value of the light sensor on the EB090 board.
Returns the value as a byte
Parameters
- This macro has no parameters
Return value
StoreCoords
Stores the provided coordinates as a position the ARM can recall.
Parameters
- 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
Return value
- This call does not return a value
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.
Parameters
- BYTE Line
- The line to clear, zero being the first (top) line of the display
Return value
- This call does not return a value
LEDOff
Switches off a single LED, LA0-LA7
Parameters
- BYTE Index
- 0=LA0, 1=LA1, 2=LA2, 3=LA3, 4=LA4, 5=LA5, 6=LA6, 7=LA7
Return value
- This call does not return a value
LEDWrite
Allows a value to be sent to control all eight LEDs LA0-LA7 at once
Parameters
- BYTE Value
- (0-63) 0b000000
Return value
- This call does not return a value
GetAPIVersion
Gets the API version of the Robot ARM Firmware
Parameters
- This macro has no parameters
Return value
GripperOpen
Fully opens the gripper at the end of the arm ready to pick something up.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
KineSetXYZ
Sets the XYZ position and calculates the various servo motor angles required.
Returns 0=Impossible, 1=InPosition
Parameters
- INT X
- INT Y
- INT Z
Return value
ReadSwitch
Read the value of a single switch.
Returns the value as a byte
Parameters
- BYTE index
- 0=SA0, 1=SA1, 2=SA2, 3=SA3, 4=SA4, 5=SA5, 6=SA6, 7=SA7
Return value
LCDPrintStr
Breaks down a string of text and sends it to the LCD via the private RawSend(byte, mask) macro
Parameters
- <- STRING PrintString
- Enter the text or variable to print to the LCD
- This parameter may be returned back to the caller
Return value
- This call does not return a value
SetAllServos
Move all the servo positions between 0-180 Deg
Parameters
- 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)
Return value
- This call does not return a value
ReadColourChannel
Reads a single colour channel from the value returned from the ReadColour macro.
Parameters
- BYTE Index
- 0=Red, 1=Green, 2=Blue
- UINT Colour
Return value
Park
Parks the Robot ARM and switches off the servo motors
Parameters
- This macro has no parameters
Return value
- This call does not return a value
StorePosition
Stores the current position of the ARMs 5 axis.
Parameters
- BYTE Index
- Save Index - Range 0-29
Return value
- This call does not return a value
ReadPressure
Read the value of the pressure sensor on the ARM gripper.
Returns the value as a byte
Parameters
- This macro has no parameters
Return value
GotoPosition
Recalls a previously saved position for the ARMs 5 axis.
Parameters
- BYTE Index
- Save Index - Range 0-29
Return value
- This call does not return a value
MotorsMoving
Checks to see if any of the motors are still moving.
Parameters
- This macro has no parameters
Return value
Beep
Allows the beeper to output a warning
Parameters
- BYTE Iterations
- Number of times to repeat
- UINT OnDelay
- Delay in ms
- UINT OffDelay
- Delay in ms
Return value
ReadPot
Read the value of the potentiometer on the EB090 board.
Returns the value as a byte
Parameters
- This macro has no parameters
Return value
SetTrim
Allows minor adjustment on the 5 axis servo motors
Parameters
- BYTE Index
- Motor Index Range 0-4
- BYTE Trim
- Amount of Trim Range 0-255, Default Value 128
Return value
- This call does not return a value
SetServo
Move the specified servo motor position between 0-180 Deg
Parameters
- BYTE Index
- Range 0-4 : 0=Base, 1=Shoulder, 2=Elbow, 3=Wrist, 4=WristRotate
- BYTE Position
- Position of servo in degrees (0-180)
Return value
- This call does not return a value
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
Parameters
- BYTE Pressure
- Range 1 - 100, Default Pressure = 20
Return value
KineGetXYZ
Calculates the current XYZ position from the current servo position coordinates
Parameters
- BYTE Index
- Range 0-2 : 0=X, 1=Y, 2=Z
Return value
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.
Parameters
- This macro has no parameters
Return value
LCDVerbose
Controls if the LCD is in user mode or verbose API mode,
Parameters
- BYTE Mode
- 0=User Mode, 1=API Verbose Mode
Return value
- This call does not return a value
LCDCursor
Moves the cursor on the LCD Display
Parameters
- 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)
Return value
- This call does not return a value
LCDPrintNum
Will allow you to print a number. This is limited to a signed-INT, -32768 to 32767
Parameters
- INT Number
- Enter the number or variable to print to the LCD
Return value
- This call does not return a value
LCDClear
Clears the entire contents of the display.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Property reference
Mode
This property is of type Fixed list of ints and can be referenced with the variable name SimMode.
No additional information
API Connection Type
This property is of type Fixed list of ints and can be referenced with the variable name APIType.
No additional information
COM Port
This property is of type Fixed list of ints and can be referenced with the variable name COM_port.
No additional information
Refresh COM Ports
This property is of type True or false and can be referenced with the variable name Refresh.
No additional information
Baud
This property is of type Signed integer and can be referenced with the variable name baud_rate.
No additional information