On most of the the template section, an mathematical parser is built in to provide the user the possibility of generating calculations. Also reserved words are present that ensures the needed information is available. In this post both aspects will be detailed.
Reserved words
Important: Most of the text boxes have reserved worlds. Right click on the text box to access the reserved words.
Definition: Reserved words are text that will be processed during the code generation, often replacing the word for a number or text.
How to access: The reserved words exist in a determined template and can be access pressing the right mouse button.
Example: Lets consider the example below, where a almost empty configuration is shown:
When editing any of the templates, if reserved words are available to that template, they will be presented when pressing the right mouse button. As a example, for the main code header, several reserved words are available:
As can be seen many reserved words are available. To show the functionality lets create the following example:
5 lines where created on the “Main code header” template. Reserved words are highlighted in blue, while normal text, that will not be parsed are present without any highlight.
An RS01 profile was selected. When reaching the g code, the following appears on the header section:
As it can be seen, all the reserved words were transformed into values or text, and this can be done with any of the other reserved words on the list, making possible to adjust the software to almost any request. Going into details regarding the example:
- The {Profile.ID} was transformed into 0101 that is the internal identification for this profile
- {Profile.Name} was provided with the name of the profile, in this case it is a RS01P-P
- The material reference was HPU Red, that was the name of the selected material, on this database. If another material was selected the name would change.
- The text “This is powerfull” was not parsed as it was normal text, but the {Material.Inside} was changed to the value of the ID of the material selected, therefor the line became: This is powerfull 280.000
- On the last line a mathematical operation was made using reserved words. Mathematical operations can be made inside brackets [ ]. Text inside brackets will be mathematical parser, even when containing reserved words. On the example, the reserved word {Profile.Quantity} was replaced by the number 1 (as the user selected one seal) and then the parser multiplied it per 100. The result of the line became: And calculations can be made as well 100
More information about the parser is described on the following section
Parser
The parser on the templates provide extended functionality and allows the user to generate special instructions or to extend the reserved words.
The contents inside of brackets [ ] are parsed, and exceptions exist described on this section
Lets consider the following example, also on the “main code header”, although most of the templates have the parser functionality:
This will result on the output:
As can be seen, the values inside the brackets are parsed so that a numeric value is obtained.
Exceptions
On some machines the brackets are needed for the controller, so a exception was created to allow to output the brackets.
The contents inside of brackets [ ] are NOT parsed if the brackets are inside the pipe character ‘|’
To ignore the brackets as a parser, use a pipe symbol. See example:
Note the subtil pipe character ‘|’ that makes the software to ignore the brackets as a parser. This will output: