Incremental Output

Procedure Name

MOM_incremental <ON | OFF> <Address_1 ... Address_n>

Description

The next time that a block template contains a reference to any of the input address names is evaluated, the deference (increment)from the previous value is output.

If ON, then for each Address_i, always output increment.

If OFF, then for each Address_i, always output absolute.

Input

incremental attribute, address names

Example

MOM_incremental ON X Y Z

Load Definition File

Procedure Name

MOM_load_definition_file <filename>

Description

This will load the definition file given by filename. If data in filename (or any of its INCLUDEd files) matches data already loaded by previous definition files, that duplicate data will be overridden by the new version. Like any TCL extension, this command may be called from any place in the TCL script.

Input

filename

Example

MOM_load_definition_file lathe

Log Message

Procedure Name

MOM_log_message <message>

Description

This function causes MOM to write message to the syslog.

Input

message

Example

MOM_log_message "Postprocessing Terminated"

On Event Error

Procedure Name

MOM_on_event_error {_debug}

Description

If the TCL interpreter reports an error this procedure is invoked prior to raising a system error. The {_debug} procedure is invoked only if DEBUG mode is true.

Input

mom_error_event - the last event generated before the TCL error occurred

mom_event_handler_name - the name of the TCL file for the event handler

mom_error_code - the TCL error

mom_error_info - a traceback

Variables

mom_output_file_full_name - the full path name of the primary output file

Example

None

On Parse Error

Procedure Name

MOM_on_parse_error {_debug}

Description

If a syntax error is found in the Definition File these procedures are invoked prior to raising a system error. The {_debug} procedure is invoked only if DEBUG mode is true.

Input

mom_parse_error - the parsing error description

mom_parse_file_name - the definition file where the error occurred

mom_parse_line_number - the line number where the error ocurred

mom_parse_line - the text of the line where theerror occurred

Variables

mom_output_file_full_name - the full path name of the primary output file

Example
None

Open Output File

Procedure Name

MOM_open_output_file <filename>

Description

This extension allows you to redirect output to other output files.

If a file "filename" does not exist, a new one will be created with that file name.

Input

file name

Example

MOM_open_output_file $mom_output_doc_file2

Output Literal

Procedure Name

MOM_output_literal "string" {BUFFER}

Description

Output a list of literals and variable as a single line. If BUFFER is present then only place string in the output buffer. Do not send it to the output yet.

Input

String

Example

MOM_output_literal "Start of path $mom_path_name"

Output Text

Procedure Name

MOM_output_text <literal> {BUFFER}

Description

This extension will output a list of literals and variable as a single line, just like MOM_output_literal except that no sequence number will be output.

If BUFFER is present then only place string in the output buffer. Do not send it to the output yet.

Input

String

Example

MOM_output_text "Start of path $mom_path_name"

Output To Listing Device

Procedure Name

MOM_output_to_listing_device <"string">

Description

If running in an interactive session then output string to the listing window, otherwise do nothing.

Input

string

Example

MOM_output to listing_device "Error occurred while postprocessing."

Reload Kinematics

Procedure Name

MOM_reload_kinematics

Description

Refresh the event generator with the current values of all the kinematics variables.

Switches
None
Input
None
Example

None

 

Reload Variable

Procedure Name

MOM_reload_variable [-a] variable_name

Description

Update the event generator with the current value of variable_name in the event handler.

Switches

-a required if variable_name is an array

Input

None

Example

The following command will load the current values of mom_pos [0] to [4] into the event generator.

MOM_reload_variable -a mom_pos

Considerations

The following is the list of variables which can be currently updated by this function:

mom_alt_pos(5)
mom_arc_mode
mom_cutting_time
mom_event_number
mom_event_time
mom_last_pos(5)
mom_machine_time
mom_mcs_goto(6)
mom_motion_distance
mom_origin(3)
mom_out_angle_pos(2)
mom_pos(5)
mom_prev_alt_pos(5)
mom_prev_mcs_goto(6)
mom_prev_pos(5)
mom_rotation_angle
mom_spindle_mode
mom_spindle_rpm
mom_spindle_speed
mom_tool_holder
mom_tool_offset(3)
mom_translate(3)

Reset Sequence

Procedure Name

MOM_reset_sequence <start> <increment> {frequency}

Description

A sequence is a block template that is output at the beginning of each line. It will typically be used to output sequence numbers but it may also be used to output any block template.

Input

start value, increment value, frequency

Example

MOM_reset_sequence 10 10 1