Enumerations
Enumeration: OrientationRepresentation
Orientations in 3D can be represented either as:
* A 4-element unit-length Quaternion (x,y,z,w)
* A 3x3 transformation matrix
* A 3-vector of Euler angles
(Tait/Cardan-Bryant) Roll, Pitch, Yaw angles (alpha,beta,gamma).
This is equivelent to EulerXYZ and assumes that the
x-axis points forward, y-axis points right and the z-axis up.
(Aeronautical convention)
Quaternion | 0 |
|
Matrix | 1 |
|
EulerRPY | 2 |
|
Enumeration: LoggingLevel
Debug | 0 |
|
Info | 1 |
|
Warn | 2 |
|
Critical | 3 |
|
Enumeration: CoordFrameRepresentation
A Coordinate Frame is a reference frame in space
against which concrete coordinates are relative.
In 3D space a frame can be represented by an origin
and the direction of the x,y & z axes - explicitly or
otherwise.
* Implicit - the coordinate frame is implicit in its type (e.g. predefined)
(e.g. the base frame is relative to the fixed mount of the robot)
* Transform - the frame is represented by a standard 4x4 transformation matrix
* OffsetOrient - the frame is represented by an origin and orientation in 3D
* OriginPlane - the frame is defined by an origin and two additional points making up a plane
Implicit | 0 |
|
Transform | 1 |
|
OffsetOrient | 2 |
|
OriginPlane | 3 |
|
Enumeration: PredefinedCoordFrameType
Type of predefined coordinate frames (representaton is implicit)
* Joint - the joint space of the robot (dimension equals the number of axes / dof)
* World - Cartesian frame of environment (typically coincident with the robot base)
* Base - Cartesian frame of the base mount of the robot
(for robots not mounted on a moveable base, fixed relative to the robot frame)
* Robot - Cartesian frame of the robot (e.g. from first axis)
* ToolPlate - Cartesian frame of the tool mounting plate
* ToolTip - Cartesian frame of the tip of the tool (i.e. End-Effector)
(this depends on the specific tool)
* User - Cartesian frame configured by user stored in the controller
(multiple user frames can be defined and referenced by index)
Joint | 1 |
|
World | 2 |
|
Base | 7 |
|
Robot | 3 |
|
ToolPlate | 4 |
|
ToolTip | 5 |
|
User | 6 |
|
None | 0 |
|
Enumeration: DistanceUnit
None | 0 |
|
Millimeter | 1 |
|
Inch | 2 |
|
Meter | 3 |
|
Enumeration: OrientationUnit
None | 0 |
|
Pulse | 1 |
|
Radian | 2 |
|
Degree | 3 |
|
Enumeration: PendantEventType
Startup | 0 |
|
Shutdown | 1 |
|
SwitchedScreen | 2 |
|
PopupOpened | 3 |
|
PopupClosed | 4 |
|
UtilityOpened | 5 |
|
UtilityClosed | 6 |
|
UtilityMoved | 7 |
|
Clicked | 8 |
|
Pressed | 9 |
|
Released | 10 |
|
TextEdited | 11 |
|
Accepted | 12 |
|
EditingFinished | 13 |
|
CheckedChanged | 14 |
|
Activated | 15 |
|
PanelOpened | 16 |
|
PanelClosed | 17 |
|
Canceled | 18 |
|
JoggingPanelVisibilityChanged | 19 |
|
VisibleChanged | 20 |
|
Other | 16384 |
|
Enumeration: IntegrationPoint
UtilityWindow | 0 |
|
NavigationPanel | 10 |
|
ProgrammingCommandBar | 20 |
|
ProgrammingHeaderBar | 30 |
|
SmartFrameJogPanelTopLeft | 40 |
|
SmartFrameJogPanelTopRight | 41 |
|
SmartFrameJogPanelTopAny | 44 |
|
SmartFrameJogPanelBottomLeft | 45 |
|
SmartFrameJogPanelBottomCenter | 46 |
|
SmartFrameJogPanelBottomRight | 47 |
|
SmartFrameJogPanelBottomAny | 49 |
|
JogPanelTopCenter | 50 |
|
HomeScreen | 60 |
|
Enumeration: Disposition
Negative | 1 |
|
Neutral | 0 |
|
Positive | 2 |
|
Enumeration: ControllerEventType
Connected | 0 |
|
RobotModel | 1 |
|
ExclusiveControl | 2 |
|
CycleTime | 3 |
|
PowerOnTime | 4 |
|
ServoOnTime | 5 |
|
EnabledOptionsChanged | 6 |
|
OperationMode | 7 |
|
ServoState | 8 |
|
PlaybackState | 9 |
|
SpeedOverride | 10 |
|
ActiveTool | 11 |
|
AlarmActive | 12 |
|
ActiveAlarmsChanged | 13 |
|
RestartRequired | 14 |
|
EStopEngaged | 15 |
|
EnableSwitchActive | 16 |
|
RemoteMode | 17 |
|
JoggingActive | 18 |
|
JoggingSpeedChanged | 19 |
|
JoggingModeChanged | 20 |
|
RobotTCPPosition | 21 |
|
BrakeRelease | 22 |
|
SoftLimitRelease | 23 |
|
SelfInterferenceRelease | 24 |
|
AllLimitsRelease | 25 |
|
ParametersChanged | 26 |
|
PredefinedPositionsChanged | 27 |
|
FeatureAvailabilityChanged | 28 |
|
JointLimitsChanged | 29 |
|
JointMotorPulseDegreeRatioChanged | 30 |
|
FunctionalSafetyHardwareAvailable | 31 |
|
NetworkInterfacesChanged | 32 |
|
CurrentRobot | 33 |
|
JobTagsChanged | 34 |
|
JobListChanged | 35 |
|
JobStackChanged | 36 |
|
CurrentJob | 37 |
|
DefaultJob | 38 |
|
ToolsChanged | 39 |
|
ToolIOsChanged | 40 |
|
UserFramesChanged | 41 |
|
ZonesChanged | 42 |
|
SafetyRobotRangeLimitDataChanged | 43 |
|
SafetyAxisSpeedMonitorDataChanged | 44 |
|
SafetySpeedLimitDataChanged | 45 |
|
SafetyExternalForceMonitorFileChanged | 46 |
|
SafetyIOListChanged | 47 |
|
VariablesChanged | 48 |
|
VariableNamesChanged | 49 |
|
IONamesChanged | 50 |
|
IOValueChanged | 51 |
|
PermissionGranted | 1000 |
|
PermissionRevoked | 1001 |
|
Enumeration: OperationMode
Automatic - Play
Manual - Teach
Enumeration: PlaybackState
Enumeration: PlaybackCycle
Enumeration: ControlGroupType
Robot | 0 |
|
Base | 1 |
|
Station | 2 |
|
Combined | 254 |
|
None | 255 |
|
Enumeration: AddressSpace
Variable address space
Unified | 0 |
|
Byte | 1 |
|
Int | 2 |
|
DoubleInt | 3 |
|
Real | 4 |
|
String | 5 |
|
Position | 6 |
|
Enumeration: JogMode
Available modes of jogging
* Joint - the joint space of the robot (dimension equals the number of axes / dof)
* World - Cartesian frame of environment (typically coincident with the robot base)
* Tool - Cartesian frame of the tip of the tool (i.e. End-Effector)
(this depends on the specific tool)
* User - Cartesian frame configured by user stored in the controller
(multiple user frames can be defined and referenced by index)
* Hand - Hand guiding mode for jogging
* Smart - Smart Frame, based on the pendant orientation
(API version 3.0 and later)
Joint | 0 |
|
World | 1 |
|
Tool | 2 |
|
User | 3 |
|
Hand | 4 |
|
Smart | 5 |
|
Enumeration: JogSpeed
Available speeds for jogging
* Low - slowest
* Medium -
* High -
* Top - fastest
(API version 3.0 and later)
Type declarations
Typedef: ExtensionID
Base type: i64
Typedef: ControllerID
Base type: i64
Typedef: PendantID
Base type: i64
Typedef: FileID
Base type: i64
Typedef: Vector
Base type: list<double
>
Typedef: IVector
Base type: list<i64
>
Typedef: Point
Base type: Vector
Typedef: DataSet
Base type: map<string
, Data
>
Typedef: RobotIndex
Base type: i32
Typedef: UserFrameIndex
Base type: i32
Typedef: ZoneIndex
Base type: i32
Data structures
Exception: InvalidID
Key | Field | Type | Description | Requiredness | Default value |
Exception: IllegalArgument
Key | Field | Type | Description | Requiredness | Default value |
1 | msg | string | | required | |
Struct: Matrix
Key | Field | Type | Description | Requiredness | Default value |
1 | rows | i64 | | default | |
2 | cols | i64 | | default | |
3 | m | list<Vector > | | default | |
Struct: Orient
If rep is Quaternion or EulerRPY then v contains the elements,
otherwise if rep is Matrix m contains the 3x3 transform
Struct: VectorOrient
Key | Field | Type | Description | Requiredness | Default value |
1 | v | Vector | | default | |
2 | o | Orient | | default | |
Struct: PointPlane
Key | Field | Type | Description | Requiredness | Default value |
1 | origin | Point | | default | |
2 | xx | Point | | default | |
3 | xy | Point | | default | |
Position and Orientaiton in 3D defined by
an origin point and two points that define a plane
Struct: Version
Key | Field | Type | Description | Requiredness | Default value |
1 | nmajor | i16 | | default | |
2 | nminor | i16 | | default | |
3 | npatch | i16 | | default | |
4 | release | string | | optional | |
5 | build | string | | optional | |
Struct: CoordinateFrame
Represents a coordinate frame
Used as a reference frame for position coordinates
If rep is Implicit then it represents one of the predefined
frames defined by the physical configuration of the cell, robot and/or tool.
If predefined is:
* Joint - the frame is in the axis space of the robot joints (hence dimension is dof of the robot)
* World - the fixed Cartesian frame of the cell (often coincident with Base)
* Base - the base mount of the robot - requires robot set
* Robot - the robot itself (e.g. origin at first axis) - requires robot set
(unless mounted on a moveable base, fixed offet, possibly 0, from base)
* ToolPlate - toolplate of the end-effector (as when no tool mounted)
* ToolTip - 'business end' of the tool. Depends on which tool is mounted/active
and requires tool be set
* User - User defined frames configured in the controller - requires userFrame set.
User frames also have an associated tool in the YRC Controller, hence requires
tool to be set. pointplane may be set if user frame is defined
via origin point and points in plane
If rep is Transform then transform Matrix must be valid
If rep is OffsetOrient, vecorient must be valid
Union: Any
Key | Field | Type | Description | Requiredness | Default value |
1 | bValue | bool | | optional | |
2 | iValue | i64 | | optional | |
3 | rValue | double | | optional | |
4 | sValue | string | | optional | |
5 | vValue | Vector | | optional | |
6 | pValue | Position | | optional | |
7 | aValue | list<Any > | | optional | |
8 | mValue | map<string , Any > | | optional | |
Useful union for holding one of several data types
Struct: LoggingEvent
Key | Field | Type | Description | Requiredness | Default value |
1 | timestamp | i64 | | default | |
2 | datetime | string | | default | |
3 | level | LoggingLevel | | default | |
4 | entry | string | | default | |
Struct: Series
Key | Field | Type | Description | Requiredness | Default value |
1 | x | Vector | | default | |
2 | y | Vector | | default | |
3 | z | Vector | | optional | |
4 | color | string | | optional | |
5 | vertex | string | | optional | |
6 | style | string | | optional | |
7 | hidden | bool | | optional | |
8 | maxPts | i32 | | optional | |
Data structures for passing values to charts for plotting
Series data is used for line and scatter charts, while
category data is used for pie and bar charts
Struct: Category
Key | Field | Type | Description | Requiredness | Default value |
1 | v | double | | default | |
2 | color | string | | optional | |
3 | hidden | bool | | optional | |
Struct: DataPoint
Key | Field | Type | Description | Requiredness | Default value |
1 | x | double | | default | |
2 | y | double | | default | |
3 | z | double | | optional | |
Union: Data
Key | Field | Type | Description | Requiredness | Default value |
1 | sData | Series | | optional | |
2 | cData | Category | | optional | |
Struct: storageInfo
Key | Field | Type | Description | Requiredness | Default value |
1 | path | string | | default | |
2 | volname | string | | default | |
3 | volsize | string | | default | |
External File Storage: name, location and volume details
(API version 2.3 and later)
Struct: PendantEvent
Key | Field | Type | Description | Requiredness | Default value |
1 | eventType | PendantEventType | | required | |
2 | props | map<string , Any > | | optional | |
Struct: PropValues
Key | Field | Type | Description | Requiredness | Default value |
1 | itemID | string | | required | |
2 | props | map<string , Any > | | required | |
Struct: ControllerEvent
Key | Field | Type | Description | Requiredness | Default value |
1 | eventType | ControllerEventType | | required | |
2 | props | map<string , Any > | | optional | |
Struct: SimpleControlGroup
Key | Field | Type | Description | Requiredness | Default value |
1 | type | ControlGroupType | | default | |
2 | index | i8 | | optional | |
A simple control group (of axes)
A Robot, Robot Base (e.g. rail) or Station
Struct: CombinedControlGroup
Set of simple control groups combined into a new
control group, optionally designating a master
Struct: ControlGroup
General control group
May be
* simple, such as a single Robot OR
* a combined control group consisting of multiple
simple control groups.
Struct: RobotJobInfo
Key | Field | Type | Description | Requiredness | Default value |
1 | name | string | | default | |
2 | programmingLanguage | string | | default | |
3 | jobType | string | | default | |
4 | editable | bool | | default | |
5 | timestamp | i64 | | default | |
6 | datetime | string | | default | |
7 | comment | string | | default | |
8 | frame | CoordinateFrame | | default | |
9 | controlling | ControlGroup | | default | |
Key | Field | Type | Description | Requiredness | Default value |
1 | index | ToolIndex | | default | |
2 | name | string | | optional | |
3 | weight | double | | optional | |
4 | offset | Vector | | optional | |
5 | orient | Orient | | optional | |
6 | centerOfMass | Vector | | optional | |
7 | momentOfInertia | Vector | | optional | |
8 | blockIOName | string | | optional | |
9 | offsetUnit | DistanceUnit | | optional | |
10 | orientUnit | OrientationUnit | | optional | |
Default units kg, m and radian
(offsetUnit and orientUnit only available for API version 3.0 and later)
Struct: VariableAddress
Variable address (scope, address-space & address/index)
Struct: Zone
Key | Field | Type | Description | Requiredness | Default value |
1 | number | i16 | | default | |
2 | name | string | | optional | |
3 | enabled | bool | | optional | |
4 | action | ZoneAction | | optional | |
5 | minPos | Position | | optional | |
6 | maxPos | Position | | optional | |
Zone - a region in space
* In joint space, defined by minimum and maximum joint angles
* In Cartesian space, a lower/min and upper/max corner defining a rectangular prism (a box)
(only Base, Robot and User-Frames are supported for Cartesian zones)
Action determines if an I/O status signal changes in response to zone entry/exit,
or if an Alarm is issued upon entry.
Note: index is 0-based, interface Zone Numbers are 1-based
Services
Service: Extension
The Extension API.
Use this interface to initially register the extension with the main pendant
API Service and obtain handle IDs to the Controller and Pendant services.
Note in this function-level documentation, functions of the Controller Service
take an initial ControllerID parameter, Pendant Service functions take an initial PendantID etc.
However, if you are using a Yaskawa supplied client library these may be wrapped as
object methods and hence the initial id should be omitted.
Function: Extension.apiVersion
Version
apiVersion()
Version of API the service implements.
Smart Pendant | API version
2.0 | 2.0.4
2.1 | 2.1.0
2.2 | 2.2.0
2.3 | 2.3.0
3.0 | 3.0.0
Function: Extension.registerExtension
ExtensionID
registerExtension(string
canonicalName,
string
launchKey,
Version
version,
string
vendor,
set<string
>
supportedLanguages)
throws IllegalArgument
Register extension with Smart Pendant API service.
Extension must exist in the extension database (i.e. through installation)
Function: Extension.ping
void
ping(ExtensionID
id)
throws InvalidID
Indicate liveliness
API service will automatically unregister extensions that are unresponsive for some period.
If extension is not regularly calling events(), call ping() to indicate the extension is operational.
Function: Extension.log
void
log(ExtensionID
id,
LoggingLevel
level,
string
message)
Log message to standard pendant logging facility
Visible to end-users upon plain-text log file export.
Note that Debug level logging is ignored unless in Developer access level.
Note it is asynchronous so no errors/exceptions are thrown.
Function: Extension.subscribeLoggingEvents
void
subscribeLoggingEvents(ExtensionID
id)
Subscribe to receive log message events via events()
Function: Extension.unsubscribeLoggingEvents
void
unsubscribeLoggingEvents(ExtensionID
id)
Function: Extension.logEvents
list<LoggingEvent
>
logEvents(ExtensionID
id)
Obtain list of logging events that have occured since last call
NB: For development troubleshooting only, logging events
only available when development access enabled
Function: Extension.listAvailableStorage
list<storageInfo
>
listAvailableStorage(ExtensionID
eid)
throws InvalidID
Obtain a list of ExternalStorageDevice structs corresponding to USB storage
available to the pendant/and or controller. If no storage is available this
list will have no elements.
(API version 2.3 and later)
Function: Extension.listFiles
list<string
>
listFiles(ExtensionID
eid,
string
path)
throws InvalidID
list files/directories in external storage for the specified storage path
(API version 2.3 and later)
Function: Extension.openFile
FileID
openFile(ExtensionID
eid,
string
path,
string
flags)
throws InvalidID
Open files for reading and/or writing
the argument path is the full path to the file of interest
the argument flags can be 'r' (read) or 'w' (write w/ append)
(the FileID will return -1 if it failed to open the file)
(API version 2.3 and later)
Function: Extension.closeFile
void
closeFile(ExtensionID
eid,
FileID
id)
throws InvalidID
Close files from reading and/or writing
(API version 2.3 and later)
Function: Extension.isOpen
bool
isOpen(ExtensionID
eid,
FileID
id)
throws InvalidID
Check if the file is available for read/write.
(API version 2.3 and later)
Function: Extension.read
string
read(ExtensionID
eid,
FileID
id)
throws InvalidID
Read all data from the file.
(API version 2.3 and later)
Function: Extension.readChunk
string
readChunk(ExtensionID
eid,
FileID
id,
i64
offset,
i64
len)
throws InvalidID
Read a chunk of data from the file.
the argument offset indicates the number of bytes into the file
the argument len indicates the number of bytes to read
(API version 2.3 and later)
Function: Extension.write
void
write(ExtensionID
eid,
FileID
id,
string
data)
throws InvalidID
Write a string to a file. This will create a new file (and or directory)
if missing, but will simply append if the file already exists.
(API version 2.3 and later)
Function: Extension.flush
void
flush(ExtensionID
eid,
FileID
id)
throws InvalidID
Write the file to disk. For files not local to the pendant this
will FTP them to the controller.
(API version 2.3 and later)
Function: Extension.oneTimeAuthToken
string
oneTimeAuthToken(ExtensionID
id,
string
oneTimeSalt,
binary
publicKey)
throws InvalidID
Function: Extension.installPackage
list<string
>
installPackage(ExtensionID
id,
string
authToken,
binary
packageData,
string
overridePasscodeEnc)
Service: Pendant
The Pendant API provides functions for interacting with and
integrating the main Smart Pendant user-interface.
(Extensions are not required to have a user-interface)
Function: Pendant.pendantVersion
Version
pendantVersion(PendantID
p)
Version of the Smart Pendant itself
(avoid using this for conditional feature use - use the Extension apiVersion() instead)
Function: Pendant.subscribeEventTypes
void
subscribeEventTypes(PendantID
p,
set<PendantEventType
>
types)
Subscribe to specified set of Pendant service events. May be called multiple times to add to subscription.
Function: Pendant.unsubscribeEventTypes
void
unsubscribeEventTypes(PendantID
p,
set<PendantEventType
>
types)
Unsubscribe from specified set of Pendant service events.
Function: Pendant.subscribeItemEventTypes
void
subscribeItemEventTypes(PendantID
p,
set<string
>
itemIDs,
set<PendantEventType
>
types)
Subscribe to specified set of Pendant service YML Item-specific events.
Specified events will be sent for all specified items. May be called multiple times to add to subscription.
Function: Pendant.unsubscribeItemEventTypes
void
unsubscribeItemEventTypes(PendantID
p,
set<string
>
itemIDs,
set<PendantEventType
>
types)
Unsubscribe from specified set of Pendant service YML Item-specific events.
Function: Pendant.events
list<PendantEvent
>
events(PendantID
p)
Obtain list of Pendant service events that have occured since last call
Function: Pendant.currentLanguage
string
currentLanguage(PendantID
p)
Query the current UI language of the pendant interface.
Returns IETF language codes (RFCs 5646, 5645, 4647) of languages
(typically ISO 693-1 code when region insignificant)
Function: Pendant.currentLocale
string
currentLocale(PendantID
p)
Function: Pendant.currentScreenName
string
currentScreenName(PendantID
p)
The UI screen currently shown to the pendant user
Function: Pendant.registerYML
list<string
>
registerYML(PendantID
p,
string
ymlSource)
Register an Item type described using a YML source code string
Returns a list of parsing errors (0 on success)
Function: Pendant.registerImageFile
void
registerImageFile(PendantID
p,
string
imageFileName)
throws IllegalArgument
Register an image file for later reference by filename (must be uniquely named, with .jpg or .png).
If file cannot be accessed by service, it will be locally read and registerImageData called instead.
Function: Pendant.registerImageData
void
registerImageData(PendantID
p,
binary
imageData,
string
imageName)
throws IllegalArgument
Register an image for later reference by name (must be uniquely named, with .jpg or .png extension)
Function: Pendant.registerHTMLFile
void
registerHTMLFile(PendantID
p,
string
htmlFileName)
throws IllegalArgument
Register a HTML file for later reference by filename (must be uniquely named, with .html).
If file cannot be accessed by service, it will be locally read and registerHTMLData called instead.
Function: Pendant.registerHTMLData
void
registerHTMLData(PendantID
p,
binary
htmlData,
string
htmlName)
throws IllegalArgument
Register HTML for later reference by name (must be uniquely named, with .html extension)
Function: Pendant.registerTranslationFile
void
registerTranslationFile(PendantID
p,
string
locale,
string
translationFileName)
throws IllegalArgument
Register a translation file (e.g. a Java properties file for a language); extension is used to determine format
Function: Pendant.registerTranslationData
void
registerTranslationData(PendantID
p,
string
locale,
binary
translationData,
string
translationName)
throws IllegalArgument
Register translation file data (translationName typically filename-like; extension is used to determine format)
Function: Pendant.registerUtilityWindow
void
registerUtilityWindow(PendantID
p,
string
identifier,
string
itemType,
string
menuItemName,
string
windowTitle)
throws IllegalArgument
Register a Utility window with the UI.
The itemType references a previously registered YML item instantiated for the window
UI content.
A main menu entry will automatically be added to the pendant UI, for opening the utility window.
Function: Pendant.unregisterUtilityWindow
void
unregisterUtilityWindow(PendantID
p,
string
identifier)
throws IllegalArgument
Function: Pendant.openUtilityWindow
void
openUtilityWindow(PendantID
p,
string
identifier)
Open (make visible) previously registered Utility Window
Function: Pendant.closeUtilityWindow
void
closeUtilityWindow(PendantID
p,
string
identifier)
Close a visible Utility Window (make invisible - state is maintained)
Function: Pendant.collapseUtilityWindow
void
collapseUtilityWindow(PendantID
p,
string
identifier)
Collapse previously registered Utility Window, if in expanded state (and expandCollapseResize true)
Function: Pendant.expandUtilityWindow
void
expandUtilityWindow(PendantID
p,
string
identifier)
Expand previously registered Utility Window, if in collapsed state (and expandCollapseResize true)
Function: Pendant.registerIntegration
void
registerIntegration(PendantID
p,
string
identifier,
IntegrationPoint
integrationPoint,
string
itemType,
string
buttonLabel,
string
buttonImage)
throws IllegalArgument
Register UI content at the specified integration point in the pendant UI.
The itemType should reference a YML item previouslt registered via registerYML().
Function: Pendant.unregisterIntegration
void
unregisterIntegration(PendantID
p,
string
identifier)
throws IllegalArgument
Function: Pendant.setProperty
void
setProperty(PendantID
p,
string
itemID,
string
name,
Any
value)
throws IllegalArgument
Set property of an item by id
Function: Pendant.setProperties
void
setProperties(PendantID
p,
list<PropValues
>
propValuesList)
Set several properties (potentially for different items) at once. This is more
efficient that many repeated calls to setProperty().
Note it is asynchronous so no errors/exceptions are thrown
Function: Pendant.setChartConfig
void
setChartConfig(PendantID
p,
string
chartID,
Any
config)
throws IllegalArgument
Set the configuration of a chart by ID.
Function: Pendant.getChartConfig
Any
getChartConfig(PendantID
p,
string
chartID)
throws IllegalArgument
Get the configuration of a chart by ID
Function: Pendant.setChartData
void
setChartData(PendantID
p,
string
chartID,
DataSet
dataset,
bool
right)
throws IllegalArgument
Set the dataset of a chart by ID. In line and scatter charts,
you can set 'right' to true to pass the dataset for a secondary
scale on the right hand side.
Function: Pendant.getChartData
DataSet
getChartData(PendantID
p,
string
chartID,
bool
right)
throws IllegalArgument
Get the dataset of a chart by ID. In line and scatter charts,
you can set 'right' to true to access the dataset for a secondary
scale on the right hand side.
Function: Pendant.addChartKey
void
addChartKey(PendantID
p,
string
chartID,
string
key,
Data
data,
bool
right)
throws IllegalArgument
Add a new key to the dataset of a chart by ID. In line and scatter charts,
you can set 'right' to true to pass the dataset for a secondary
scale on the right hand side.
Function: Pendant.removeChartKey
void
removeChartKey(PendantID
p,
string
chartID,
string
key,
bool
right)
throws IllegalArgument
Removes an existing key from the dataset of a chart by ID. In line and
scatter charts, you can set 'right' to true to remove from the
secondary dataset.
Function: Pendant.hideChartKey
void
hideChartKey(PendantID
p,
string
chartID,
string
key,
bool
hidden,
bool
right)
throws IllegalArgument
Hides an existing key from the dataset of a chart by ID. In line and
scatter charts, you can set 'right' to true to hide a key from the
secondary dataset.
Function: Pendant.appendChartPoints
void
appendChartPoints(PendantID
p,
string
chartID,
string
key,
list<DataPoint
>
points,
bool
right)
Append new data points to a specified key in the data of a chart by ID.
This function will only have an effect on line/scatter charts. Set
'right' to true to pass the dataset for a secondary scale on the right
hand side.
Note it is asynchronous so no errors/exceptions are thrown.
Function: Pendant.incrementChartKey
void
incrementChartKey(PendantID
p,
string
chartID,
string
key,
double
val)
throws IllegalArgument
Increments a category value by `val`.
Function: Pendant.exportChartImage
string
exportChartImage(PendantID
p,
string
chartID,
string
imageFileName)
throws IllegalArgument
Export the current chart contents to the specified filename (must be uniquely named, with .jpg or .png).
Calls exportChartImageData if the extension is unable to access the file.
Function: Pendant.exportChartImageData
binary
exportChartImageData(PendantID
p,
string
chartID,
string
imageFileName)
throws IllegalArgument
Export the current chart contents to a binary blob (must be uniquely named, with .jpg or .png extension)
Function: Pendant.notice
void
notice(PendantID
p,
string
title,
string
message,
string
log)
Show notice to user.
Notices are automaticlly hidden after a short display period.
Notice messages are logged, if log parameter if provided, that will be logged instead of title & message.
Note it is asynchronous so no errors/exceptions are thrown.
Function: Pendant.dispNotice
void
dispNotice(PendantID
p,
Disposition
disposition,
string
title,
string
message,
string
log)
Show notice to user with specified disposition.
As for notice() but displayed in a way that connotes the specified disposition.
For example, a Positive disposition may be shown in green.
Note it is asynchronous so no errors/exceptions are thrown.
(API version 2.1 and later)
Function: Pendant.error
void
error(PendantID
p,
string
title,
string
message,
string
log)
Show error to user.
Errors should only indicate important situations that the user must be aware of and for which deliberate
acknowledgement is required before proceeding. Typically, some action will be required to correct the situation.
Errors are displayed until dismissed by the user.
Error messages are logged, if log parameter if provided, that will be logged instead of title & message.
Note it is asynchronous so no errors/exceptions are thrown.
void
popupDialog(PendantID
p,
string
identifier,
string
title,
string
message,
string
positiveOption,
string
negativeOption)
throws IllegalArgument
Display modal pop-up dialog. Typically, Yes/No, although negativeOption can be omitted
The identifier can be used to associate the corresponding PopupOpened & PopupClosed events triggered by
user positive/negative selection or automatic dismissal/cancellation - for example is screen switched, alarm etc.
void
cancelPopupDialog(PendantID
p,
string
identifier)
Cancel an open popup dialog. If the dialog has a negative option, behaves as if user selected it, otherwise
no event is generated
Function: Pendant.insertInstructionAtSelectedLine
string
insertInstructionAtSelectedLine(PendantID
p,
string
instruction)
Inserts an instruction, returns a string:
Success,
UnsupportedCommand,
InvalidFormat,
ProgrammingViewClosed,
JobDoesNotExist,
CallingJobFromSameJob,
ExceededMaxArguments,
JobNotEditable,
MultiSelectActive,
TimedOut,
Unknown
Function: Pendant.displayScreen
void
displayScreen(PendantID
p,
string
identifier)
Displays a standard pendant UI screen by passing a string with the screen identifier. (Only available from SDK API 2.2 onward)
Refer to the YML - URI Links documentation for the list of supported screens and settings.
Do not include the URI "<a href> screen:" portion in the identifier. For example to display the jogging panel use:
pendant.displayScreen("programmingView?panel=jogging");
Function: Pendant.displayHelp
void
displayHelp(PendantID
p,
string
title,
string
htmlContentFile)
Displays an html file in a standard Smart Pendant help dialog. (Only available from SDK API 3.0 onward)
Service: Controller
Interface to Robot Controllers
In general, a pendant may operate in connected or disconnected states. When connected to a Robot Controller
it may be monitoring or not have exclusive control (i.e. not be the single-point-of-control).
However, typically, once an extension is running, the pendant is connected to the controller and
is the single-point-of-control.
Function: Controller.requestPermissions
bool
requestPermissions(ControllerID
c,
set<string
>
permissions)
throws IllegalArgument
Request specified permissions.
"jobcontrol" permission is used to manipulate jobs
"networking" permission is used to connect to external networks
Function: Controller.havePermission
bool
havePermission(ControllerID
c,
string
permission)
throws IllegalArgument
Check permisions obtained.
Function: Controller.relinquishPermissions
void
relinquishPermissions(ControllerID
c,
set<string
>
permissions)
Relinquish permissions (no effect if not held).
Function: Controller.connect
void
connect(ControllerID
c,
string
hostName)
Connect to the specified Robot Controller (by IP adress or hostname if DNS available)
Typically, the pendant will already be connected to a controller when extensions are started,
so calling connect() is not required.
Function: Controller.disconnect
void
disconnect(ControllerID
c)
Disconnect from the connected controller. This leaves the pendant in the 'disconnected' state.
When disconnected, many functions are unavailable or will return default values.
Function: Controller.subscribeEventTypes
void
subscribeEventTypes(ControllerID
c,
set<ControllerEventType
>
types)
Subscribe to the specified events, if not already.
Note: If using a Yaskawa supplied client library with event consumer callback support,
registering an event consumer callback will automatically subscribe to the appropriate event.
Function: Controller.unsubscribeEventTypes
void
unsubscribeEventTypes(ControllerID
c,
set<ControllerEventType
>
types)
Unsubscribe from the specified events.
If called directly, this may causes event consumers for the events not to be called.
Function: Controller.events
list<ControllerEvent
>
events(ControllerID
c)
Poll the API Service for pending events.
Note: If using a Yaskawa supplied client library, this does not need to be called explicitly.
Function: Controller.connected
bool
connected(ControllerID
c)
Returns true if the pendant is connected to a robot controller
Function: Controller.connectedHostName
string
connectedHostName(ControllerID
c)
Returns the hostname or IP address of the robot controller to which the pendant is connected, if any
Function: Controller.softwareVersion
string
softwareVersion(ControllerID
c)
The software version string of the robot controller system software.
Function: Controller.monitoring
bool
monitoring(ControllerID
c)
Returns true if the pendant is only monitoring the robot controller to which it is connected. This
implies that no functions that modify the controller and/or robot state will succeed.
Function: Controller.haveExclusiveControl
bool
haveExclusiveControl(ControllerID
c)
Returns true if this pendant is the single-point-of-control for the connected Robot Controller.
If not, most functions that modify the controller and/or robot state will fail.
Function: Controller.operationMode
OperationMode
operationMode(ControllerID
c)
Current operation mode of the controller
Automatic (aka Play) - running jobs
Manual (aka Teach) - for editing jobs, teaching points, jogging, setup etc.
Function: Controller.servoState
ServoState
servoState(ControllerID
c)
Are the servo drives engaged?
On - yes, robot(s) are being actively controlled
Off - no. Typically brakes are engaged (unless brake-release engaged)
Ready - ready to engage servos. Typically requires operator to use servo enable switch.
Function: Controller.playbackState
PlaybackState
playbackState(ControllerID
c)
Indicates if a job us running or stopped.
Run - jobs are running (robot may be moving)
Held - jobs were running but have been held/paused.
Idle - no jobs are running
Function: Controller.playbackCycle
PlaybackCycle
playbackCycle(ControllerID
c)
The playback cycle affects how the controller runs a job.
Step - a job is run line-for-line.
Once - a job is run from the beginning to the end.
Continuous - a job is run indefinitely from the beginning to the end.
(API Version 3.0 and Later)
Function: Controller.setPlaybackCycle
void
setPlaybackCycle(ControllerID
c,
PlaybackCycle
cycle)
Sets the playback cycle mode. (API Version 3.0 and Later)
Function: Controller.run
void
run(ControllerID
c)
Run the current robot job from the current line. Requires Servos engaged & Automatic/Play operation and 'jobcontrol' permission.
Function: Controller.pause
void
pause(ControllerID
c)
Pause running job (servoes will remain engaged. 'jobcontrol' permission required.
Function: Controller.resume
void
resume(ControllerID
c)
Resume running job from paused state. 'jobcontrol' permission required.
Function: Controller.stop
void
stop(ControllerID
c)
Stop runnng job (will stop motion and disengage servos). 'jobcontrol' permission required.
Function: Controller.currentJob
string
currentJob(ControllerID
c)
Name of the current job (e.g. job being run or edited)
Empty if none.
Function: Controller.setCurrentJob
void
setCurrentJob(ControllerID
c,
string
name,
i32
line)
throws IllegalArgument
Set the current job. 'jobcontrol' permission required. Pass line=1 for start of job, line=0 for default/no-change.
Function: Controller.defaultJob
string
defaultJob(ControllerID
c)
Name of the default (aka master) job. Empty if no default job designated
Function: Controller.jobExists
bool
jobExists(ControllerID
c,
string
name)
query if job with specified name exists
Function: Controller.jobs
list<string
>
jobs(ControllerID
c)
List of robot job names (empty if not connected)
Function: Controller.jobsMatching
list<string
>
jobsMatching(ControllerID
c,
string
nameRegex,
string
tag)
throws IllegalArgument
List of robot job names matching the name regular expression AND with the given tag
(empty if not connected or no matches)
Function: Controller.duplicateJob
void
duplicateJob(ControllerID
c,
string
existingName,
string
newName)
throws IllegalArgument
Duplicate an existing job with a new name for the copy
Function: Controller.deleteJob
void
deleteJob(ControllerID
c,
string
name)
throws IllegalArgument
delete the specified job. The default job cannot be deleted.
Function: Controller.jobSource
string
jobSource(ControllerID
c,
string
name)
throws IllegalArgument
Read source code for named job (in the programmingLanguage listed in jobDetails() )
Function: Controller.storeJobSource
void
storeJobSource(ControllerID
c,
string
name,
string
programmingLanguage,
string
sourceCode)
throws IllegalArgument
Replace named job with the source code provided, in given programmingLanguage (e.g. "INFORM").
Will thow if syntax errors in source.
map<ToolIndex
, string
>
tools(ControllerID
c)
throws IllegalArgument
List of tools mapping index -> name.
Unset/defaulted tools are omitted (e.g. those with no name, 0 weight etc.)
Indices (map keys) may not be sequential. Returned map may be empty.
i32
inputGroupNumber(ControllerID
c,
string
name)
throws IllegalArgument
Return input group number for group beginning with given input name
Function: Controller.outputNumber
i32
outputNumber(ControllerID
c,
string
name)
throws IllegalArgument
Return output nunber of given output name
Function: Controller.outputGroupNumber
i32
outputGroupNumber(ControllerID
c,
string
name)
throws IllegalArgument
Return output group number for group beginning with given input name
Function: Controller.outputName
string
outputName(ControllerID
c,
i32
num)
throws IllegalArgument
Return name of specified output number
void
setInputName(ControllerID
c,
i32
num,
string
name)
Set name of specified input
Note it is asynchronous so no errors/exceptions are thrown.
Function: Controller.setOutputName
void
setOutputName(ControllerID
c,
i32
num,
string
name)
Set name of specified output
Note it is asynchronous so no errors/exceptions are thrown.
void
monitorInput(ControllerID
c,
i32
num)
throws IllegalArgument
Start monitoring specified input
Note that I/O monitoring is limited to a maximum 32 I/O signals
void
monitorInputGroups(ControllerID
c,
i32
groupNum,
i32
count)
throws IllegalArgument
Start monitoring all inputs in given input group
Note that I/O monitoring is limited to a maximum 32 I/O signals (1 group = 8 signals)
Function: Controller.monitorOutput
void
monitorOutput(ControllerID
c,
i32
num)
throws IllegalArgument
Start monitoring specified output
Note that I/O monitoring is limited to a maximum 32 I/O signals
Function: Controller.monitorOutputGroups
void
monitorOutputGroups(ControllerID
c,
i32
groupNum,
i32
count)
throws IllegalArgument
Start monitoring all outputs in given output group
Note that I/O monitoring is limited to a maximum 32 I/O signals (1 group = 8 signals)
void
unmonitorInput(ControllerID
c,
i32
num)
Stop monitoring specified input
void
unmonitorInputGroups(ControllerID
c,
i32
groupNum,
i32
count)
Stop monitoring all inputs in specified group
Function: Controller.unmonitorOutput
void
unmonitorOutput(ControllerID
c,
i32
num)
Stop monitoring specified output
Function: Controller.unmonitorOutputGroups
void
unmonitorOutputGroups(ControllerID
c,
i32
groupNum,
i32
count)
Stop monitoring all outputs in specified group
i32
inputGroupsValue(ControllerID
c,
i32
groupNum,
i32
count)
throws IllegalArgument
Return values of input groups from specified group number (upto 4 contiguous groups/bytes, from least significant byte)
Function: Controller.outputGroupsValue
i32
outputGroupsValue(ControllerID
c,
i32
groupNum,
i32
count)
throws IllegalArgument
Return values of output groups from specified group number (upto 4 contiguous groups/bytes)
Function: Controller.setOutput
void
setOutput(ControllerID
c,
i32
num,
bool
value)
Set the value of the specified output number
Note it is asynchronous so no errors/exceptions are thrown.
Function: Controller.setOutputGroups
void
setOutputGroups(ControllerID
c,
i32
groupNum,
i32
count,
i32
value)
Set the values of the outputs in the specified contigous output groups (upto 4 contiguous groups/bytes)
Note it is asynchronous so no errors/exceptions are thrown.
Function: Controller.outputAddress
i32
outputAddress(ControllerID
c,
string
name)
throws IllegalArgument
Return the logical IO address of the named output
Function: Controller.outputAddressByNumber
i32
outputAddressByNumber(ControllerID
c,
i32
num)
throws IllegalArgument
Return the logical IO address of the given output number
Function: Controller.monitorIOAddress
void
monitorIOAddress(ControllerID
c,
i32
address)
throws IllegalArgument
Start monitoring a logical IO address. Will generate IOValueChanged events
Note that I/O monitoring is limited to a maximum 32 I/O signals
Function: Controller.unmonitorIOAddress
void
unmonitorIOAddress(ControllerID
c,
i32
address)
Stop monitoring a logical IO address. (events for address may still be generated if it corresponds to a monitored input or output)
bool
inputAddressValue(ControllerID
c,
i32
address)
throws IllegalArgument
Return the value of the given general input by logicial IO address
Function: Controller.outputAddressValue
bool
outputAddressValue(ControllerID
c,
i32
address)
throws IllegalArgument
Return the value of the given general output by logicial IO address
Function: Controller.ioAddressValue
bool
ioAddressValue(ControllerID
c,
i32
address)
throws IllegalArgument
Return the value of the given logicial IO address
(API version 3.0 and later)
Function: Controller.setOutputAddress
void
setOutputAddress(ControllerID
c,
i32
address,
bool
value)
Set the value of the given output by logical IO address
Note it is asynchronous so no errors/exceptions are thrown.
i32
fieldBusStatusInputGroup(ControllerID
c,
string
busType)
throws IllegalArgument
Obtain input group number (byte) of field bus status input. e.g. busType 'ethip' yields EtherNet/IP status byte group
Function: Controller.controlGroups
list<ControlGroup
>
controlGroups(ControllerID
c)
Return the list of control groups configured on the controller.
If only one robot is connected to the controller, this will return a single element,
containing the simple control group representing the robot.
Function: Controller.currentControlGroup
i8
currentControlGroup(ControllerID
c)
Returns the index of the currently active control group.
Function: Controller.robotCount
i8
robotCount(ControllerID
c)
Returns the number of robots connected to the controller
Function: Controller.currentRobot
RobotIndex
currentRobot(ControllerID
c)
Returns the index of the currently active robot.
Note: index is 0-based, but in the UI the first robot is Robot 1.
Function: Controller.monitorVariable
void
monitorVariable(ControllerID
c,
VariableAddress
addr)
throws IllegalArgument
Start monitoring a variable. Will generate VariableChanged events.
Note that a maximum of 1 position variable, 4 string variables and 15 variables of each of the remain types can be monitored at the same time.
(API version 3.0 and later)
Function: Controller.newZone
ZoneIndex
newZone(ControllerID
c)
throws IllegalArgument
Creates a new Zone and returns its index. It will have default values
which can be change via modifyZone()
Function: Controller.userFrames
map<UserFrameIndex
, string
>
userFrames(ControllerID
c)
throws IllegalArgument
List of user frames mapping index -> name.
NB: Indices (map keys) may not be sequential. Returned map may be empty.
Function: Controller.setUserFrame
void
setUserFrame(ControllerID
c,
UserFrameIndex
index,
CoordinateFrame
f)
throws IllegalArgument
Set the specified User Frame to the provided values
If a user frame at the selected index does not exist it is created. Otherwise, the user frame at the selected index is replaced.
(API Version 3.0 and later)
Function: Controller.networkInterfaceAddress
string
networkInterfaceAddress(ControllerID
c,
string
controllerInterface)
throws IllegalArgument
Query current controller network interface IP address.
controllerInterface must be one of ['LAN1','LAN'/'LAN2' or 'LAN3']
(NB: On YRC1000micro, 'LAN' is the external Ethernet port, corresponding to 'LAN2' on the YRC1000)
Function: Controller.requestNetworkAccess
i32
requestNetworkAccess(ControllerID
c,
string
controllerInterface,
i32
port,
string
protocol)
throws IllegalArgument
Request external network access via specified protocol and port originating
from the given controller interface. The controllerInferface may be left blank, in which case
connections will be routed from the controller according to the destination address and
current subnetwork of the external LAN ports).
Access only persists while power is maintained to the controller.
The protocol must be either 'tcp' or 'udp'. controllerInterface must be one of ['LAN1','LAN'/'LAN2' or 'LAN3'].
Returns a handle that can subsequently used to remove the access, or -1 if the access request
failed (may happen in case of network conflicts with other extensions).
Requires 'networking' permision.
Function: Controller.requestNetworkService
i32
requestNetworkService(ControllerID
c,
string
controllerInterface,
i32
port,
string
protocol)
throws IllegalArgument
Service: Robot
Represents a single robot
Often there will only be one robot connected to a given controller
but, for example, the YRC Controller is capable of supporting up-to 8 robots (or 72 axes).
Function: Robot.model
string
model(RobotIndex
r)
The model string of this robot
Function: Robot.dof
i32
dof(RobotIndex
r)
Number of degrees-of-freedom / axes
Function: Robot.forceLimitingAvailable
bool
forceLimitingAvailable(RobotIndex
r)
Does this robot support force limiting? (collaborative robot?)
Function: Robot.forceLimitingActive
bool
forceLimitingActive(RobotIndex
r)
Is force limiting currently active? (i.e. PFL - Power & Force Limiting)
Function: Robot.forceLimitingStopped
bool
forceLimitingStopped(RobotIndex
r)
Is the robot stopped due to an over-limit event?
Function: Robot.switchBoxAvailable
bool
switchBoxAvailable(RobotIndex
r)
Is an end-of-arm switch box installed?
Function: Robot.workHomePosition
Position
workHomePosition(RobotIndex
r)
Set the work home position
(API version 3.0 and later)
Function: Robot.setWorkHomePosition
void
setWorkHomePosition(RobotIndex
r,
Position
p)
Set the robots current work home position
(API version 3.0 and later)
Function: Robot.secondHomePosition
Position
secondHomePosition(RobotIndex
r)
Set the second home position
(API version 3.0 and later)
Function: Robot.setSecondHomePosition
void
setSecondHomePosition(RobotIndex
r,
Position
p)
Set the robots current second home position
(API version 3.0 and later)
Function: Robot.maximumLinearSpeed
double
maximumLinearSpeed(RobotIndex
r)
Get a robot's maximum linear speed
(API version 3.0 and later)