# Bitwise writing

With bitwise writing of drive values by the #DRIVE command, one or several bits of a value transferred to the drive can be set or deleted.

In this case set the data type in parameter P-AXIS-00399 to:

- „BITARRAY_8“
- „BITARRAY_16“ or
- „BITARRAY_32“.

If the function parameter “VAL” programmed in the #DRIVE command is greater than 0, the bits defined in the parameter P-AXIS-00429 are set.

Accordingly, if the value of the function parameter “VAL” is 0, the bits defined in P-AXIS-00429 are deleted.

## Notice

Bitwise writing of drive values is only possible for bits that are not already used by the CNC.

At present, only the “CYCLIC” communication type is supported (see P-AXIS-00397); for all other communication types, the error message P-ERR-70402 is output if “BITARRAY_8”, “BITARRAY_16” or “BITARRAY_32” is set as the data type in P-AXIS-00399.

## Attention

If P-AXIS-00429 contains bits that are used by the CNC, the error message P-ERR-70404 is output.

If the complete telegram element is used by the CNC, e.g. in case of a command position, the output message P-ERR-70405 is output.

## Notice

Specifics of SERCOS drives

With SERCOS drives the control word is always configured automatically and does not appear explicitly in the list of configured process data. If one of the real-time control bits is used for bitwise writing, enter the value “S-0-0134” in the (P-AXIS-00398) parameter. See Example 2 in the section Programming.