Table of Contents

Interface IItem

Namespace
RoboDk.API
Assembly
RoboDkApi.dll
public interface IItem

Properties

ItemId

long ItemId { get; }

Property Value

long

Methods

AccuracyActive()

Request accurate kinematics status

bool AccuracyActive()

Returns

bool

Returns true if the accurate kinematics are being used

AddCurve(Mat, bool, ProjectionType)

Adds a curve provided point coordinates. The provided points must be a list of vertices. A vertex normal can be provided optionally.

IItem AddCurve(Mat curvePoints, bool addToRef = false, ProjectionType projectionType = ProjectionType.AlongNormalRecalc)

Parameters

curvePoints Mat

matrix 3xN or 6xN -> N must be multiple of 3

addToRef bool

add_to_ref -> If True, the curve will be added as part of the object in the RoboDK item tree

projectionType ProjectionType

Type of projection. For example: PROJECTION_ALONG_NORMAL_RECALC will project along the point normal and recalculate the normal vector on the surface projected.

Returns

IItem

returns the object where the curve was added or null if failed

AddCustomInstruction(string, string, string, bool, string)

Add a custom instruction. This instruction will execute a Python file or an executable file.

void AddCustomInstruction(string name, string pathRun, string pathIcon = "", bool blocking = true, string cmdRunOnRobot = "")

Parameters

name string
pathRun string

path to run(relative to RoboDK/bin folder or absolute path)

pathIcon string

icon path(relative to RoboDK/bin folder or absolute path)

blocking bool

True if blocking, 0 if it is a non blocking executable trigger

cmdRunOnRobot string

Command to run through the driver when connected to the robot

AddFile(string)

Adds an object attached to this object

IItem AddFile(string filename)

Parameters

filename string

Any file to load, supported by RoboDK. Supported formats include STL, STEP, IGES, ROBOT, TOOL, RDK,... It is also possible to load supported robot programs, such as SRC (KUKA), SCRIPT (Universal Robots), LS (Fanuc), JBI (Motoman), MOD (ABB), PRG (ABB), ...

Returns

IItem

Returns loaded object

AddGeometry(IItem, Mat)

Makes a copy of the source item geometry adding it at a given position (pose), relative to this item

void AddGeometry(IItem source, Mat pose)

Parameters

source IItem

Source item

pose Mat

Relative position

AddMoveJ(IItem)

Adds a new robot move joint instruction to a program. Obsolete. Use MoveJ instead.

void AddMoveJ(IItem itemtarget)

Parameters

itemtarget IItem

target to move to

AddMoveL(IItem)

Adds a new robot move linear instruction to a program. Obsolete. Use MoveL instead.

void AddMoveL(IItem itemtarget)

Parameters

itemtarget IItem

target to move to

AddPoints(Mat, bool, ProjectionType)

Adds a list of points to the object. The provided points must be a list of vertices. A vertex normal can be provided optionally.

IItem AddPoints(Mat points, bool addToRef = false, ProjectionType projectionType = ProjectionType.AlongNormalRecalc)

Parameters

points Mat

list of points as a matrix (3xN matrix, or 6xN to provide point normals as ijk vectors)

addToRef bool

If True, the points will be added as part of the object in the RoboDK item tree (a reference object must be provided)

projectionType ProjectionType

Type of projection.Use the PROJECTION_* flags.

Returns

IItem

added object/shape (0 if failed)

AddShape(Mat)

Adds a shape to the object provided some triangle coordinates. Triangles must be provided as a list of vertices. A vertex normal can be provided optionally.

IItem AddShape(Mat trianglePoints)

Parameters

trianglePoints Mat

List of vertices grouped by triangles (3xN or 6xN matrix, N must be multiple of 3 because vertices must be stacked by groups of 3)

Returns

IItem

Added object/shape

AddShape(List<Mat>)

Adds a shape to the object provided some triangle coordinates. Triangles must be provided as a list of vertices. A vertex normal can be provided optionally.

IItem AddShape(List<Mat> listTrianglePoints)

Parameters

listTrianglePoints List<Mat>

List of Mat objects. Each Mat object is a list of vertices grouped by triangles (3xN or 6xN matrix, N must be multiple of 3 because vertices must be stacked by groups of 3)

Returns

IItem

Added object/shape

AddTool(Mat, string)

Adds an empty tool to the robot provided the tool pose (4x4 Matrix) and the tool name.

IItem AddTool(Mat toolPose, string toolName = "New TCP")

Parameters

toolPose Mat
toolName string

Returns

IItem

new item created

AttachClosest()

Attach the closest object to the tool. Returns the item that was attached. Use item.Valid() to check if an object was attached to the tool.

IItem AttachClosest()

Returns

IItem

Busy()

Checks if a robot or program is currently running (busy or moving)

bool Busy()

Returns

bool

busy status (true=moving, false=stopped)

Childs()

Returns a list of the item childs that are attached to the provided item.

List<IItem> Childs()

Returns

List<IItem>

item x n -> list of child items

Clone(IRoboDK)

Make a copy of the item with a new roboDK link.

IItem Clone(IRoboDK connectionLink)

Parameters

connectionLink IRoboDK

RoboDK link

Returns

IItem

new item

Collision(IItem)

Check if if this item is in a collision state with another item

bool Collision(IItem item)

Parameters

item IItem

Item to check for collisions

Returns

bool

Returns true if this item collides with another item; false otherwise.

Connect(string)

Connect to a real robot using the robot driver.

bool Connect(string robotIp = "")

Parameters

robotIp string

IP of the robot to connect. Leave empty to use the one defined in RoboDK

Returns

bool

status -> true if connected successfully, false if connection failed

ConnectSafe(string, int, int)

Connect to a real robot and wait for a connection to succeed.

bool ConnectSafe(string robotIp = "", int maxAttempts = 5, int waitConnection = 4)

Parameters

robotIp string

Robot IP. Leave blank to use the robot's connection params.

maxAttempts int

Maximum connection attemps before reporting an unsuccessful connection.

waitConnection int

Time to wait in seconds between connection attempts.

Returns

bool

True if connected successfully, else false.

ConnectedState()

Check connection status with a real robot.

RobotConnectionType ConnectedState()

Returns

RobotConnectionType

Status contains connection status code enum, Message contains error info if status is not "Ready".

ConnectionParams()

Returns the robot connection parameters.

RobotConnectionParameter ConnectionParams()

Returns

RobotConnectionParameter

Robot IP, Robot Port, FTP Path, FTP Username, FTP Password

