Registers window
Register window allows you to work with registers. In order to open the window, you need to select a postprocessor in CLDViewer, right-click on it. After that click on Edit registers in the context menu.
Registers window displays registers, blocks and files that are stores in Registers.cs file of postprocessor. The window allows you to edit registers, blocks and files more conveniently.
Register window:
Register.cs file:
// This file may be autogenerated, do not place meaningful code here.
// Use it only to define a list of nc-words (registers) that may appear
// in blocks of the nc-file.
namespace SprutTechnology.SCPostprocessor
{
///<summary>A class that defines the nc-file - main output file that should be generated by the postprocessor.</summary>
public partial class LSFile: TTextNCFile
{
///<summary>The block of the nc-file is an ordered list of nc-words</summary>
public NCBlock Block;
///<summary>Automatic block numbers counter</summary>
// public CountingNCWord BlockN = new CountingNCWord("N{######}", 1, 1, 1);
///<summary>Joint value formatter</summary>
public NumericNCWord J = new NumericNCWord("{-000.000}", 0);
///<summary>External axis value formatter</summary>
public NumericNCWord E = new NumericNCWord("{-####.000}", 0);
///<summary>X, Y, Z, W, P, R value formatter</summary>
public NumericNCWord C = new NumericNCWord("{-000!000}", 0);
public LSFile(): base()
{
Block = new NCBlock(this);
OnInit();
}
}
}
Control elements
The tree element control panel is in the upper left part of the window. There are 4 controls on the panel:
- Add file - add new output file class;
- Add block - add new block that can store registers;
- Add register - add user register to selected block or file. There are 4 variant to add register:
- Numeric register - register that stores numeric value;
- Counting register - register that stores numeric value that can be incremented;
- Text register - register that stores string value;
- Registers of current file. This variant allows you to move existing register to selected item (file or block). If register is moved to a file then it is removed from block in which it was located. If register is moved to a block then it is removed from file in which it was located. But if it was in another block, then register is moved to selected block without deletion.
- Delete item - delete selected item in elements tree.
Elements of tree
On the left part of the window there is a tree with a list of registers , blocks and files .
Registers can be located in file or block. You can move registers between blocks in file. Register is moved by Drag'n'Drop. Register can be located either only in the root of the file or in one or more blocks of the given file. You need to move with the key pressed Ctrl button to copy a register from one block to another. Each element of tree has own parameters.
Parameters of elements panel
Parameters of elements panel is on the right side of the window.
There are own parameters for each type of elements.
Parameters of file element
File element has following parameters:
- Type - type of output file class:
- TTextNCFile - the main class to use for writing text files;
- TSimpleTextNCFile - simplest implementation of the output file;
- Comment - hint comment for file;
- ID - unique name of file class.
Parameters of block element
File element has following parameters:
- Comment - hint comment for block;
- ID - unique name of block class.
Parameters of register element
File element has following parameters:
- Type - type of register class:
- CountingNCWord - it's NumericNCWord that automatically increments or decrements the value of the register with the defined step after each call of Out() or Form();
- NumericNCWord - type that converts numeric values to a text format;
- TextNCWord - type that converts string values to a text format;
- Comment - hint comment for register;
- ID - unique name of register class; Register element has additional section. It's format. You can enter output format in right part of format line using reserved characters. After entering parameters, parameters inside format section are changed in accordance with the entered format string inside. And vice versa, when you change parameters inside format section, the format string changes. Each type of the register class has own parameters in the format section.
Format parameters of NumericNCWord register
NumericNCWord register has own parameters:
- Address - the symbols, which will be written in the NC-program block before the register value;
- Tail string - the symbols, which will be written in the NC-program block after the register value;
- Default value - default value of current register;
- Decimal separator - using "." or "," as decimal separator;
- Sign mode - defines the output mode for the sign of the register value. Following options are available:
- No - signs is not output;
- Minus - only minus is output;
- Plus and minus - plus and minus are output;
- Point mode - output decimal separator. This field can have following values:
- No - decimal separator is not output;
- Yes - decimal separator will be output, if the register value has fractional part;
- Always - decimal separator will be output anyway;
- Digits before - maximum quantity of signs in the whole part of number;
- Digits after - maximum quantity of signs in a fractional part of number;
- Leading zeroes - defines the zeroes output mode before the register value;
- Trailing zeroes - defines the zeroes output mode after the register value.
Format parameters of CountingNCWord register
CountingNCWord register has the same parameters as NumericNCWord register but has its own additional parameters:
- Auto increment step - the number by which the output value of the register will be increased;
- Frequence - output the value of the register with the specified frequency. For example output every third value (Frequence = 3)
- Preserve indent - aligns all numeric values by the value with the most count of characters.
Format parameters of TextNCWord register
TextNCWord register has own parameters:
- Address - the symbols, which will be written in the NC-program block before the register value;
- Tail string - the symbols, which will be written in the NC-program block after the register value;
- Default value - default value of current register;
- Text case - case of register value. This parameter has three value:
- Original - output value in initial state;
- Lower - output value in lower case;
- Upper - output value in upper case.
Test panel
Test panel is located below parameters of elements panel. Test panel is displayed only for registers elements.
There are 2 field on this panel:
- Test value - value that will be output based on the specified format;
- Result - example of displaying entered value based on the specified format. Five values are displayed for the register, since this register is incremented with each value.
Saving changes
Each change, addition, removal and movement of elements is displayed on the panel. This element and its parents will be bolded.
In order to save all the entered changes in the register window, you need to click the Ok button. After that the file will be rebuilt and all data from the window will be entered into this file.
// This file may be autogenerated, do not place meaningful code here.
// Use it only to define a list of nc-words (registers) that may appear
// in blocks of the nc-file.
namespace SprutTechnology.SCPostprocessor
{
///<summary>A class that defines the nc-file - main output file that should be generated by the postprocessor.</summary>
public partial class LSFile : TTextNCFile
{
///<summary>The block of the nc-file is an ordered list of nc-words</summary>
public NCBlock Block;
///<summary></summary>
public NumericNCWord S = new NumericNCWord("S{-###.###}", 0);
///<summary>Automatic block numbers counter</summary>
public NumericNCWord J = new NumericNCWord("{-###.000}", 0);
///<summary>External axis value formatter</summary>
public NumericNCWord E = new NumericNCWord("{-####.000}", 0);
///<summary>X, Y, Z, W, P, R value formatter</summary>
public NumericNCWord C = new NumericNCWord("{-###!000}", 0);
public LSFile(): base()
{
Block = new NCBlock(
this,
S);
OnInit();
}
}
}