Subroutine call with D word (P-CHAN-00429)

P-CHAN-00429

Subroutine call with D word

Description

This parameter defines the name of a global subroutine which is called implicitly if a D word is detected in the NC program. A separate subroutine can therefore be specified for each NC channel.

The global subroutine call is always executed as the last action at block end. This subroutine executes tool-specific settings.

If a D word is implicitly executed after a T selection (P-CHAN-00014: einrechnen_mit_t=1), the subroutine is also called by a T word.

In the NC program, the subroutine name can also be set by the command #FILE NAME [D=“<prog_name>“]. The new subroutine name is then valid until program end M30 or until a further #FILENAME [D=”<prog_name>”] [PROG].

If the parameter is not assigned or is not present in the channel parameter list, a D word is executed without subroutine call.

Then after RESET or program start, the entry of the parameter in the channel parameters list is again valid.

Parameter

d_prog_file

Data type

STRING

Data range

Maximum of 83 characters (application-specific)

Dimension

----

Default value

*

Remarks

This parameter is available as of CNC Build V3.1.3066.03 and higher.

 

Parameterisation example:

d_prog_file           tool_data1.nc

 

Programming example:

N..

N10 D127                                    ;Call tool_data1.nc

N20 #FILE NAME [D=“tool_data2.nc]       ;Define new subroutine

N30 D128                                   ; Call tool_data2.nc

N..

* Note: The default value of variables is a blank string.