Copy(bool)

Copy the item to the clipboard (same as Ctrl+C). Use together with Paste() to duplicate items.

void Copy(bool copy_children = true)

Parameters

copy_children bool

Set to false to prevent copying all items attached to this item

Delete()

Deletes an item and its childs from the station.

void Delete()

DetachAll(IItem)

Detaches any object attached to a tool.

void DetachAll(IItem parent = null)

Parameters

parent IItem

New parent item to attach, such as a reference frame(optional). If not provided, the items held by the tool will be placed at the station root.

DetachClosest(IItem)

Detach the closest object attached to the tool (see also: setParentStatic).

IItem DetachClosest(IItem parent = null)

Parameters

parent IItem

New parent item to attach, such as a reference frame(optional). If not provided, the items held by the tool will be placed at the station root.

Returns

IItem

Disconnect()

Disconnect from a real robot (when the robot driver is used)

bool Disconnect()

Returns

bool

status -> true if disconnected successfully, false if it failed. It can fail if it was previously disconnected manually for example.

Equals(IItem)

Compare this item with other item. Return true if they are the same; False otherwise.

bool Equals(IItem otherItem)

Parameters

otherItem IItem

Returns

bool

True if this item and other item is the same RoboDK item.

FilterProgram(string, out string)

Filter a program file to improve accuracy for a specific robot. The robot must have been previously calibrated.

bool FilterProgram(string filename, out string filterMessage)

Parameters

filename string

File path of the program. Formats supported include: JBI (Motoman), SRC (KUKA), MOD (ABB), PRG (ABB), LS (FANUC)

filterMessage string

The summary of the filtering

Returns

bool

Returns true if the filter succeeded, or false if there are filtering problems.

FilterTarget(Mat, double[])

Filters a target to improve accuracy. This option requires a calibrated robot.

FilterTargetResult FilterTarget(Mat pose, double[] approximatedJoints = null)

Parameters

pose Mat

Pose of the robot TCP with respect to the robot reference frame

approximatedJoints double[]

Approximated desired joints to define the preferred configuration

Returns

FilterTargetResult

FilterTargetResult with filtered pose and joints

Finish()

Disconnect from the RoboDK API. This flushes any pending program generation.

void Finish()

GeometryPose()

Returns the position (pose) the object geometry with respect to its own reference frame. This procedure works for tools and objects.

Mat GeometryPose()

Returns

Mat

4x4 homogeneous matrix (pose)

GetAnalogInput(string)

Get an Analog Input (AI). This function is only useful when connected to a real robot using the robot driver.

string GetAnalogInput(string input)

Parameters

input string

Analog Input (string or number)

Returns

string

Returns a string related to the state of the Analog Input (0-1 or other range depending on the robot driver). This function returns an empty string if the script is not executed on the robot.

GetColor()

Return the color of an Item (object, tool or robot). If the item has multiple colors it returns the first color available). A color is in the format COLOR = [R, G, B,(A = 1)] where all values range from 0 to 1.

Color GetColor()

Returns

Color

Color [R, G, B, A]

See Also

GetDigitalInput(string)

Get a Digital Input (DI). This function is only useful when connected to a real robot using the robot driver.

string GetDigitalInput(string input)

Parameters

input string

Digital Input (string or number)

Returns

string

Returns a string related to the state of the Digital Input (0/1 or other value depending on the robot driver). This function returns an empty string if the script is not executed on the robot.

GetInstruction(int)

Returns the program instruction at position id

ProgramInstruction GetInstruction(int instructionId)

Parameters

instructionId int

Returns

ProgramInstruction

program instruction at position instructionId

GetInstructionListJoints(double, double, string, CollisionCheckOptions, ListJointsType, int, double)

Returns a list of joints. Linear moves are rounded according to the smoothing parameter set inside the program.

InstructionListJointsResult GetInstructionListJoints(double mmStep = 10, double degStep = 5, string saveToFile = "", CollisionCheckOptions collisionCheck = CollisionCheckOptions.CollisionCheckOff, ListJointsType flags = ListJointsType.Any, int timeoutSec = 3600, double time_step = 0.2)

Parameters

mmStep double

Maximum step in millimeters for linear movements (millimeters)

degStep double

Maximum step for joint movements (degrees)

saveToFile string

Provide a file name to directly save the output to a file. If the file name is not provided it will return the matrix. If step values are very small, the returned matrix can be very large.

collisionCheck CollisionCheckOptions

Check for collisions: will set to 1 or 0

flags ListJointsType

Reserved for future compatibility

timeoutSec int

Maximum time to wait for the result (in seconds)

time_step double

Time step in seconds for time-based calculation (ListJointsType must be set to TimeBased)

Returns

InstructionListJointsResult

List of InstructionListJointsResult.

GetItemFlags()

Retrieve current item flags. Item flags allow defining how much access the user has to item-specific features.

ItemFlags GetItemFlags()

Returns

ItemFlags

Current Item Flags

GetItemType()

Returns the type of an item (robot, object, target, reference frame, ...)

ItemType GetItemType()

Returns

ItemType

GetJointPoses(double[])

Get positions of the joint links for a provided robot configuration (joints). If no joints are provided it will return the poses for the current robot position.

List<Mat> GetJointPoses(double[] joints = null)

Parameters

joints double[]

Robot configuration (joints)

Returns

List<Mat>

Returns an array of 4x4 homogeneous matrices. Index 0 is the base frame reference (it never moves when the joints move).

Returns an item pointer (Item class) to a robot, object, tool or program. This is useful to retrieve the relationship between programs, robots, tools and other specific projects.

IItem GetLink(ItemType typeLinked = ItemType.Robot)

Parameters

typeLinked ItemType

type of linked object to retrieve

Returns

IItem

Get all the items of a specific type for which GetLink returns this item.

List<IItem> GetLinks(ItemType typeLinked = ItemType.Robot)

Parameters

typeLinked ItemType

Type of the items to check for a link

Returns

List<IItem>

Returns a list of items for which GetLink return the specified item

GetParam(string)

Get a custom data parameter. Some items can hold custom data parameters.

byte[] GetParam(string param)

Parameters

param string

Returns

byte[]

GetPoints(ObjectSelectionType, int, out Mat)

Retrieves the point under the mouse cursor, a curve or the 3D points of an object. The points are provided in [XYZijk] format in relative coordinates. The XYZ are the local point coordinate and ijk is the normal of the surface.

