Suppression of G-Code Blocks

disableMask

disableMask(): LWORD

Yields the current value of the disable mask. Note that the mask may also be set by the PLC.

disableMaskSet

disableMaskSet(mask:= LWORD)

Sets the internal disable mask to the given value. The mask is used to suppress execution of G-Code blocks. The disable mask has 0 default value, i.e. no suppression is active by default. The mask consists of 64 bits.

In a binary notation like 2#1101 bits are numbered from right to left, starting with bit 0. For the value 2#1101 the bits 0, 2 and 3 are set by value one. The remaining bits are not set by exhibiting zero value.

Example:

The resulting path of the following example is shown in Figure “ExampleDisableMaskSet”. The disable mask is initially set to the binary value 2#1101, which is equal to the decimal value 13. The first G-Code, which is N10 in the given example, is always executed, independently of the current disable mask because there is no ‘/’-operator in the N10-line. N20 is only executed if bit 0 is not set. In the case bit 0 is set N20 is supressed, which is true in the given example. The same holds for N30, since ‘/’ is only a shorthand for ‘/0’. N40 is not supressed, since bit 1 is not set. The G-Codes N50 and N60 after disableMaskSet(0) are executed, since no bit in the disable mask is set. In contrast, the call disableMaskSet(-1) sets all bits of the mask. Consequently, the succeeding G-Codes that are prefixed with a ‘/’, N80 and N90, are disabled.

!disableMaskSet(2#1101);
N10 G01 X10 Y10 F6000
/0 N20 G01 X20 Y0
/ N30 G01 X30 Y0
/1 N40 G01 X40 Y10
!disableMaskSet(0);
/ N50 G01 X50 Y0
/1 N60 G01 X60 Y10
!disableMaskSet(-1);
N70 G01 X70 Y0
/1 N80 G01 X80 Y10
/2 N90 G01 X90 Y20
M02
Suppression of G-Code Blocks 1:

Figure “ExampleDisableMaskSet”.