Linear movements

INCT_LinearMotionFormer — CAM system interface that implements the functionality to simplify the formation of linear displacements. The interface returns the INCT_CLData.CreateLinearMotionFormer function.

Purpose:

The process of forming linear displacements over the NC-code frame is as follows. The text of the control program is transmitted, i.e. parsed on registers with values. Registers with values are added to the list of objects for interpretation. List objects are interpreted. When interpreting objects, according to the changed values of the registers, which are connected with the axes of the machine of the kinematic scheme, a command of multi-coordinate movements (INCT_CLData.OpenMultiMotion, AddMotion, CloseMultiMotion)) is added to the tool movement trajectory (INCT_CLData).

If we consider this process in more detail, we get the following set of actions.

Before interpreting the NC-code:

  1. Get a list of registers associated with the axes of the machine in the kinematic scheme.

  2. Organize storage of the list of registers with axes indexes.

Before interpreting the frame:

  1. Get the current coordinate values of the tool position for all axes associated with the axes of the machine in the kinematic scheme.

When interpreting registers:

  1. Get the new values of the frame registers associated with the axes of the machine in the kinematic scheme.

  2. Set new values for all modified frame registers associated with the machine axes in the kinematic scheme.

After frame interpretation or in the process of interpretation, but after interpretation of all registers:

  1. Check the new values of the axes with the old ones for changes.

  2. If there was a change, then:

  3. Run OpenMultiMotion.

  4. Check the value of each axis for changes, and if the tool has been changed along the axis, perform AddMotion.

  5. Run CloseMultiMotion.

And for the execution of commands that require movement in the physical coordinates of the machine, it is additionally necessary to switch the type of movement in gtmPhysic.

The actions in the list above, indicated in italics, are implemented in the linear displacement generator (INCT_LinearMotionFormer). Using a shaper allows you to simplify the spelling of the interpreter.

We recommend creating one linear motion generator for the entire cycle of the NC-code interpretation. Create to produce when the interpreter is initialized (INCT_Interprete.Initialize).

Description of interface methods:

Method

Method Description

Description of use

SetGotoMode

The method sets the type of displacements to be generated.

Input parameter: Mode (TNCGotoMode) — type of movement, see the description of OpenMultiMotion.

If the type of movement is not specified by the method, it is gtmTooltip.

No output parameters.

The function can be used when interpreting G53 in ISO codes (set the type of movement to gtmPhysic, then return to gtmTooltip).

Get_ClearGotoMode

The function returns the value of the ClearGotoMode parameter (boolean).

No input parameters.


The ClearGotoMode parameter controls the automatic reset of the type of movement (see SetGotoMode) to the value of gtmTooltip. The reset of the type of movement is made in InitBlock.

As a rule, the action of the G53 command extends only to the current frame, so it is advisable to set the value of the ClearGotoMode parameter to True. Thus, after interpreting a frame with G53 (where the transfer type will be set to gtmPhysic), the transfer type itself will be returned to the value of gtmTooltip at the next execution of the InitBlock.

Set_ClearGotoMode

Method define ClearGotoMode parameter value.

Input parameter: Value (Boolean) — parameters value ClearGotoMode.

No output parameters.

InitAxisIndex

The method adds the axis index to the list.

Input parameters: Index (integer) — the index of the axis being added to the list.

Used to add axes associated with the axes of the machine in the kinematic scheme. As a rule, it is executed immediately after receiving the interface (INCT_CLData.CreateLinearMotionFormer function) in the implementation of the interpreter INCT_Interpreter.Initialize method.

You can obtain register indices associated with machine axes using the INCT_SysState, INCT_Equipment.

ClearAxesIndexes

Clear axis index list.

Used when changing tools, if the names of the axes that control the tool match.

InitBlock

The method stores in the internal list the current values of the tool coordinates for all axes from the list formed with the help of InitAxisIndex. If the value of the ClearGotoMode parameter is True, then the type of movement specified in SetGotoMode is set to the value of gtmTooltip.

No input and output parameters.

It is needed to use before interpreting objects associated with registers. It is recommended to use in the implementation of the INCT_Interpreter.BeforeInterprete method.

SetAxisValue

The method stores in the internal list the new values of the instrument coordinates for the specified axis.

Input parameters: Abs (logical) — type of the new coordinate value, True — absolute value, False — relative value (relative to the current coordinate value, see InitBlock); AxisIndex (integer) — axis index; Value (numeric) — new value.

No output parameters.

Used to save the new value in the internal list for the purpose of the subsequent formation of a multi-coordinate movement command. Used when interpreting with INCT_Interpreter.Interprete.

MakeWorkpath

The method compares the list of current coordinates (saved in InitBlock) with the new coordinates of the tool movement (saved in SetAxisValue). If the change of coordinates was present, a command of multi-axis movements along the modified coordinates of the axes (INCT_CLData.OpenMultiMotion, AddMotion, CloseMultiMotion) is formed in the toolpath.

To form a multi-coordinate movement command. Used when interpreting in INCT_Interpreter.Interprete, after interpreting all registers (add to the end of the list of objects for interpretation). Or in INCT_Interpreter.AfterInterprete.

INCT_GeomLinearMotionFormer — CAM system interface that implements the functionality to simplify the formation of linear displacements. The interface returns the INCT_GeomCLData.CreateLinearMotionFormer function.

Purpose corresponds INCT_LinearMotionFormer interface, only for movement on the geometry axes. Movement formed a command CutTo3D. Therefore, to generate a first displacement, it is necessary to set the coordinate values of the three axes.

Description of interface methods:

Method

Method Description

Description of use

ClearSpecifiedAxes

The method clears the list of assigned axes for the first move.

No input and output parameters.

It should be used at the beginning of each operation. It is recommended to use in the implementation of the INCT_Interpreter.NextOperation method.

InitBlock

The method remembers the current values of the three coordinates of the tool in the internal list.

No input and output parameters.

It is needed to use before interpreting objects associated with registers. It is recommended to use in the implementation of the INCT_Interpreter.BeforeInterprete method.

SetAxisValue

The method stores in the internal list the new values of the instrument coordinates for the specified axis.

Input parameters: Abs (logical) — type of the new coordinate value, True — absolute value, False — relative value (relative to the current coordinate value, see InitBlock); AxisIndex (integer) — axis index; Value (numeric) — new value.

No output parameters.


Used to save the new value in the internal list for the purpose of the subsequent formation of a multi-coordinate movement command. Used when interpreting with INCT_Interpreter.Interprete.

MakeWorkpath

The method compares the list of current coordinates (saved in InitBlock) with the new coordinates of the tool movement (saved in SetAxisValue). If the change of coordinates was present and the coordinate values specified for 3-axes movement, a moving command is generated (INCT_GeomLData.CutTo3D).

To form a movement command. Used when interpreting in INCT_Interpreter.Interprete, after interpreting all registers (add to the end of the list of objects for interpretation). Or in INCT_Interpreter.AfterInterprete.