string GetPoints(ObjectSelectionType featureType, int featureId, out Mat pointList)

Parameters

featureType ObjectSelectionType

The type of geometry (FEATURE_SURFACE, FEATURE_POINT, ...). Set to FEATURE_SURFACE and if not point or curve was selected, the name of the geometry will be 'point on surface'

featureId int

The internal ID to retrieve the right geometry from the object (use SelectedFeature)

pointList Mat

The point or a list of points as XYZijk, coordinates are relative to the object (ijk is the normal to the surface)

Returns

string

The name of the selected geometry (if applicable)

Get RoboDK low level link interface.

RoboDK.IRoboDKLink GetRoboDkLink()

Returns

RoboDK.IRoboDKLink

GetRunType()

Get the Run Type of a program to specify if a program made using the GUI will be run in simulation mode or on the real robot ("Run on robot" option).

ProgramExecutionType GetRunType()

Returns

ProgramExecutionType

Returns ProgramExecutionType (Simulator or Robot).

Htool()

Obsolete: Use PoseTool() instead. Returns the tool pose of an item. If a robot is provided it will get the tool pose of the active tool held by the robot.

Mat Htool()

Returns

Mat

4x4 homogeneous matrix (pose)

InstructionCount()

Returns the number of instructions of a program.

int InstructionCount()

Returns

int

InstructionDelete(int)

Delete an instruction of a program

bool InstructionDelete(int instructionId = 0)

Parameters

instructionId int

Instruction ID

Returns

bool

Returns true if success.

InstructionList(out Mat)

Returns the list of program instructions as an MxN matrix, where N is the number of instructions and M equals to 1 plus the number of robot axes.

int InstructionList(out Mat instructions)

Parameters

instructions Mat

the matrix of instructions

Returns

int

Returns 0 if success

InstructionListJoints(out string, out Mat, double, double, string, CollisionCheckOptions, ListJointsType, int, double)

Returns a list of joints an MxN matrix, where M is the number of robot axes plus 4 columns. Linear moves are rounded according to the smoothing parameter set inside the program.

int InstructionListJoints(out string errorMsg, out Mat jointList, double mmStep = 10, double degStep = 5, string saveToFile = "", CollisionCheckOptions collisionCheck = CollisionCheckOptions.CollisionCheckOff, ListJointsType flags = ListJointsType.Any, int timeoutSec = 3600, double time_step = 0.2)

Parameters

errorMsg string

Returns a human readable error message (if any)

jointList Mat

Returns the list of joints as [J1, J2, ..., Jn, ERROR, MM_STEP, DEG_STEP, MOVE_ID] if a file name is not specified

mmStep double

Maximum step in millimeters for linear movements (millimeters)

degStep double

Maximum step for joint movements (degrees)

saveToFile string

Provide a file name to directly save the output to a file. If the file name is not provided it will return the matrix. If step values are very small, the returned matrix can be very large.

collisionCheck CollisionCheckOptions

Check for collisions: will set to 1 or 0

flags ListJointsType

Reserved for future compatibility

timeoutSec int

Maximum time to wait for the result (in seconds)

time_step double

Time step for time-based calculation (ListJointsType must be set to TimeBased)

Returns

int

Returns 0 if success, otherwise, it will return negative values

InstructionSelect(int)

Select an instruction in the program as a reference to add new instructions. New instructions will be added after the selected instruction.

int InstructionSelect(int instructionId = -1)

Parameters

instructionId int

Instruction ID

Returns

int

If no Instruction ID is specified, the active instruction will be selected and returned (if the program is running), otherwise it returns -1.

IsInside(IItem)

Check if the object is inside the provided object.

bool IsInside(IItem objectParent)

Parameters

objectParent IItem

Returns

bool

Returns true if the object is inside the objectParent.

IsJointTarget()

Check if the target is a joint target. A joint target moves to the joint position without taking into account the cartesian coordinates.

bool IsJointTarget()

Returns

bool

Returns true if the target is a joint target.

JointLimits(out double[], out double[])

Returns the joint limits of a robot

void JointLimits(out double[] lowerLlimits, out double[] upperLimits)

Parameters

lowerLlimits double[]
upperLimits double[]

Joints()

Returns the current joints of a robot or the joints of a target. If the item is a cartesian target, it returns the preferred joints (configuration) to go to that cartesian position.

double[] Joints()

Returns

double[]

double x n -> joints matrix

JointsConfig(double[])

Returns the robot configuration state for a set of robot joints.

double[] JointsConfig(double[] joints)

Parameters

joints double[]

array of joints

Returns

double[]

3-array -> configuration status as [REAR, LOWERARM, FLIP]

JointsHome()

Returns the home joints of a robot. These joints can be manually set in the robot "Parameters" menu, then select "Set home position" SetJointsHome(double[])

double[] JointsHome()

Returns

double[]

double x n -> joints array

MakeProgram(string, RunMode)

Saves a program to a file.

bool MakeProgram(string filename = "", RunMode runMode = RunMode.MakeRobotProgram)

Parameters

filename string

File path of the program

runMode RunMode

RUNMODE_MAKE_ROBOTPROG to generate the program file.Alternatively, Use RUNMODE_MAKE_ROBOTPROG_AND_UPLOAD or RUNMODE_MAKE_ROBOTPROG_AND_START to transfer the program through FTP and execute the program.

Returns

bool

Transfer succeeded is True if there was a successful program transfer (if RUNMODE_MAKE_ROBOTPROG_AND_UPLOAD or RUNMODE_MAKE_ROBOTPROG_AND_START are used)

MoveC(IItem, IItem, bool)

Moves a robot to a specific target ("Move Circular" mode). By default, this function blocks until the robot finishes its movements.

void MoveC(IItem itemtarget1, IItem itemtarget2, bool blocking = true)

Parameters

itemtarget1 IItem

target -> intermediate target to move to as a target item (RoboDK target item)

itemtarget2 IItem

target -> final target to move to as a target item (RoboDK target item)

blocking bool

blocking -> True if we want the instruction to block until the robot finished the movement (default=true)

MoveC(Mat, Mat, bool)

Moves a robot to a specific target ("Move Circular" mode). By default, this function blocks until the robot finishes its movements.

void MoveC(Mat target1, Mat target2, bool blocking = true)

Parameters

target1 Mat

pose -> intermediate pose target to move to. It must be a 4x4 Homogeneous matrix

target2 Mat

pose -> final pose target to move to. It must be a 4x4 Homogeneous matrix

blocking bool

