The block structure and format definition


To define the structure and the format of a block, it's necessary to form the list of the registers and to define their parameters.

Block of NC program consist from words. Each word contains address and value. <Address> – letter (sometimes several letters), <Value> – is number present in definite format. The determined <Register> is connected to each address in the postprocessor.

The concept of the <Register> of the postprocessor integrates following properties:

  • the identifier of the register (the address in a NC program);
  • the format of an output of a value of this address in block;
  • current value conforming to the address;
  • the previous value conforming to the address;
  • a name of the register (a variable of the postprocessor, the bound with the address, through which one is manufactured access both to flowing and to the previous value of the register).

The NC-program blocks are formed automatically when the <OUTBLOCK> and <FORMBLOCK> statements are performed. The NC-program block is formed by the system according the following algorithm. The system examines the registers sequentially; if the current register value differs from it's previous value, then the register will be written in the block and it's current value will be assigned to it's previous value, else the register will not be written in the block.

When the system writes the register in the NC-program block, it writes the register identifier first, and then it writes the register value. The value will be written in the block according the format, described for this register (the length and the precision of the register value, the presence of decimal point, of sign and of leading and insignificant zeroes).

Thereby, to define the structure and the format of the block, it is necessary to fill the registers list and define the registers properties. The registers must be placed in the list in this order, in which they and their values must appear in the blocks of NC-program. This rule is correct for the processing programs. If the block is formed with, the mask using then the sequence corresponds to the mask.

Note: Different registers must not have same names, but they may have the same identifiers (the symbols, which will be written in the block before the value of register). This allows creating the separate register for each group of the functions with some type.

For example, we create the register with the name <ABSOLUTE> and with the <G> identifier for the preparative function of the switching between the absolute/incremental coordinate systems. Suppose also, we create the register with the name <INTERP> and the same identifier <G> for preparative function of positioning, linear interpolation, circular interpolation with direction. This allows us: At the first to write both these commands in the same block of NC-program, if it is necessary, (for example, <N190 G91 G1 X50 Y30>). At three second to trace the current transitions mode (positioning, linear or circular interpolation with direction), to determine the current coordinate system (absolute or incremental) by examining the current values of registers <ABSOLUTE> and <INTERP>.

 

The list of registers is shown in the left part of main window.

 

f_clip0461

 

The register properties edit window is opened when the register is added, when the item <Properties> in the context popup menu is selected or by double-clicking by left mouse button on the register in the list.

 

f_clip0462

 

Register list place in the left part of window. Edit list buttons place higher:

  • f_clip0463 – inserts the new register after selected one, the window to edit the properties of a new register will be opened automatically;
  • f_clip0464 – deletes selected register;
  • f_clip0465 – copies the selected register into the clipboard;
  • f_clip0466 – inserts the register from the clipboard after the selected one. The window to edit the properties of inserted register will be opened automatically;
  • f_clip0467 – move the current register up on a list;
  • f_clip0468 – move the current register down on a list.

To change the position of the register in the list, it is necessary to press the left mouse button on the register and drag it in the desired position, holding the left mouse button down.

 

Following fields can be defined in this window:

  • <Register identifier> – the symbols, which will be written in the NC-program block before the register value.
  • <Decimal point> – this field can have following values:
  • <Is absent>;
  • <Is present> – if this item is chosen, then the decimal point will be present, if the register value has fractional part;
  • <Is present anyway>.
  • <Numerals before decimal point> – maximum quantity of signs in the whole part of number.
  • <Numerals after decimal point> – maximum quantity of signs in a fractional part of number.
  • <Leading zeroes> and <Non-significant zeroes> – defines the zeroes output mode before and after the register value.
  • <Sign> – defines the output mode for the sign of the register value. Following options are available:
  • <No>;
  • <"-" only>;
  • <"+" and "-" always>;
  • <Register name> – the name of the register, which is used by the command processing programs.
  • <Comment> – comments to register.

 

The <Import> button is intended for import of a list of registers from postprocessors of <SPPX>, <SPP> and <PPP> (the format of the old version), and as from SurfCam postprocessors.

For forming a list of registers based on a NC program, the <Analyzer> button is intended. Thus the text of the indicated NC program and all retrieved addresses is analyzed are added in a list of registers.

The <OK> button closes the window and saves all modifications. The <Cancel> button closes the window and discards all modifications. The <Apply> button save all changes, window of registers is not closed.

 

 

 

See also:

The main window