mycnc:mycnc_setup_examples
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mycnc:mycnc_setup_examples [2019/06/10 09:33] – ivan | mycnc:mycnc_setup_examples [2024/01/30 12:09] (current) – ivan | ||
---|---|---|---|
Line 1: | Line 1: | ||
==== MyCNC Setup Examples ==== | ==== MyCNC Setup Examples ==== | ||
+ | |||
+ | //**NOTE**: The myCNC team recommends utilizing the examples provided in this manual (as well as other manuals in this documentation) as a starting point for your machine setup. When possible (and applicable), | ||
=== How to set up Axes and Pulses per Unit === | === How to set up Axes and Pulses per Unit === | ||
+ | |||
+ | Video tutorial: {{youtube> | ||
During the initial setup, the axes on your machine (X, Y, Z, A, etc) may be plugged differently from the desired software configuration. In order to assign the correct motor to the axis in the myCNC software: | During the initial setup, the axes on your machine (X, Y, Z, A, etc) may be plugged differently from the desired software configuration. In order to assign the correct motor to the axis in the myCNC software: | ||
Line 9: | Line 13: | ||
2. Navigate to **Motor Outputs Configuration** | 2. Navigate to **Motor Outputs Configuration** | ||
- | 3. Assign the correct axis to each attached motor | + | 3. Assign the connected motors |
{{: | {{: | ||
- | In the same window, the general calibration for the pulses per unit can be performed. This is done in order to calibrate the software readings of the machine (how much the machine " | + | In the same window, the general calibration for the pulses per unit can be performed. This is done in order to calibrate the software readings of the machine (how much the machine " |
1. Physically record the position of the spindle/ | 1. Physically record the position of the spindle/ | ||
Line 31: | Line 35: | ||
If the new number of pulses per unit is brought up too high without changing the maximum motor speed, the motors will start making jerking movements when moved. This is due to keeping the **Max Speed** the same. In order to eliminate the jerking movements, bring down the **Max Speed** value in CNC Settings > Axes/Motors until the movement is smooth again. | If the new number of pulses per unit is brought up too high without changing the maximum motor speed, the motors will start making jerking movements when moved. This is due to keeping the **Max Speed** the same. In order to eliminate the jerking movements, bring down the **Max Speed** value in CNC Settings > Axes/Motors until the movement is smooth again. | ||
{{: | {{: | ||
+ | |||
+ | Max Speed is set in units/ | ||
+ | |||
+ | * //NOTE: Overspeed acts in a manner | ||
+ | |||
+ | 7. Set the Backlash in units (mm/inch) for each axis. Backlash is the value that allows for some unexpected play in the machine due to clearance or looseness of mechanical parts. When the controller sends a movement command to the motor, the motor may turn briefly before any actual axis movement begins. That turn is defined as backlash, and can be accounted for in this setting. | ||
=== How to set up Tangential Knife Cutting === | === How to set up Tangential Knife Cutting === | ||
Line 51: | Line 61: | ||
=== How to set up a Lathe/ | === How to set up a Lathe/ | ||
+ | |||
+ | [[quickstart: | ||
+ | |||
1. Select Basic profile as " | 1. Select Basic profile as " | ||
Line 235: | Line 248: | ||
if [ #5409 EQ 3 ] 300 | if [ #5409 EQ 3 ] 300 | ||
G10 L80 P7005 Q0 | G10 L80 P7005 Q0 | ||
+ | JUMP 1000 | ||
+ | |||
+ | N50 | ||
+ | G10 L80 P7005 Q1 | ||
+ | |||
+ | |||
+ | N300 | ||
+ | |||
+ | N1000 | ||
+ | G10 L81 P5400 Q5409 (set current tool number) | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | === How to set up a Multi-Tool Tangential Cutter === | ||
+ | |||
+ | FIXME //Section under construction// | ||
+ | |||
+ | For tangential cutting, a common scenario is for the system switch between two different motors for both the Z and the C axes (to switch between the tangential knife and the creasing wheel, for instance). Therefore, the system will have: | ||
+ | |||
+ | * X- and Y-axes motors | ||
+ | * Two different motors for the Z-axis (for knife and wheel up-down movement) | ||
+ | * Two different motors for the C-axis (for knife and wheel rotation) | ||
+ | |||
+ | **1.** How to switch between motors: | ||
+ | |||
+ | **Axis pulse-dir signal** can be connected/ | ||
+ | * 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 | ||
+ | |||
+ | <code C M201.plc># | ||
+ | main() | ||
+ | { | ||
+ | parameter=15; | ||
+ | command=112+2; | ||
+ | message=PLCCMD_SET_CNC_VAR; | ||
+ | timer=2; | ||
+ | |||
+ | parameter=2+16; | ||
+ | command=112+3; | ||
+ | message=PLCCMD_SET_CNC_VAR; | ||
+ | timer=2; | ||
+ | | ||
+ | parameter=15; | ||
+ | command=112+4; | ||
+ | message=PLCCMD_SET_CNC_VAR; | ||
+ | timer=2; | ||
+ | |||
+ | parameter=5; | ||
+ | command=112+5; | ||
+ | message=PLCCMD_SET_CNC_VAR; | ||
+ | timer=2; | ||
+ | |||
+ | exit(99); | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <code C M202.plc># | ||
+ | main() | ||
+ | { | ||
+ | parameter=15; | ||
+ | command=112+3; | ||
+ | message=PLCCMD_SET_CNC_VAR; | ||
+ | timer=2; | ||
+ | |||
+ | parameter=2+16; | ||
+ | command=112+2; | ||
+ | message=PLCCMD_SET_CNC_VAR; | ||
+ | timer=2; | ||
+ | | ||
+ | parameter=15; | ||
+ | command=112+5; | ||
+ | message=PLCCMD_SET_CNC_VAR; | ||
+ | timer=2; | ||
+ | |||
+ | parameter=5; | ||
+ | command=112+4; | ||
+ | message=PLCCMD_SET_CNC_VAR; | ||
+ | timer=2; | ||
+ | |||
+ | exit(99); | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | **2.** 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. | ||
+ | |||
+ | <code C 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 | ||
+ | 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 | ||
+ | G90 G10L70 P0 Z #5453 | ||
+ | G10 L80 P5521 Q0 | ||
+ | G10 L80 P5525 Q0 | ||
+ | G10 L80 P7393 Q0 (Homing Flag) | ||
+ | </ | ||
+ | |||
+ | <code C 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 | ||
+ | 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 | ||
+ | G90 G10L70 P0 Z #5453 | ||
+ | G10 L80 P5521 Q0 | ||
+ | G10 L80 P5525 Q0 | ||
+ | G10 L80 P7393 Q0 (Homing Flag) | ||
+ | </ | ||
+ | |||
+ | **3.** M6 - Tool Change macro for multitool configuration. | ||
+ | |||
+ | <code C M6> | ||
+ | M600 P#5409 | ||
+ | |||
+ | if [ #5409 NE 1 ] 100 | ||
+ | M150 | ||
+ | GOTO 1000 | ||
+ | |||
+ | N100 | ||
+ | if [ #5409 NE 2 ] 200 | ||
+ | M201 | ||
+ | JUMP 1000 | ||
+ | |||
+ | N200 | ||
+ | if [ #5409 EQ 3 ] 300 | ||
+ | M202 | ||
JUMP 1000 | JUMP 1000 | ||
Line 387: | Line 557: | ||
+ | === Setting up a 2-motor X+Y X-Y 3D-printer=== | ||
+ | |||
+ | A 3D printer shown below is an example of a setup which utilized the X+Y and X-Y axis configuration in Settings -> Config -> Axes/ | ||
+ | |||
+ | http:// | ||
+ | http:// | ||
+ | |||
+ | === Setting up a waterjet system === | ||
+ | |||
+ | Certain CAM software packages can automatically insert necessary waterjet M-codes at some desired distance from the corners to properly accelerate and decelerate the machine. These M-codes are **M64/ | ||
+ | |||
+ | Some profiles within myCNC software (such as X1366P) contain a Software PLC procedure (WATERJET_SLOWSPEED) that works by monitoring the state of the output that the above codes toggle on and off: | ||
+ | |||
+ | <code C> main() | ||
+ | { | ||
+ | | ||
+ | do{ | ||
+ | a1=gvarget(7184)& | ||
+ | if (a0!=a1) | ||
+ | { | ||
+ | | ||
+ | if (a0==0) //normal speed | ||
+ | { | ||
+ | | ||
+ | }else //slow speed | ||
+ | { | ||
+ | gvarset(9379, | ||
+ | }; | ||
+ | }; | ||
+ | }while(1); | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | The above software PLC monitors the state of the desired output and switches the state of the global variable #9379. Writing " | ||
+ | |||
+ | As mentioned before, this functionality requires a FlyCut license, which is available to purchase on request. | ||
+ | |||
+ | ===Connecting a servo drive to a myCNC controller=== | ||
+ | |||
+ | [[mycnc: | ||
mycnc/mycnc_setup_examples.1560173607.txt.gz · Last modified: 2019/06/10 09:33 by ivan