blocking -> True if we want the instruction to block until the robot finished the movement (default=true)

MoveC(double[], double[], bool)

Moves a robot to a specific target ("Move Circular" mode). By default, this function blocks until the robot finishes its movements.

void MoveC(double[] joints1, double[] joints2, bool blocking = true)

Parameters

joints1 double[]

joints -> intermediate joint target to move to.

joints2 double[]

joints -> final joint target to move to.

blocking bool

blocking -> True if we want the instruction to block until the robot finished the movement (default=true)

MoveJ(IItem, bool)

Moves a robot to a specific target ("Move Joint" mode). By default, this function blocks until the robot finishes its movements. Given a target item, MoveJ can also be applied to programs and a new movement instruction will be added.

void MoveJ(IItem itemtarget, bool blocking = true)

Parameters

itemtarget IItem

target -> target to move to as a target item (RoboDK target item)

blocking bool

blocking -> True if we want the instruction to block until the robot finished the movement (default=true)

MoveJ(Mat, bool)

Moves a robot to a specific target ("Move Joint" mode). By default, this function blocks until the robot finishes its movements.

void MoveJ(Mat target, bool blocking = true)

Parameters

target Mat

pose -> pose target to move to. It must be a 4x4 Homogeneous matrix

blocking bool

blocking -> True if we want the instruction to block until the robot finished the movement (default=true)

MoveJ(double[], bool)

Moves a robot to a specific target ("Move Joint" mode). By default, this function blocks until the robot finishes its movements.

void MoveJ(double[] joints, bool blocking = true)

Parameters

joints double[]

joints -> joint target to move to.

blocking bool

blocking -> True if we want the instruction to block until the robot finished the movement (default=true)

MoveJ_Test(double[], double[], double)

Checks if a joint movement is free of collision.

int MoveJ_Test(double[] j1, double[] j2, double minstepDeg = -1)

Parameters

j1 double[]

joints -> start joints

j2 double[]

joints -> destination joints

minstepDeg double

(optional): maximum joint step in degrees

Returns

int

collision : returns 0 if the movement is free of collision. Otherwise it returns the number of pairs of objects that collided if there was a collision.

MoveJ_Test_Blend(double[], double[], double[], double, double)

Checks if a joint movement is free of collision.

bool MoveJ_Test_Blend(double[] j1, double[] j2, double[] j3, double blendDeg = 5, double minstepDeg = -1)

Parameters

j1 double[]

joints -> start joints

j2 double[]

joints -> joints via

j3 double[]

joints -> joints final destination

blendDeg double

Blend in degrees

minstepDeg double

(optional): maximum joint step in degrees

Returns

bool

collision : returns false if the movement is possible and free of collision. Otherwise it returns true.

MoveL(IItem, bool)

Moves a robot to a specific target ("Move Linear" mode). By default, this function blocks until the robot finishes its movements. Given a target item, MoveL can also be applied to programs and a new movement instruction will be added.

void MoveL(IItem itemtarget, bool blocking = true)

Parameters

itemtarget IItem

target -> target to move to as a target item (RoboDK target item)

blocking bool

blocking -> True if we want the instruction to block until the robot finished the movement (default=true)

MoveL(Mat, bool)

Moves a robot to a specific target ("Move Linear" mode). By default, this function blocks until the robot finishes its movements.

void MoveL(Mat target, bool blocking = true)

Parameters

target Mat

pose -> pose target to move to. It must be a 4x4 Homogeneous matrix

blocking bool

blocking -> True if we want the instruction to block until the robot finished the movement (default=true)

MoveL(double[], bool)

Moves a robot to a specific target ("Move Linear" mode). By default, this function blocks until the robot finishes its movements.

void MoveL(double[] joints, bool blocking = true)

Parameters

joints double[]

joints -> joint target to move to.

blocking bool

blocking -> True if we want the instruction to block until the robot finished the movement (default=true)

MoveL_Test(double[], Mat, double)

Checks if a linear movement is free of collision.

int MoveL_Test(double[] j1, Mat t2, double minstepDeg = -1)

Parameters

j1 double[]

joints -> start joints

t2 Mat

Pose -> destination pose with respect to the active tool and coordinate system

minstepDeg double

(optional): maximum joint step in degrees

Returns

int

collision : returns 0 if the movement is free of collision. Otherwise it returns the number of pairs of objects that collided if there was a collision.

Name()

Returns the name of an item. The name of the item is always displayed in the RoboDK station tree

string Name()

Returns

string

name of the item

Create a new communication link. Use this for robots if you use a multithread application running multiple robots at the same time.

void NewLink()

Returns an item pointer (:class:.Item) to a robot link. This is useful to show/hide certain robot links or alter their geometry.

IItem ObjectLink(int linkId = 0)

Parameters

linkId int

link index(0 for the robot base, 1 for the first link, ...)

Returns

IItem

Parent()

Returns the parent item of this item.

IItem Parent()

Returns

IItem

Paste(IItem)

Paste the copied item as a dependency of another item (same as Ctrl+V). Paste should be used after Copy().

IItem Paste(IItem paste_to = null)

Parameters

paste_to IItem

Item to attach the copied item (optional)

Returns

IItem

Returns the new item created

Paste(IItem, int)

Paste the copied item as a dependency of another item (same as Ctrl+V). Paste should be used after Copy().

List<IItem> Paste(IItem paste_to, int paste_times)

Parameters

paste_to IItem

Item to attach the copied item (can be null)

paste_times int

Number of times to paste the item

Returns

List<IItem>

Returns the list of new items created

Pause(double)

Generates a pause instruction for a robot or a program when generating code. Set it to -1 (default) if you want the robot to stop and let the user resume the program anytime.

void Pause(double timeMs = -1)

Parameters

timeMs double

Time in milliseconds

Pose()

Returns the local position (pose) of an object, target or reference frame. For example, the position of an object/frame/target with respect to its parent. If a robot is provided, it will get the pose of the end effector

Mat Pose()

Returns

Mat

4x4 homogeneous matrix (pose)

PoseAbs()

Returns the global position (pose) of an item. For example, the position of an object/frame/target with respect to the station origin.

Mat PoseAbs()

Returns

Mat

4x4 homogeneous matrix (pose)

PoseFrame()

Returns the reference frame pose of an item. If a robot is provided it will get the tool pose of the active reference frame used by the robot.

Mat PoseFrame()

Returns

Mat

4x4 homogeneous matrix (pose)

PoseTool()

