Indexes   

OLPTranslator (Object)

Represents the Offline Programming Translator object.
Role: Interface dedicated to downloading or uploading robot or device tasks and formatting the output in the specified native robot language.

This object can be retrieved by querying on a Robot. For example:

 Dim SelectionObject as Selection
 Dim RobotObject As Product
 Dim OLPTranslatorObject as OLPTranslator
 Set SelectionObject = DELMIA.ActiveDocument.Selection
 Set RobotObject = SelectionObject.Item2(1).Value
 Set OLPTranslatorObject = RobotObject.GetTechnologicalObject("OLPTranslator")
 

Method Index

ConvertNRLToXML
Converts NRL Program to OLP XML upload file
ConvertXMLToNRL
Converts OLP XML download file to NRL Program
DownloadAsXML
Downloads a Robot task as XML file
DownloadTasks
Creates native robot language programs from V5 tasks.
GetRobotProgramDirectory
Retrieves the OLP Directory setting parameter value.
GetXMLFileDirectory
Retrieves the XML Directory setting parameter value.
UploadFromXML
Upload a Robot task from XML file
UploadRobotProgram
Creates robot or device tasks in V5 based from native robot language program file or an OLP XML file.

Methods


o Sub ConvertNRLToXML( iNRLFileName,
iParserName,
oXMLFileName)
Converts NRL Program to OLP XML upload file
Parameters:
iNRLFileName
Input NRL Robot program file.
iParserName
Path to Robot program parser.
Legal values:
  • Java parser packaged as Jar
  • A native parser packaged as an executable
oXMLFileName
Target XML output file
o Sub ConvertXMLToNRL( iXMLFileName,
iXSLTFileName,
oNRLTargetFolder)
Converts OLP XML download file to NRL Program
Parameters:
iXMLFileName
Input XML file.
iXSLTFileName
Translator file name
oNRLTargetFolder
Target folder where the robot programs will be saved. Name of the program files will be auto generated.
o Sub DownloadAsXML( iRobotTask,
oXMLFileName,
iIsPartCoordinates,
iIsSimulated,
iIsSubRoutines)
Downloads a Robot task as XML file
Parameters:
iRobotTask
The robot task to download
oXMLFileName
Name of XML file to be generated
iIsPartCoordinates
if TRUE, the robot task will be downloaded in part coordinates of iPart if FALSE, the robot task will be downloaded in robot base coordinates
iIsSimulated
if TRUE, Download will be simulation verified
iIsSubRoutines
if TRUE, XML will have tags marking call tasks for download as subroutines in main program file if FALSE, XML will have tags marking call tasks for download as separate files
o Sub DownloadTasks( lListOfTasks,
sPathToXSLTTranslator,
sContext,
bIsPartCoordinates,
bIsSubroutine,
sLogFileName)
Creates native robot language programs from V5 tasks. First the V5 Robot Offline Programming XML is generated for the given robot or device tasks in non-simulation mode. Then the XML file is supplied to the XSLT translator to create output in the corresponding native robot language.
Role: Used to translate specified robot/device tasks to native robot language program(s). It is responsibility of specified xslt translator to provide the mechanism for saving its output to one or more files.
Parameters:
lListOfTasks
List of robot or list of device tasks to download
sPathToXSLTTranslator
Absolute path to XSLT translator (downloader).If this is an empty string, no XSLT translation will be done, and only OLP XML file will be created.
sContext
Value that defines a context in which an XSLT translator works. This tells the translator how to format the output. Internally, the XSLT translator should have a mechanism in place on how to format its output based on this value. This value is user defined and it may impact user developed downloaders as well as RRS2 custom created downloaders. Any value of this parameter, rather the supplied default value, will be assigned to the "Context" attribute of the "OLPData" XML element. Translators should check whether the "Context" attribute exists in the "OLPData" XML element, and if it does, they should redirect the XSLT output accordingly. If the attribute does not exist, which means that the translator has been invoked during execution of "Create Robot Program" interactive command, then the translators should use OLP section markers in order to display their output in V5.

