Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: jem on December 21, 2015, 01:13:25 PM

Title: Newbie trying to understand mach 4
Post by: jem on December 21, 2015, 01:13:25 PM
Hi...

Ive gooten mach 4 as a replacement to the clunky but working winpc nc... however I'm finding it quite difficult to get mach 4 operational. These are the problems I am having. So far I have a high z machine and I can control the motors fine so i have comms etc

1. The first problem is homing the device. In winpc nc it would go to xyz 000, but i have no idea how to do this with mach 4 it just keeps crashing into the sides. How do i fix this?
2. The tool path... when I loaded the software initiallY i could see the complete toolpath and build on screen now I only see part of it... just a red line at a right angle. i have no idea how to restore it. Is there a factory reset?
3. Winpc nc was pretty buggy so We had to write a converter to change x + to x- and y+ to y - in some cases. So now the axis are the wrong way around again. rather than having to rewrite the converter is there any simple way to switch the polarity of the axis?
4. How do I change A to E axis? again i can rewrite the compiler but I'd rather change the settings in mach 4.

thanks! I have more questions but they are my main problems right now...
Title: Re: Newbie trying to understand mach 4
Post by: bob_at_pmdx on December 21, 2015, 01:35:03 PM
1. The first problem is homing the device. In winpc nc it would go to xyz 000, but i have no idea how to do this with mach 4 it just keeps crashing into the sides. How do i fix this?
This sounds like you don't have home switches configured in Mach4.  Look for "Mach4 CNC Controller config.pdf" in your C:\Mach4Hobby\Docs\ directory.  This describes where to set the homing parameters.  See also the "Input Signals" section for a very brief description if where to go to configure the home switch inputs.  Once you have the home input signals configured, you can use the "Machine Diagnostic" tab to view what Mach4 thinks are the states of the home switch inputs.  Toggle or activate each home switch and make sure it shows up in Mach4.  If it doesn't, then bring up the PMDX real-time display (go to the Diagnostic menu and select the PMDX SmartBob, then click on the "Real Time Display" button).  This will show you the signals as the SmartBOB device sees them.

Quote
2. The tool path... when I loaded the software initiallY i could see the complete toolpath and build on screen now I only see part of it... just a red line at a right angle. i have no idea how to restore it. Is there a factory reset?
sorry - we need to wait for someone else to answer this.

Quote
3. Winpc nc was pretty buggy so We had to write a converter to change x + to x- and y+ to y - in some cases. So now the axis are the wrong way around again. rather than having to rewrite the converter is there any simple way to switch the polarity of the axis?
To change the direction of a MOTOR, go to the "Configure" menu and select "Mach".  Then click on the "Motor Config" tab.  Click once on the desired motor to show its configuration, then check (or un-check) the "Reverse?" box.

Note that since you are using a PMDX SmartBOB there is a second way to accomplish this: Go to the "Configure" menu and select "Plugins".  Click on the "Configure" button for the PMDX-SmartBOB, then click on the "Motor Config" tab.  For each motor that you want to change the direction, change the "Dir Polarity" setting.  This setting reflects the same configuration item that you changed in the other method.  Changing it one place will also change it in the other dialog.  So you only need to change it in ONE of these two places.

Quote
4. How do I change A to E axis? again i can rewrite the compiler but I'd rather change the settings in mach 4.
For "coordinated motion", Mach4 supports 6 axis and as far as I know they are hard-coded as X, Y, Z, A, B and C.  I'm not sure if there is a way to tell Mach4 to re-map axis E to some other axis.  Perhaps someone else on this forum can chime in with a way to do this in Mach4.

Bob
Title: Re: Newbie trying to understand mach 4
Post by: jem on December 21, 2015, 04:24:31 PM
well its not a big problem with remapping... I guess its just being able to port gcode from winpc nc and getting it to run properly and that's pretty much dependent on reference... where xyz =000 etc
Title: Re: Newbie trying to understand mach 4
Post by: jem on December 21, 2015, 04:35:00 PM
ok its seeing all the switches for sure.... red when triggered... green else

pin 2 = x
pin 4 = y
pin 15 = a /E
pin 10 = e stop = z (this doesnt seem right...)
Title: Re: Newbie trying to understand mach 4
Post by: jem on December 21, 2015, 04:35:26 PM
Is there any way to step through gcode lines to debug...
Title: Re: Newbie trying to understand mach 4
Post by: jem on December 21, 2015, 05:06:14 PM
actually pin 2 = x = green when in position
pin 4 = y = red when in position
pin 10 = z = red when in position
pin 15 = E = red when in position
Title: Re: Newbie trying to understand mach 4
Post by: Overloaded on December 21, 2015, 09:30:08 PM
Is there any way to step through gcode lines to debug...
Run Ops tab / Single Block button
Title: Re: Newbie trying to understand mach 4
Post by: bob_at_pmdx on December 21, 2015, 10:10:53 PM
actually pin 2 = x = green when in position
pin 4 = y = red when in position
pin 10 = z = red when in position
pin 15 = E = red when in position
Ummmm....  presuming you are referring to SmartBOB-USB (and Zero3 25-pin parallel port) pin numbers, pin 2 is a motor step or direction OUTPUT from the SmartBOB, as is pin 4.  Pins 10 and 15 are indeed an input signals.

According to page 12 of the Zero3 manual that Steve linked to earlier, you should have the following input signal configuration (Configure->Mach, then click on the "Input Signals" tab):

   E-Stop input on pin 11
   X axis home on pin 13
   Y axis home on pin 12
   Z axis home on pin 10