Returns the tool pose of an item. If a robot is provided it will get the tool pose of the active tool held by the robot.

Mat PoseTool()

Returns

Mat

4x4 homogeneous matrix (pose)

ProgramStart(string, string, string)

Defines the name of the program when the program is generated. It is also possible to specify the name of the post processor as well as the folder to save the program. This method must be called before any program output is generated (before any robot movement or other instruction).

int ProgramStart(string progname, string defaultfolder = "", string postprocessor = "")

Parameters

progname string

name of the program

defaultfolder string

folder to save the program, leave empty to use the default program folder

postprocessor string

name of the post processor (for a post processor in C:/RoboDK/Posts/Fanuc_post.py it is possible to provide "Fanuc_post.py" or simply "Fanuc_post")

Returns

int

ProjectPoints(Mat, ProjectionType)

Projects a point to the object given its coordinates. The provided points must be a list of [XYZ] coordinates. Optionally, a vertex normal can be provided [XYZijk].

Mat ProjectPoints(Mat points, ProjectionType projectionType = ProjectionType.AlongNormalRecalc)

Parameters

points Mat

matrix 3xN or 6xN -> list of points to project

projectionType ProjectionType

projection_type -> Type of projection. For example: ProjectionType.AlongNormalRecalc will project along the point normal and recalculate the normal vector on the surface projected.

Returns

Mat

projected points (empty matrix if failed)

RDK()

Returns the RoboDK link Robolink().

RoboDK RDK()

Returns

RoboDK

RL()

Use RDK() instead. Returns the RoboDK link Robolink().

RoboDK RL()

Returns

RoboDK

Recolor(double[], double[], double)

Changes the color of a robot/object/tool. A color must must in the format COLOR=[R,G,B,(A=1)] where all values range from 0 to 1. Alpha (A) defaults to 1 (100% opaque). Set A to 0 to make an object transparent.

void Recolor(double[] tocolor, double[] fromcolor = null, double tolerance = 0.1)

Parameters

tocolor double[]

color to change to

fromcolor double[]

filter by this color

tolerance double

optional tolerance to use if a color filter is used (defaults to 0.1)

Recolor(Color, Color?, double)

Changes the color of a robot/object/tool. A color must must in the format COLOR=[R,G,B,(A=1)] where all values range from 0 to 1. Alpha (A) defaults to 1 (100% opaque). Set A to 0 to make an object transparent.

void Recolor(Color tocolor, Color? fromcolor = null, double tolerance = 0.1)

Parameters

tocolor Color

color to change to

fromcolor Color?

filter by this color

tolerance double

optional tolerance to use if a color filter is used (defaults to 0.1)

RunCode(string)

Runs a program. It returns the number of instructions that can be executed successfully (a quick program check is performed before the program starts) Program parameters can be provided for Python calls. This is a non-blocking call.Use IsBusy() to check if the program execution finished. Notes: if setRunMode(RUNMODE_SIMULATE) is used -> the program will be simulated (default run mode) if setRunMode(RUNMODE_RUN_ROBOT) is used ->the program will run on the robot(default when RUNMODE_RUN_ROBOT is used) if setRunMode(RUNMODE_RUN_ROBOT) is used together with program.setRunType(PROGRAM_RUN_ON_ROBOT) -> the program will run sequentially on the robot the same way as if we right clicked the program and selected "Run on robot" in the RoboDK GUI

int RunCode(string parameters = null)

Parameters

parameters string

Number of instructions that can be executed

Returns

int

RunCodeCustom(string, ProgramRunType)

Adds a program call, code, message or comment to the program. Returns True if succeeded.

bool RunCodeCustom(string code, ProgramRunType runType = ProgramRunType.CallProgram)

Parameters

code string

string of the code or program to run

runType ProgramRunType

specify if the code is a program

Returns

bool

True if success; False othwersise

RunInstruction(string, ProgramRunType)

Adds a program call, code, message or comment to the program. Returns True if succeeded.

bool RunInstruction(string code, ProgramRunType runType = ProgramRunType.CallProgram)

Parameters

code string

string of the code or program to run

runType ProgramRunType

specify if the code is a program

Returns

bool

True if success; False othwersise

RunProgram()

Runs a program. It returns the number of instructions that can be executed successfully (a quick program check is performed before the program starts) This is a non-blocking call. Use IsBusy() to check if the program execution finished. Notes: if setRunMode(RUNMODE_SIMULATE) is used -> the program will be simulated (default run mode) if setRunMode(RUNMODE_RUN_ROBOT) is used -> the program will run on the robot (default when RUNMODE_RUN_ROBOT is used) if setRunMode(RUNMODE_RUN_ROBOT) is used together with program.setRunType(PROGRAM_RUN_ON_ROBOT) -> the program will run sequentially on the robot the same way as if we right clicked the program and selected "Run on robot" in the RoboDK GUI

int RunProgram()

Returns

int

number of instructions that can be executed

Save(string)

Save a station or object to a file

void Save(string filename)

Parameters

filename string

Scale(double[])

Apply a scale to an object to make it bigger or smaller. The scale can be uniform (if scale is a float value) or per axis (if scale is a vector).

void Scale(double[] scale)

Parameters

scale double[]

scale to apply as [scale_x, scale_y, scale_z]

SearchL(IItem, bool)

Moves a robot to a specific target and stops when a specific input switch is detected ("Search Linear" mode). This function waits (blocks) until the robot finishes its movements.

double[] SearchL(IItem target, bool blocking = true)

Parameters

target IItem

Target to move to as a target item (RoboDK target item)

blocking bool

Set to true to wait until the robot finished the movement (default=true)

Returns

double[]

SearchL(Mat, bool)

Moves a robot to a specific target and stops when a specific input switch is detected ("Search Linear" mode). This function waits (blocks) until the robot finishes its movements.

double[] SearchL(Mat target, bool blocking = true)

Parameters

target Mat

Pose target to move to. It must be a 4x4 Homogeneous matrix

blocking bool

Set to true to wait until the robot finished the movement (default=true)

Returns

double[]

SearchL(double[], bool)

Moves a robot to a specific target and stops when a specific input switch is detected ("Search Linear" mode). This function waits (blocks) until the robot finishes its movements.

double[] SearchL(double[] target, bool blocking = true)

Parameters

target double[]

Joint target to move to.

blocking bool

Set to true to wait until the robot finished the movement (default=true)

Returns

double[]

SelectedFeature(out ObjectSelectionType, out int)

Retrieve the currently selected feature for this object (surface, point, line, ...)

