You are on page 1of 4

Session 110

Customize NC Control to Output Error


Message
This session demonstrates how to customize an NC control file to generate error
messages to the log file. When running a Mill/Turn machine, it is important to make sure
that the C-axis rotary is unclamped when you are in Turning Mode so that the spindle can
spin freely and it should be clamped when it is in Milling Mode. A similar technique
could also be used to verify these potentially dangerous conditions on certain controls:

- Coolant On or Off
- "Cutter compensation on" block should not contain a Z-axis motion

Variables are used in this session to set and track the clamp status of the C-axis.
Conditional checks are then added to groups which specify cutting modes (e.g. M03,
M04) to verify the status of the C-axis rotary.

1. Open project file "custom_control.vcproject"


• Launch VERICUT
• File > Open
• Shortcut = Training
• File = custom_control.vcproject

2. Add the word "CLAMP" as a variable name


• Configuration > Word Format
• Add
• Name=CLAMP
• Type=Special
• Sub Type=Variable Name
• OK

VERICUT V6.1 Session 110 1


3. Configure the control to Clamp and Unclamp with M35 and
M36 respectively.
• Configuration > Word/Address …
• Expand the M_Misc
• Expand M 35 36 and highlight the IgnoreMacro
• Double Click on IgnoreMacro
• Word=M
• Range=35
• Select Variable
• Variable Name=CLAMP
• Variable Description = C-axis Status
• Override Value=1

• Modify
• Change Range = 36
• Variable Name=CLAMP
• Override Value=0
• Add, Close

VERICUT V6.1 Session 110 2


4. Check the status of C-axis rotary when M03 is encountered.
• Expand M3 and Highlight * *
• With * * highlighted, right-click, Add/Modify
• Word=M, Range=3
• Under Conditions; Add
• Type=Variable
• Condition=CLAMP, Conditional Value=1
• In the field below the Macro list, type: "err"
• Select ErrorMacro from the list Override Text= ERROR! C-axis is
Clamped

• Add, Close

VERICUT V6.1 Session 110 3


• File > Save As > my_custom_control.ctl

5. Set VERICUT to Stop at every Error


• From the Main Menu Select
• Check Stop At Max Error = 1
• OK

6. Run the Simulation


• Hit
• Play

In the message area:


Error: ERROR! C-axis is Clamped

VERICUT V6.1 Session 110 4

You might also like