User Tools

Site Tools

Translations of this page:

Sidebar

MyCNC Shop

MyCNC website

myCNC Price List

mycnc:mycnc_setup_examples

MyCNC Setup Examples

How to setup Tangential Knife Cutting

MyCNC control has built-in tangential knife control

Tangential knife control is activated by writing “1” to Global Variable #7005 (GVAR_TANGENTKNIFE_ENABLE)

If Tangential control is activated 2D toolpath programming is enough to make tangential knife cutting. myCNC control software automatically -

  • Calculates the angle of next motion;
  • Lifts up the knife to safe height;
  • Rotate knife accordingly next XY motion direction;
  • Moves down knife on working height.

How to setup Lathe/Turning machine

1. Select Basic profile as “Lathe” in Cfg - Preferences - Common dialog

2. Select “Lathe Visualisation” in Cfg - Preferences - 3D visualisation configuration dialog

3. Select axes X, Z for visualisation and deselect the rest axes.

4. Check G-code settings related to Lathe operations in Cfg - Preferences - G-codes settings configuration dialog

5. Goto Cfg - Technology - Lathe configuration dialog and setup appropriate settings

How to setup Multi-Tool router

We will put here some process of setup multi-tool router. The router has -

  • 2x motors on X axes.
  • 2x separate spindles installed on separate Z heads.
  • Tangential knife head.

1. Inputs/Outputs assignment described on “pins.h” include file in Hardware PLC Builder area -

pins.h
//input/output definitions
//inputs
#define INPUT_HOME_X_MASTER 	0
#define INPUT_HOME_X_SLAVE 	1
#define INPUT_HOME_Y 		2
#define INPUT_HOME_Z1 		3
#define INPUT_HOME_Z2 		4
#define INPUT_HOME_KNIFE 	5
#define INPUT_E_STOP 		7
 
//Outputs
#define OUTPUT_SPINDLE		0
#define OUTPUT_VAC_POWER	1
#define OUTPUT_VAC_DOWN		2
#define OUTPUT_HOMING 		5
#define OUTPUT_KNIFE 		6

2. How to switch between spindles (Z1/Z2) heads.

Axis pulse-dir signal can be connected/disconnected from Motor output by writing to CNC registers 0x70…0x75 (112…117)

  • 0x70 (112) - Motor output #0
  • 0x71 (113) - Motor output #1
  • 0x72 (114) - Motor output #2
  • 0x73 (115) - Motor output #3
  • 0x74 (116) - Motor output #4
  • 0x75 (117) - Motor output #5

Low 4 bits (0..3) of the writing value represent Axis to connect -

  • 0 - X
  • 1 - Y
  • 2 - Z
  • 3 - A
  • 4 - B
  • 5 - C
  • 15 - disconnected

pulse-dir Direction will be changed (DIR signal inverted) if Bit #4 is set.

This way we add PLC procedures M201 and M202 to switch Z axis between Motor outputs #3 and #4

M201.plc
#include vars.h
main()
{
  parameter=15;   //OFF
  command=112+3;  //channel 3
  message=PLCCMD_SET_CNC_VAR;
  timer=2;do{timer--;}while(timer>0);
 
  parameter=2+16;	   //Attach to Z
  command=112+4;   //channel 4 turning off
  message=PLCCMD_SET_CNC_VAR;
  timer=2;do{timer--;}while(timer>0);
 
  exit(99);
};
M202.plc
#include vars.h
main()
{
  parameter=15;   //OFF
  command=112+4;  //channel 4
  message=PLCCMD_SET_CNC_VAR;
  timer=2;do{timer--;}while(timer>0);
 
  parameter=2+16; //Attach to Z
  command=112+3;  //channel 3
  message=PLCCMD_SET_CNC_VAR;
  timer=2;do{timer--;}while(timer>0);
 
  exit(99);
};

3. Homing for Z1, Z2 axes can be configured in Macro Wizard. M133 macro is usually used for Homing Z procedure. We will use macro names M1331 and M1332 for 2 homing procedures for every Z axis.