bool SelectedFeature(out ObjectSelectionType featureType, out int featureId)

Parameters

featureType ObjectSelectionType

The type of geometry, FEATURE_SURFACE, FEATURE_POINT, ...

featureId int

The internal ID to retrieve the raw geometry (use GetPoints)

Returns

bool

True if the object is selected

SetAcceleration(double)

Sets the linear acceleration of a robot in mm/s2

void SetAcceleration(double value)

Parameters

value double

Acceleration in mm/s2

SetAccelerationJoints(double)

Sets the joint acceleration of a robot

void SetAccelerationJoints(double value)

Parameters

value double

Acceleration in deg/s2 for rotary joints and mm/s2 for linear joints

SetAccuracyActive(bool)

Sets the accuracy of the robot active or inactive. A robot must have been calibrated to properly use this option.

void SetAccuracyActive(bool accurate = true)

Parameters

accurate bool

Set true to use the accurate model or false to use the nominal model

SetAnalogOutput(string, string)

Set an Analog Output (AO).

void SetAnalogOutput(string output, string value)

Parameters

output string

Analog Output (string or number)

value string

Desired value

SetAsCartesianTarget()

Sets a target as a cartesian target. A cartesian target moves to cartesian coordinates.

void SetAsCartesianTarget()

SetAsJointTarget()

Sets a target as a joint target. A joint target moves to a joints position without regarding the cartesian coordinates.

void SetAsJointTarget()

SetColor(int, Color)

Set the color of an object shape. It can also be used for tools. A color must in the format COLOR=[R, G, B,(A = 1)] where all values range from 0 to 1.

void SetColor(int shapeId, Color tocolor)

Parameters

shapeId int

ID of the shape: the ID is the order in which the shape was added using AddShape()

tocolor Color

color to set

SetColor(Color)

Set the color of an object, tool or robot. A color must in the format COLOR=[R, G, B,(A = 1)] where all values range from 0 to 1.

void SetColor(Color tocolor)

Parameters

tocolor Color

color to set

See Also

SetColorCurve(Color, int)

Set the color of a curve object. It can also be used for tools. A color must in the format COLOR=[R, G, B,(A = 1)] where all values range from 0 to 1.

void SetColorCurve(Color tocolor, int curveId = -1)

Parameters

tocolor Color

color to set

curveId int

ID of the curve: the ID is the order in which the shape was added using AddCurve()

SetDigitalOutput(string, string)

Set a Digital Output (DO). This command can also be used to set any generic variables to a desired value.

void SetDigitalOutput(string output, string value)

Parameters

output string

Digital Output (string or number)

value string

Desired value

SetFrame(IItem)

Obsolete: Use setPoseFrame instead. Sets the frame of a robot (user frame). The frame can be either an item or a 4x4 Matrix. If "frame" is an item, it links the robot to the frame item. If frame is a 4x4 Matrix, it updates the linked pose of the robot frame.

void SetFrame(IItem frame)

Parameters

frame IItem

item/pose -> frame item or 4x4 Matrix (pose of the reference frame)

SetFrame(Mat)

Obsolete: Use setPoseFrame instead. Sets the frame of a robot (user frame). The frame can be either an item or a 4x4 Matrix. If "frame" is an item, it links the robot to the frame item. If frame is a 4x4 Matrix, it updates the linked pose of the robot frame.

void SetFrame(Mat frame)

Parameters

frame Mat

item/pose -> frame item or 4x4 Matrix (pose of the reference frame)

SetGeometryPose(Mat)

Sets the position (pose) the object geometry with respect to its own reference frame. This procedure works for tools and objects.

void SetGeometryPose(Mat pose)

Parameters

pose Mat

4x4 homogeneous matrix

SetHtool(Mat)

Obsolete: Use setPoseTool(pose) instead. Sets the tool pose of a tool item. If a robot is provided it will set the tool pose of the active tool held by the robot.

void SetHtool(Mat pose)

Parameters

pose Mat

4x4 homogeneous matrix (pose)

SetInstruction(int, ProgramInstruction)

Sets the program instruction at position id

void SetInstruction(int instructionId, ProgramInstruction instruction)

Parameters

instructionId int
instruction ProgramInstruction

SetItemFlags(ItemFlags)

Update item flags. Item flags allow defining how much access the user has to item-specific features.

void SetItemFlags(ItemFlags itemFlags = ItemFlags.All)

Parameters

itemFlags ItemFlags

Item Flags to be set

SetJointLimits(double[], double[])

Sets the joint limits of a robot

void SetJointLimits(double[] lowerLlimits, double[] upperLimits)

Parameters

lowerLlimits double[]
upperLimits double[]

SetJoints(double[], SetJointsType)

Sets the current joints of a robot or the joints of a target. It the item is a cartesian target, it returns the preferred joints (configuration) to go to that cartesian position.

bool SetJoints(double[] joints, SetJointsType saturate_action = SetJointsType.Default)

Parameters

joints double[]

array of joint values, in degrees or mm for linear axes

saturate_action SetJointsType

Behavior to saturate or ignore invalid joints (only applicable to robot items)

Returns

bool

Returns True if the joints are valid (not saturated), False if they are outside the joint limitations.

SetJointsHome(double[])

Set the home position of the robot in the joint space. param joints: robot joints JointsHome()

void SetJointsHome(double[] joints)

Parameters

joints double[]

Home Position of all robot joints

Sets a link between this item and the specified item. This is useful to set the relationship between programs, robots, tools and other specific projects.

void SetLink(IItem item)

Parameters

item IItem

Item to link

SetMachiningParameters(string, IItem, string)

Update the robot milling path input and parameters. Parameter input can be an NC file (G-code or APT file) or an object item in RoboDK. A curve or a point follow project will be automatically set up for a robot manufacturing project. Tip: Use getLink() and setLink() to get/set the robot tool, reference frame, robot and program linked to the project. Tip: Use setPose() and setJoints() to update the path to tool orientation or the preferred start joints.

IItem SetMachiningParameters(string ncfile = "", IItem partObj = null, string options = "")

Parameters

ncfile string

path to the NC (G-code/APT/Point cloud) file to load (optional)

partObj IItem
options string

Additional options (optional)

Returns

IItem

Program (null). Use Update() to retrieve the result

SetName(string)

Set the name of a RoboDK item.

void SetName(string name)

Parameters

name string

SetParam(string, byte[])

Set a custom data parameter. Some items can hold custom data parameters.

void SetParam(string param, byte[] value)

