Skip to Content

Controller — Query Methods

Back to Controller.

GetName

def GetName() -> str

Get the controller name.

Returns: str — Controller name.

GetControllerType

def GetControllerType() -> int

Get the controller type.

Returns: int — Controller type.

GetManufacturer

def GetManufacturer() -> str

Get the controller manufacturer.

Returns: str — Controller manufacturer.

GetSeries

def GetSeries() -> str

Get the controller series.

Returns: str — Controller series.

GetModel

def GetModel() -> str

Get the controller model.

Returns: str — Controller model.

GetActors

def GetActors(itemType: int, itemSubType: int, actorType: int) -> list[CENPyOlpActor]

Returns the attached actors of specified type.

Parameters:

NameTypeDescription
itemTypeint
itemSubTypeint
actorTypeint

Returns: list[CENPyOlpActor] — List of CENPyOlpActor objects, actors that respect the given filters..

GetSensors

def GetSensors(itemType: int, itemSubType: int, sensorType: int) -> list[CENPyOlpSensor]

Gets all sensors which are on a controlled item.

Parameters:

NameTypeDescription
itemTypeintFilter for the controlled items.
itemSubTypeintFilter for the controlled items, applied together with itemType.
sensorTypeintFilter for the sensors.

Returns: list[CENPyOlpSensor] — List of CENPyOlpSensor objects, sensors that respect the given filters.

GetSignalNumber

def GetSignalNumber(signalName: str) -> int

Searches for the first signal with the given name, found on a controller signal connection for this controller, and returns its signal number.

Parameters:

NameTypeDescription
signalNamestrSignal name to search for.

Returns: int — The signal number of the found signal.

GetUuId

def GetUuId() -> str

Gets the controller’s unique ID.

Returns: str — Controller’s unique ID.

GetActiveToolFrameIndex

def GetActiveToolFrameIndex() -> int

Gets the index of the active tool frame.

Returns: int — Active tool frame index.

GetActiveBaseFrameIndex

def GetActiveBaseFrameIndex() -> int

Gets the index of the active base frame.

Returns: int — Active base frame index.

GetActiveToolFrameMatrix

def GetActiveToolFrameMatrix() -> CENPyOlpMatrix

Gets the matrix of the active tool frame.

Returns: CENPyOlpMatrix — Active tool frame matrix.

GetActiveBaseFrameMatrix

def GetActiveBaseFrameMatrix() -> CENPyOlpMatrix

Gets the matrix of the active base frame.

Returns: CENPyOlpMatrix — Active base frame matrix.

GetActiveToolFrameName

def GetActiveToolFrameName() -> str

Get the tool frame name of the active tool.

Returns: str — Tool frame name of the active tool.

GetActiveToolResourceName

def GetActiveToolResourceName() -> str

Get the resource name of the active tool.

Returns: str — Resource name of the active tool.

GetResources

def GetResources(itemType: int, itemSubType: int) -> list[CENPyOlpResource]

Gets resources that are controlled by this controller.

Parameters:

NameTypeDescription
itemTypeintItem type to filter the resources by.
itemSubTypeintItem sub type to filter the resources by

Returns: list[CENPyOlpResource] — List of CENPyOlpResource objects, resources that respect the given filters.

GetMainResourcesMaxTCPFeedrate

def GetMainResourcesMaxTCPFeedrate() -> float

Returns the max TCP feedrate of main resource of the controller.

Returns: float — Value of the maximum resource feedrate.

IsTeamController

def IsTeamController() -> bool

Returns whether the controller is a team controller.

Returns: bool — True if team controller is selected.

GetTeamController

def GetTeamController() -> CENPyOlpController

Returns the team controller current controller is connected to. If there is no team controller, returns a nullptr.

Returns: CENPyOlpController — Connected team controller.

GetControllers

def GetControllers() -> list[CENPyOlpController]

Returns all controllers connected to this controller.

Returns: list[CENPyOlpController] — List of CENPyOlpController objects, controllers connected to this one.

GetProgramNames

def GetProgramNames() -> list

Returns a list of program names on this controller.

Returns: list — List of program names.

GetLogicPortByName

def GetLogicPortByName(portName: str) -> CENPyOlpPort

Returns the first logic port found on the current controller with the given name.

Parameters:

NameTypeDescription
portNamestrLogic port name to search for.

Returns: CENPyOlpPort — Olp port.

GetOutputDirectory

def GetOutputDirectory() -> str

Returns the download output directory of the program. First gets the root download directory of an active program, and if it is empty, gets the output directory from the translator.

Returns: str — File path to the output directory.

GetEtwoLanguage

def GetEtwoLanguage() -> str

Returns the language setting of E2 as a String (de-DE, en-US, fr-FR, ja-JP, zh-CN).

Returns: str — the Language String.

GetAttributeByName

def GetAttributeByName(attributeName: str) -> CENPyOlpAttribute

Gets a user-defined attribute by the given name.

Parameters:

NameTypeDescription
attributeNamestrName of the attribute to find.

Returns: CENPyOlpAttribute — Olp attribute.

GetAttributeIntegerByName

def GetAttributeIntegerByName(attributeName: str) -> CENPyOlpAttributeInt

Gets the Integer attribute by the given name.

Parameters:

NameTypeDescription
attributeNamestrName of the attribute to find.

Returns: CENPyOlpAttributeInt — Integer attribute.

GetAttributeDoubleByName

def GetAttributeDoubleByName(attributeName: str) -> CENPyOlpAttributeDouble

Gets the Double attribute by the given name.

Parameters:

NameTypeDescription
attributeNamestrName of the attribute to find.

Returns: CENPyOlpAttributeDouble — Double attribute.

GetAttributeStringByName

def GetAttributeStringByName(attributeName: str) -> CENPyOlpAttributeString

Gets the String attribute by the given name.

Parameters:

NameTypeDescription
attributeNamestrName of the attribute to find.

Returns: CENPyOlpAttributeString — String attribute.

GetAttributeBoolByName

def GetAttributeBoolByName(attributeName: str) -> CENPyOlpAttributeBool

Gets the Bool attribute by the given name.

Parameters:

NameTypeDescription
attributeNamestrName of the attribute to find.

Returns: CENPyOlpAttributeBool — Bool attribute.

GetLastGeneratedFilePathsFromDownload

def GetLastGeneratedFilePathsFromDownload() -> list

Gets the absolute file paths generated during the last download.

Returns: list — Absolute paths to the last generated files. It is empty if the download is not done yet.

GetLastSelectedFilePathsFromUpload

def GetLastSelectedFilePathsFromUpload() -> list

Gets the absolute file paths selected during the last upload.

Returns: list — Absolute paths to the last selected files. It is empty if the upload is not done yet.

GetWeldingDataSetsFromDataBase

def GetWeldingDataSetsFromDataBase() -> list

Get defined welding data sets from weld database of the active controller

Returns: list — Defined welding data sets from weld database of the active controller.

GetActiveProgram

Since R2025.2.4

def GetActiveProgram() -> CENPyOlpProgram

Get active controller program.

Returns: CENPyOlpProgram — Active created program. May return None if there is no active program.

GetPrograms

Since R2025.2.4

def GetPrograms() -> list[CENPyOlpProgram]

Returns a list of programs on this controller.

Returns: list[CENPyOlpProgram] — List of programs.

Was this page helpful?