Here are the section marker rules that need to be strictly followed: It is important that the entire robot program output, designated to be saved in a particular file, is enclosed between DATA FILE START and DATA FILE END markers. Translator output without any DATA FILE START and DATA FILE END elements will be displayed in one tab page, generically named "Program.1". If translator output has DATA FILE START and DATA FILE END elements (multiple pairs),but without , each enclosed section of the output will go into a separate tab page named "Program.1", "Program.2", etc.

Every downloader should use ERROR INFO START ERROR INFO END elements to store any error messages, in order to display them in the information text box of Download Editor.

As with error messages, release and version information will be copied from the output's VERSION INFO START VERSION INFO END markers and will be displayed in the information text box of Download Editor.

All of the marker elements need to start at the beginning of a new line and to end with a new line character. The examples are below:

DATA FILE START myProgram.1 ... DATA FILE END

VERSION INFO START Delmia Corp. NachiAX Uploader Version 5 Release 15. Copyright Delmia Corp. 1986-2003, All Rights Reserved. VERSION INFO END

ERROR INFO START The error occurred during translation of Motion.1 activity ERROR INFO END

bIsPartCoordinates
Flag that signifies whether the download of the tasks should be in Part or Robot Base coordinates (important for a robot motion activity only).
bIsSubroutine
Flag that signifies whether a called Robot Task (important for call task activities only) should be downloaded as a subroutine of a main robot program, or as a separate program contained in a separate file.
sLogFileName
Name of the log file that an XSLT translator can use to write data to. An empty string signifies that log file is not needed. It is important to note that this is just a file name, not an absolute path to that file. This log file is supposed to be saved to a directory which is a descendant of a downloader root directory. Downloader root directory is defined in the XML through the "DownloaderRootDirectory" attribute of the "OLPData" XML element.
o Func GetRobotProgramDirectory() As
Retrieves the OLP Directory setting parameter value.
Role: The OLP Directory setting parameter stores the full file path to directory where native robot language programs will be stored.
Returns:
The OLP Directory setting parameter value
o Func GetXMLFileDirectory() As
Retrieves the XML Directory setting parameter value.
Role: The XML Directory setting parameter stores the full file path to directory where OLP XML file created on download is stored. By default, OLP XML file name is simResult.xml.
Returns:
The XML Directory setting parameter value
o Sub UploadFromXML( iRobotTask,
iXMLFileName,
iIsPartCoordinates,
iPart)
Upload a Robot task from XML file
Parameters:
iRobotTask
Robot task to upload
iXMLFileName
Name of source XML file
iIsPartCoordinates
if TRUE, Robot task will be uploaded in part coordinates of iPart if FALSE, Robot task will be uploaded in robot base coordinates
iPart
Part in whose coordinates the program will be uploaded
o Sub UploadRobotProgram( spISelectedRobot,
sPathToRobotProgramFile,
sPathToUploaderFile,
bIsUploadInPartCoords)
Creates robot or device tasks in V5 based from native robot language program file or an OLP XML file.
Role: To be used to create specified robot/device tasks from native robot language program file(s) or from OLP XML file.
Parameters:
spISelectedRobot
Robot or Move-By-Joint Device, which will own all the uploaded robot or device tasks
sPathToRobotProgramFile
Absolute path to a native robot language (NRL) program file or an absolute path to OLP XML file to be uploaded
sPathToUploaderFile
Absolute path to OLP uploader file. If this is specified as an empty string, the previous parameter must point to an OLP XML file. If this string is not empty, the previous parameter must point to an NRL program file.
bIsUploadInPartCoords
Flag that signifies whether the upload of robot programs(s) or XML file should be in Part or Robot Base coordinates (important for robot motion activities only).

Copyright © 2006, Dassault Systèmes. All rights reserved.