But the "Input Signals" tab doesn't mention "axis", only "motor".  So there is one more level of mapping that you need, and that is found on the Configure->Mach, then "Axis Mapping" tab.  There you will see which motor is mapped to which axis.  If you started with the PMDX-Sample profile, Motor0 will be the "X" axis, Motor1 the "y" and Motor2 the "Z" axis.  If this matches YOUR configuration then set the input signals as follows:

   E-Stop on SmartBOBUSB "Pin11"
   Motor 0 Home on SmartBOBUSB "Pin13"
   Motor 1 Home on SmartBOBUSB "Pin12"
   Motor 2 Home on SmartBOBUSB "Pin10"
 
Whether you put a red "X" or green check mark in the "Active Low" column depends on your switch configuration.  I believe the EStop should be active high (red "X").  If your limit switches are normally closed switches, then the home signals should be active high (red "X").  If your switches are normally open, then make the home inputs active low (green check mark).

Try this configuration and look at the indicators on the Mach4 Machine Diagnostics screen and see if they behave as you expect.

Bob
Title: Re: Newbie trying to understand mach 4
Post by: jem on December 22, 2015, 03:26:17 PM
ok ive enabled all of that... the e stop gets seen on 11.  and i assume 13 through to 10 are ok. So I have manually moved the machine into a certain position and set to xyze = 0000 however when it runs the gcode... it says Z74 so naturally it moved z up... and it crashes into the top... what it reads though is 3mm when it hits the top so how do I match dimensions in teh software to teh actual dimensions physically?

Thanks

Title: Re: Newbie trying to understand mach 4
Post by: bob_at_pmdx on December 22, 2015, 09:57:00 PM
ok ive enabled all of that... the e stop gets seen on 11.  and i assume 13 through to 10 are ok.
When doing tech support I don't like to assume anything.  Somewhere along the line you *will* need to verify that the home switch indicators on the Mach4 "machine diagnostics" screen properly reflect the actual states of the home switches.

Quote
So I have manually moved the machine into a certain position and set to xyze = 0000 however when it runs the gcode... it says Z74 so naturally it moved z up... and it crashes into the top... what it reads though is 3mm when it hits the top so how do I match dimensions in teh software to teh actual dimensions physically?
Several things appear to be going on.  I'm guessing that Mach4 may be set for "inches" mode and there is no command in the GCode to set it to mm.  Go to the Mach4 "Configure" menu and select "Mach".  On the "General" tab there are two places under "Default Modes" to set the units: "Machine Setup Units" and "Units Mode".  Set both of these to "Metric".  You may see a warning about needing a restart.  Click on OK until at the main Mach4 screen.  Exit Mach4 and restart it.

Now go verify the motor tuning parameters.  First open the "Mach4 CNC Controller Config.pdf" document located in C:\Mach4Hobby\Doc.  Look starting on page 15 for a description of the motor tuning fields.  Go to the "Configure" menu and select "Mach".  Then click on the "Motors" tab.  Click once on the "Motor0" label at the top right to display the current parameters for that motor.  You will need to know whether the Zero3 is set for 1/5th microstepping (1000 steps per motor revolution) or 1/10th microstepping (2000 steps per motor revolution).  Then multiply by your gear or pulley ratio to get the number of steps per mm.

Once you've gone through that, try jogging one axis at a time and verify that it moves the proper distance.  Once way to do this is to use the incremental jog function.  In the "Jogging" tab set the "incremental jog step" to 1.0000.  And set the "Button Jog Mode" to "Incremental".  Then click on the + or - job button for that axis and measure the distance the axis actually travels.  If it does not match, adjust the "steps per" setting in the motor tuning parameters.

Once you have the motor tuning properly set, then try running the GCode.  Or... go back and try to get the homing function to work.

Bob
[/quote]
Title: Re: Newbie trying to understand mach 4
Post by: jem on December 29, 2015, 07:38:13 AM
Ok, Its already been set to metric so that wasn't it...  I'll read through the manuals and see what the settings should be. In the meantime, I'm confused about something. I loaded mach yesterday. I loaded in gcode. The simulator showed on the screen. I loaded it again today. The same gcode, the simulator now does not show on the screen?
Title: Re: Newbie trying to understand mach 4
Post by: Pedio on December 29, 2015, 09:53:37 AM
If you mean the toolpaths. That is a problem this version has been having on my machine.
Title: Re: Newbie trying to understand mach 4
Post by: jem on December 29, 2015, 10:12:38 AM
yep that's what I mean. Ah right so I'm not alone on that one.
Title: Re: Newbie trying to understand mach 4
Post by: Tweakie.CNC on December 30, 2015, 11:38:27 AM
If you are having problems with the toolpath display not showing then it may be worth checking your graphics card specification to make sure it complies with the minimum requirements.
The official word is - Video Card with 256MB RAM(Large G-code files, especially 3D files will require a video card with 512MB RAM or higher).

Tweakie.
Title: Re: Newbie trying to understand mach 4
Post by: jem on January 01, 2016, 05:33:03 AM
im using a radeon R5 card.. a lenovo s435 it was displaying fine  at the start now its not showing, I'm pretty sure its the mach software not the laptop.
Title: Re: Newbie trying to understand mach 4
Post by: Mauri on January 01, 2016, 01:49:33 PM
Hi,
Do not buy any new hardware as Mach4 has OpenGL Toolpath display programing issues and is being fixed. This applies to all recent PC's/NB's that use the latest OpenGL 3.5 up.
This also applies to all NVIDIA/AMD & Intel video processes.
You will find that a 256KB Video card will be OK, so wait until then.
Regards,
Mauri.