Parameters

param string
value byte[]

SetParam(string, string)

Send a specific parameter for an item.

string SetParam(string param, string value = "")

Parameters

param string

Command name

value string

Command value (optional, not all commands require a value)

Returns

string

Command response

SetParent(IItem)

Attaches the item to a new parent while maintaining the relative position with its parent. The absolute position is changed.

void SetParent(IItem parent)

Parameters

parent IItem

SetParentStatic(IItem)

Attaches the item to another parent while maintaining the current absolute position in the station. The relationship between this item and its parent is changed to maintain the abosolute position.

void SetParentStatic(IItem parent)

Parameters

parent IItem

parent item to attach this item

SetPose(Mat)

Sets the local position (pose) of an object, target or reference frame. For example, the position of an object/frame/target with respect to its parent. If a robot is provided, it will set the pose of the end effector.

void SetPose(Mat pose)

Parameters

pose Mat

4x4 homogeneous matrix

SetPoseAbs(Mat)

Sets the global position (pose) of an item. For example, the position of an object/frame/target with respect to the station origin.

void SetPoseAbs(Mat pose)

Parameters

pose Mat

4x4 homogeneous matrix (pose)

SetPoseFrame(IItem)

Sets the tool of a robot or a tool object (Tool Center Point, or TCP) to a frame position. To set a new pose position SetPoseFrame(Mat) If the item is a tool, it links the robot to the tool item.If tool is a pose, it updates the current robot TCP.

void SetPoseFrame(IItem frameItem)

Parameters

frameItem IItem

SetPoseFrame(Mat)

Sets the tool of a robot or a tool object (Tool Center Point, or TCP) to a frame position. To set a new frame position SetPoseFrame(IItem) If the item is a tool, it links the robot to the tool item.If tool is a pose, it updates the current robot TCP.

void SetPoseFrame(Mat framePose)

Parameters

framePose Mat

SetPoseTool(IItem)

Sets the tool of a robot or a tool object (Tool Center Point, or TCP). The tool pose can be either an item or a 4x4 Matrix. If the item is a tool, it links the robot to the tool item.If tool is a pose, it updates the current robot TCP.

void SetPoseTool(IItem toolItem)

Parameters

toolItem IItem

SetPoseTool(Mat)

Sets the tool of a robot or a tool object (Tool Center Point, or TCP). The tool pose can be either an item or a 4x4 Matrix. If the item is a tool, it links the robot to the tool item.If tool is a pose, it updates the current robot TCP.

void SetPoseTool(Mat toolPose)

Parameters

toolPose Mat

SetRobot(IItem)

Sets the robot of a program or a target. You must set the robot linked to a program or a target every time you copy paste these objects. If the robot is not provided, the first available robot will be chosen automatically.

void SetRobot(IItem robot = null)

Parameters

robot IItem

Robot item

SetRounding(double)

Sets the rounding accuracy to smooth the edges of corners. In general, it is recommended to allow a small approximation near the corners to maintain a constant speed. Setting a rounding values greater than 0 helps avoiding jerky movements caused by constant acceleration and decelerations.

void SetRounding(double rounding)

Parameters

rounding double

SetRunType(ProgramExecutionType)

Sets if the program will be run in simulation mode or on the real robot. Use: "PROGRAM_RUN_ON_SIMULATOR" to set the program to run on the simulator only or "PROGRAM_RUN_ON_ROBOT" to force the program to run on the robot.

void SetRunType(ProgramExecutionType programExecutionType)

Parameters

programExecutionType ProgramExecutionType

SetSpeed(double, double, double, double)

Sets the speed and/or the acceleration of a robot.

void SetSpeed(double speedLinear, double accelLinear = -1, double speedJoints = -1, double accelJoints = -1)

Parameters

speedLinear double

linear speed in mm/s (-1 = no change)

accelLinear double

linear acceleration in mm/s2 (-1 = no change)

speedJoints double

joint speed in deg/s (-1 = no change)

accelJoints double

joint acceleration in deg/s2 (-1 = no change)

SetSpeedJoints(double)

Sets the joint speed of a robot

void SetSpeedJoints(double value)

Parameters

value double

Speed in deg/s for rotary joints and mm/s for linear joints

SetTool(IItem)

Obsolete: Use setPoseTool instead. Sets the tool pose of a robot. The tool pose can be either an item or a 4x4 Matrix. If "tool" is an item, it links the robot to the tool item. If tool is a 4x4 Matrix, it updates the linked pose of the robot tool.

void SetTool(IItem tool)

Parameters

tool IItem

item/pose -> tool item or 4x4 Matrix (pose of the tool frame)

SetTool(Mat)

Obsolete: Use setPoseTool instead. Sets the tool pose of a robot. The tool pose can be either an item or a 4x4 Matrix. If "tool" is an item, it links the robot to the tool item. If tool is a 4x4 Matrix, it updates the linked pose of the robot tool.

void SetTool(Mat tool)

Parameters

tool Mat

item/pose -> tool item or 4x4 Matrix (pose of the tool frame)

SetTransparency(double)

Set the alpha channel of an object, tool or robot. The alpha channel must remain between 0 and 1.

void SetTransparency(double alpha)

Parameters

alpha double

transparency level

See Also

SetValue(string, Mat)

Set a specific property name to a given value. This is reserved for internal purposes and future compatibility.

Mat SetValue(string variableName, Mat value = null)

Parameters

variableName string

Property name

value Mat

Property value

Returns

Mat

SetValue(string, string)

Set a specific property name to a given value. This is reserved for internal purposes and future compatibility.

void SetValue(string variableName, string value)

Parameters

variableName string

Property name

value string

Property value

SetVisible(bool, VisibleRefType)

Sets the item visiblity status

void SetVisible(bool visible, VisibleRefType visibleFrame = (VisibleRefType)-1)

Parameters

visible bool
visibleFrame VisibleRefType

srt the visible reference frame (1) or not visible (0)

SetZoneData(double)

Sets the robot movement smoothing accuracy (also known as zone data value).

Obsolete, use SetRounding instead.

[Obsolete]
void SetZoneData(double zonedata)

Parameters

zonedata double

zonedata value (int) (robot dependent, set to -1 for fine movements)

ShowAsCollided(bool, int)

Show an object or a robot link as collided (red)

void ShowAsCollided(bool collided, int robotLinkId = 0)

Parameters

collided bool
robotLinkId int

ShowInstructions(bool)

Show or hide instruction items of a program in the RoboDK tree

