M-code in CNC is used for:

Explanation:

M-codes control machine actions.

Explore more in Mechanical Engineering: