Post Processor
The Stäubli add-on allows you to translate the program of a robot in the 3D world to a VAL 3 application. This is known as post-processing a robot program. The generated VAL 3 application is a set of XML files that form a project, which can be opened in Stäubli Robotics Suite (SRS) 2013 and 2016 as well as VAL3 Studio 7.
Note:
- The VAL3 application name can contain characters a-z, A-Z, and 0-9 and it must start with a letter. Otherwise, the VAL3 application cannot be used by the controller.
- When you are connected to a CS9 controller, the transfer manager cannot be used to transfer VAL3 application to an emulated CS9 controller, but it can be used to transfer the VAL3 application to a real CS9 controller.
For more information on how to post-process a robot program, see Create VAL 3 Application.
Supported Statements
The language used for robot statements in Visual Components Premium 4.9 is similar to the VAL 3 language. In many cases, the translations are straightforward, but VAL 3 does not support Break and Continue statements.
Name | Remarks |
Assign Variable | See limitations for translating expressions and program variables. |
Call Sequence | None |
Comment | Adds a single line comment to the VAL 3 code.
See special instructions for using keywords in Comment statements. |
Define Base | None |
Define Tool | None |
Delay | None |
Halt | Writes a stopMove() instruction, which stops robot movement and prevents the execution of other move commands.
This does not stop the program from running other code. |
If | See limitations for translating expressions. |
Linear Motion | Accuracy method and value of motion can be used if the method is Distance. |
Point-to-Point Motion | Accuracy method and value of motion can be used if the method is Distance. |
Writes a line of text to the user interface of controller.
The text should only contain ASCII characters. |
|
Return | None |
Set Binary Output | The output port must have an I/O mapping. |
Wait for Binary Input | The input port must have an I/O mapping. |
While | See limitations for translating expressions. |
Notes:
- Motion statements in Visual Components Premium 4.9 are executed sequentially with other statements, whereas motion statements in VAL 3 are asynchronous and added to motion queue.
- To make the generated VAL 3 application behave similar to its Visual Components Premium 4.9 counterpart , the post processor inserts waitEndMove() instructions between blocks of movement and other types of instructions. This means the next instruction will not be executed until completing all queued movements.
- In order to support motion blending, a waitEndMove() instruction is not inserted between adjacent motion statements.
- If a while loop only contains motion statements, a waitEndMove() instruction is inserted after the loop.
Instructions for using Keywords
Special keywords can be used to generate specific instructions in a VAL 3 program. The keywords are case-sensitive and used with Comment statements.
Keyword | VAL 3 Instruction | Purpose |
lastMove | bLastMove=true | Allows you to specify that next timer call should write cycle time summary to controller screen. |
timer <text> | call timer("<text>") | Allows you to write the given text and elapsed time since previous timer call to controller screen. |
waitEndMove() | waitEndMove() | Allows you to manually insert a waitEndMove() instruction in a block of movements. |
Limitations of Expressions
Some robot statements have properties that allow you to define expressions.
Please be aware of the following limitations:
- The && operator is translated as "and".
- The || operator is translated as "or".
- Variable names, for example routine variables, are translated using I/O mappings information.
- Routine variables and user-defined properties of a robot can be used in expressions and are supported by the post processor.
- Both "True" and "False" are translated to lowercase.
- Everything else is not translated, so it will only work if its syntax is the same in VAL 3, for example most Boolean and simple calculation expressions.
Program Variables
VAL 3 has global application and local program variables. The post processor creates global VAL 3 variables for the component properties of a robot as well as routine variables in its program. This is because routine variables in Visual Components Premium 4.9 do not reset like VAL 3 local variables do when you execute a routine.
Please be aware of the following information:
- Component properties are translated to VAL 3 application variables with the same name.
- The post processor will create dictionaries, which are collections in VAL 3 Studio, for routine variables according to each data type. A dictionary will have the same name as the corresponding routine but have a single letter prefix to identify its type. Key-value pairs are formed using the name and value of each variable. For example, a routine named "Pick" with Boolean and string variables would be translated as two dictionaries, bPick and sPick. Accessing the value of a Boolean variable named "Skip" would done via bPick["Skip"].
- The post processor includes the initial values of Visual Components Premium 4.9 variables in the variable definitions of the VAL 3 application.