void ShowInstructions(bool show = true)

Parameters

show bool

ShowSequence(Mat)

Displays a sequence of joints

void ShowSequence(Mat sequence)

Parameters

sequence Mat

joint sequence as a 6xN matrix or instruction sequence as a 7xN matrix

ShowSequence(List<double[]>, List<Mat>, SequenceDisplayFlags, int)

Displays a sequence of joints or poses

void ShowSequence(List<double[]> joints = null, List<Mat> poses = null, SequenceDisplayFlags flags = (SequenceDisplayFlags)-1, int timeout = -1)

Parameters

joints List<double[]>

List of joint arrays

poses List<Mat>

List of poses

flags SequenceDisplayFlags

Display options

timeout int

Display timeout, in milliseconds (default: -1)

ShowTargets(bool)

Show or hide targets of a program in the RoboDK tree

void ShowTargets(bool show = true)

Parameters

show bool

SimulatorJoints()

Return the current joint position of a robot (only from the simulator, never from the real robot). This should be used only when RoboDK is connected to the real robot and only the simulated robot needs to be retrieved(for example, if we want to move the robot using a spacemouse). Note: Use robot.Joints() instead to retrieve the simulated and real robot position when connected.

double[] SimulatorJoints()

Returns

double[]

double x n -> joints array

SolveFK(double[])

Computes the forward kinematics of the robot for the provided joints. The tool and the reference frame are not taken into account.

Mat SolveFK(double[] joints)

Parameters

joints double[]

Returns

Mat

4x4 homogeneous matrix: pose of the robot flange with respect to the robot base

SolveIK(Mat, double[], Mat, Mat)

Computes the inverse kinematics for the specified robot and pose. The joints returned are the closest to the current robot configuration (see SolveIK_All())

double[] SolveIK(Mat pose, double[] jointsApprox = null, Mat tool = null, Mat reference = null)

Parameters

pose Mat

4x4 matrix -> pose of the robot flange with respect to the robot base frame

jointsApprox double[]

Aproximate solution. Leave empty to return the closest match to the current robot position.

tool Mat

4x4 matrix -> Optionally provide a tool, otherwise, the robot flange is used. Tip: use robot.PoseTool() to retrieve the active robot tool.

reference Mat

4x4 matrix -> Optionally provide a reference, otherwise, the robot base is used. Tip: use robot.PoseFrame() to retrieve the active robot reference frame.

Returns

double[]

array of joints

SolveIK_All(Mat, Mat, Mat)

Computes the inverse kinematics for the specified robot and pose. The function returns all available joint solutions as a 2D matrix.

Mat SolveIK_All(Mat pose, Mat tool = null, Mat reference = null)

Parameters

pose Mat

4x4 matrix -> pose of the robot tool with respect to the robot frame

tool Mat

4x4 matrix -> Optionally provide a tool, otherwise, the robot flange is used. Tip: use robot.PoseTool() to retrieve the active robot tool.

reference Mat

4x4 matrix -> Optionally provide a reference, otherwise, the robot base is used. Tip: use robot.PoseFrame() to retrieve the active robot reference frame.

Returns

Mat

double x n x m -> joint list (2D matrix)

Stop()

Stops a program or a robot

void Stop()

Update()

UpdateResult Update()

Returns

UpdateResult

Update(CollisionCheckOptions, int, double, double)

Updates a program and returns the estimated time and the number of valid instructions. An update can also be applied to a robot machining project. The update is performed on the generated program.

UpdateResult Update(CollisionCheckOptions collisionCheck, int timeoutSec = 3600, double linStepMm = -1, double jointStepDeg = -1)

Parameters

collisionCheck CollisionCheckOptions

check_collisions: Check collisions (COLLISION_ON -yes- or COLLISION_OFF -no-)

timeoutSec int

Maximum time to wait for the update to complete (in seconds)

linStepMm double

Maximum step in millimeters for linear movements (millimeters). Set to -1 to use the default, as specified in Tools-Options-Motion.

jointStepDeg double

Maximum step for joint movements (degrees). Set to -1 to use the default, as specified in Tools-Options-Motion.

Returns

UpdateResult

1.0 if there are no problems with the path or less than 1.0 if there is a problem in the path (ratio of problem)

Valid(bool)

Checks if the item is valid. An invalid item will be returned by an unsuccessful function call.

bool Valid(bool checkDeleted = false)

Parameters

checkDeleted bool

Check if the item was deleted in RoboDK

Returns

bool

true if valid, false if invalid

Visible()

Returns 1 if the item is visible, otherwise, returns 0.

bool Visible()

Returns

bool

true if visible, false if not visible

WaitDigitalInput(string, string, double)

Waits for an input to attain a given value. Optionally, a timeout can be provided.

void WaitDigitalInput(string input, string value, double timeout = -1)

Parameters

input string

Digital Input (string or number)

value string

Expected value

timeout double

Timeout in miliseconds

WaitFinished()

Wait until a program finishes or a robot completes its movement

void WaitFinished()

WaitMove(double)

Waits (blocks) until the robot finishes its movement.

void WaitMove(double timeoutSec = 300)

Parameters

timeoutSec double

timeout -> Max time to wait for robot to finish its movement (in seconds)

setConnectionParams(string, int, string, string, string)

Set the robot connection parameters.

void setConnectionParams(string robotIP, int port, string remotePath, string ftpUser, string ftpPass)

Parameters

robotIP string

IP address of robot.

port int

Port of robot.

remotePath string

FTP path to connect to.

ftpUser string

FTP username

ftpPass string

FTP password

setDO(string, string)

Sets a variable (output) to a given value. This can also be used to set any variables to a desired value.

void setDO(string ioVar, string ioValue)

Parameters

ioVar string

io_var -> digital output (string or number)

ioValue string

io_value -> value (string or number)

setParamRobotTool(double, double[])

Sets the tool mass and center of gravity. This is only used with accurate robots to improve accuracy.

void setParamRobotTool(double toolMass, double[] toolCOG)

Parameters

toolMass double

Tool weigth in Kg.

toolCOG double[]

Tool center of gravity as [x,y,z] with respect to the robot flange.

waitDI(string, string, double)

Waits for an input io_id to attain a given value io_value. Optionally, a timeout can be provided.

void waitDI(string ioVar, string ioValue, double timeoutMs = -1)

Parameters

ioVar string

io_var -> digital output (string or number)

ioValue string

io_value -> value (string or number)

timeoutMs double

int (optional) -> timeout in miliseconds