M1331
M201 (Turn ON Z1 axis, OFF Z2 axis)
G10 L80 P5521 Q1
G10 L80 P5525 Q1
M88 L0 P3(Soft stop when sensor triggered)
G91 G0 Z   200.0000 F   600.00
G04 P0.1
M89 L1 P3(Quick stop when sensor triggered)
G91 G0 Z  -200.0000 F    30.00
G04 P0.1
G91 G0 Z     1.0000 F   500.00
G90 G10L70 P0 Z #5453
G10 L80 P5521 Q0
G10 L80 P5525 Q0
G10 L80 P7393 Q0 (Homing Flag)
M1332
M202 (Turn OFF Z1 axis, ON Z2 axis)
G10 L80 P5521 Q1
G10 L80 P5525 Q1
M88 L0 P4(Soft stop when sensor triggered)
G91 G0 Z   200.0000 F   600.00
G04 P0.1
M89 L1 P4(Quick stop when sensor triggered)
G91 G0 Z  -200.0000 F    30.00
G04 P0.1
G91 G0 Z     1.0000 F   500.00
G90 G10L70 P0 Z #5453
G10 L80 P5521 Q0
G10 L80 P5525 Q0
G10 L80 P7393 Q0 (Homing Flag)

4. M138 macro is used for Home-All procedure. It should be fixed to support Z1, Z2, tangential knife homing and OUTPUT_HOMING output described in “pins.h”

M138
M62P5 (OUTPUT HOMING ON)
 
M135 (C-knife)
 
M1331 (Z1)
M1332 (Z2)
 
M132 (Y)
M131 (X)
 
M63P5 (OUTPUT HOMING OFF)

5. M6 - Tool Change macro for multitool configuration.

M6
M600 P#5409
 
if [ #5409 NE 1 ] 100
M150
GOTO 1000
 
N100
if [ #5409 NE 2 ] 200
M151
JUMP 1000
 
N200
if [ #5409 EQ 3 ] 300
G10 L80 P7005 Q0
JUMP 1000
 
N50
G10 L80 P7005 Q1
 
 
N300
 
N1000
G10 L81 P5400 Q5409    (set current tool number)

How to setup Homing procedure

Homing is a procedure to find the initial machine position (home position) by using Home sensors. The home procedure is a macro file. The macro filename is absolutely flexible, but we usually use a number of default macro names -

  • M131 - Homing for the X axis
  • M132 - Homing for the Y axis
  • M133 - Homing for the Z axis
  • M134 - Homing for A axis
  • M135 - Homing for B axis
  • M136 - Homing for C axis
  • M138 - Homing all the axes (custom macro which does all the axes homing in series)

There are few ways to send a machine to find homes

  • It's possible to configure mandatory homing if CNC control system started and/or Emergency, Servo drivers alarm event happened.


    The red button on the message popup widget should be pressed to send a machine to the home position. The popup message will be hidden when all home flags are ready.


  • Home macro procedure can be started from MDI interface



  • UI might contain button to send machine home. For example buttons for homing each axis X, Y, Z, A, B, C on diagnose widget



    or All the Axes Homing button on the main screen of “1024P-V2” profile



Homing Macro files should be created during machine setup. Macro file can be created

  • in “Macro Wizard” conversational dialogs



    By using the macro wizard you just point homing moving direction, input number used for home sensor, sensor type (normally opened/closed), homing and probing speed, parameters of Encoder Z-label (if used to find precise homing position) and some other parameters. Macro file will be generated on the widget “Macro preview” by pressing “Generate” button. If the macro is ok, the button “Save macro” should be pressed to save macro file on a storage device (HDD, SD card etc). The dialog settings itself might be saved in the configuration file by pressing “Save” button on the top-right corner of the screen.
  • manually in “Macro List” widget



Home-All macro M138 is a simple macro file which runs in series macro files for all axes. For simple 3 axes machine it would be like this

M138
M133
M132
M131

Procedure started from Homing Z, then Y and the last is X. Any other sequence can be choosen according to your requirements.

In case Gantry alignment procedure used instead of standard homing procedure, it might have different macro file name to not be mixed-up with standard homing procedure. For example - homing Y is “M132”, gantry alignment is “M1321”. This is just example, any of macro filename can be choosen. THe result of Home-All macro would be

M138
M133
M1321
M131

Home-All macro can be very different for more complicated machines with multi-spindles, 5 axes and so on. For example M138 macro for multi-spindle machine with tangential knife.

M138
M62P5 (OUTPUT HOMING ON)
 
M135 (C-knife)
 
M1331 (Homing Z1)
M1332 (Homing Z2)
 
M132 (Homing Y)
M131 (Moming X)
 
M63P5 (OUTPUT HOMING OFF)

How to setup Dual Axis (Slave X, Slave Y)

Dual axis setup is really simple.

Goto "Axes/Motors" configuration 
dialog and set the same axis for two motor outputs. 
They will work together

For example, motor outputs #0 and #1 are used for the same X axis on the picture below.

Next picture shows how to attach the Y axis to motor outputs #1, #2.

mycnc/mycnc_setup_examples.txt · Last modified: 2018/08/22 14:59 by skirillov

Translations of this page: