Hello Guest it is May 11, 2021, 12:15:21 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Highspeed1964

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 »
41
A couple of things:

First, can you provide more details?  Are you using shared home/limit switches or does each switch have a different pin assigned?  Which light(s) are active when you trigger a given switch?  How do you have your port and pins configured? etc.

Secondly, when the "Software Limits" is showing in the status line, it sounds like you may have the Soft Limits button active when you are trying to Ref All Home.  I believe you should have that turned off during a Ref All Home operation.

Try making sure Soft Limits is not active when you do a Ref All Home and let us know if that makes any difference.  I've not messed much with Soft Limits yet so I'm not sure if I'm off track here or not, but if that's not it we'll need to look more closely at your configuration.

Stephen "Highspeed" Kruse

42
General Mach Discussion / Re: Mach3 not executing code in order
« on: September 09, 2016, 05:58:41 PM »
Awesome!  Glad you got it figured out.  Wish I could have been more help.

Highspeed

43
General Mach Discussion / Re: Mach3 not executing code in order
« on: September 09, 2016, 03:44:16 PM »
Yep, not being familiar with everyone here I want to make sure all information I can think of is shared.

Since you've had it working on another system (I'm assuming not Mach3) it's still possible that Mach3 has different requirements for user macro numbering.  Could you try using a different pair of numbers to see if that would make a difference?  Just some troubleshooting steps.  I also see in line 510 that you are using a G0 without movement and calling the M17 in the same block.  Not sure this is an issue but perhaps try putting the M17 on a different line so that the G0 can take effect since it is a modal command.  Perhaps setting the machine to an expected state for the macro.  So line 510 would become simply G0 with a new line 515 for the M17 command.

That's all I really see that comes to mind.

Highspeed

44
General Mach Discussion / Re: Mach3 not executing code in order
« on: September 08, 2016, 09:43:04 PM »
As I recall, user defined macros should use a number higher than 100.  "M" codes lower than 100 should be considered "reserved".  Try renaming these to M106 and M107 and see if that makes a difference.

Also, just a side note:  G53 is non-modal meaning that is is not remembered from one block to the next so the G90 statement is not necessary.  G53 must be explicitly stated for each block you wish to have executed in Machine Coordinates and then reverts to the previous modal mode.  So if you were operating in G90 prior to this macro running, G90 would still be in effect throughout the macro except for the one line that executes the G53 command.  Even worse, putting the G90 in the macro could cause unexpected results if you were in G91 prior to running the macro and the remaining code after the macro expects to be in that mode instead.

When writing macros, I generally do not rely on the machine being in a specific state so if I'm going to set a mode (e.g. G90/91 or G20/21) during the running of a macro I will first store the current mode to a variable and then restore the mode from that variable at the end of the macro.  Since your macro does not set a mode other than this closing G90 statement, this is not necessary and neither is the G90 itself.

Hope that helps,

Stephen "Highspeed" Kruse

P.S.  If I'm remembering incorrectly about the macro numbers, someone please chime in here and correct that statement.

45
My guess is that the previous routine you had was not probing far enough.  In your code above, it is probing 300 units (I'm assuming you're running in metric so 300mm).  When the probe touches the plate or part it stops and then the values are read from that location.  However, if you were previously probing say 10mm that may not have been enough to actually touch the surface so the position is not set when the movement is complete.  G31 stops at either the sensed touch or when the probe depth has been reached even if the plate/surface is not touched.

Also, in the code above the While/End While loop is redundant.  The Do/Loop checks if the probe move is complete (If GetOEMLed(825) would be true) and if it is it sets the coordinate of the stopping point.  If movement is not complete (i.e. GetOEMLed(825) is false) it will loop while the movement continues.  Once this loop is complete there is no reason to wait if IsMoving() is true since it will never be true at that point in the script.  Also, you have the potential for an endless loop if the probe never touches since GetOEMLed(825) would never be true.  Here is how I would code this:

Dim XCoor As Double
Code("G31 X300")
While IsMoving()
    Sleep(10)
Wend
If GetOEMLed(825) Then  'When probe led on
    XCoor = GetABSPostion(0) '0 for X-axis
    SetVar(1000, XCoor) 'Alernative variable #1000
Else
    ...G31 did not reach the surface, add error handling routine here
End If

Hope this helps,

Stephen "Highspeed" Kruse

46
General Mach Discussion / Re: MPG PENDANTS
« on: September 08, 2016, 12:35:47 PM »
There are several listings on e-bay ranging in price from about $85 to 115 plus shipping if any.  (The wired version which plugs into a USB port is around $75.)  One such listing is here:  http://www.ebay.com/itm/like/152062599692?lpid=82&chn=ps&ul_noapp=true

Highspeed

47
General Mach Discussion / Re: Bad Parallel card?
« on: September 07, 2016, 03:30:07 PM »
A volt meter is not really a good way to check these signals and they are pulses and do not deliver a constant voltage.  Depending on the quality of the voltmeter and the duty cycle of the signal, you'll get anything from no voltage to a voltage reading much lower than the expected 5V.  You really need to check the signals with an oscilloscope but that is beyond the capability of most hobby machinists and more expensive than it's worth.

So you made the right choice coming here for assistance.  However, I'm not sure I understand the trouble.  You said the machine cuts the sample files just fine which means the stepper motors are running and therefore your stepper drivers are getting the pulses.  Could you explain a bit more what you're not seeing?

Stephen "Highspeed" Kruse

48
General Mach Discussion / Re: MPG PENDANTS
« on: September 07, 2016, 03:22:41 PM »
I like the Shuttle-Pro XHC HB04L.  It is wireless and uses a USB dongle receiver to communicate directly with Mach3 via a plugin.  No special wiring knowledge necessary and it doesn't need a breakout board/motion controller that has an MPG input port.  Works quite well with my system - also using the UC100 and M542 Stepper drivers.  (Chinese built 6040 CNC router.)

Stephen "Highspeed" Kruse

49
General Mach Discussion / Re: Mach3/UC 100
« on: September 07, 2016, 03:17:07 PM »
If "RESET" stays active, there is probably still a limit signal active.  Check in the diagnostics page and see if any of the LEDs are lit.  If so, you are either at a limit stop, the wiring is incorrect or your logic on that signal is reversed.

If you are at a limit stop, you'll need to manually move that axis away from the stops or set "OverRide Limits" in the settings tab.  You could also set the "Auto LimitOverRide" but this poses potential risk so only use it if you fully understand the ramifications of such setting.  "OverRide Limits" is a one-time use setting and would need to be selected each time you need it.

To test the wiring, manually operate each limit switch while viewing the diagnostic page and see if the corresponding LED light changes from on/off or off/on.  If it does, but it is on when it should be off and vice-versa, then you need to go to the ports and pins configuration and change the active low setting for that input.

Hope this helps,

Stephen "Highspeed" Kruse

50
A couple of observations here:

1.  G0 vs. G1.  G0 is used for rapid positioning of the cutting tool (Router, Plasma, Laser, etc.) and G1 is usually moved for a programmed cutting move at set feed rate.
2.  G-Code file.  This automation is the whole basis of a G-code file.  You would use whatever CAM software you have available (I'm not familiar with Matlab, but it sounds like it could work) to generate the output into a g-code file (.NC, .TAP, etc.) and then use Mach3 to load the file and run it.

Bear in mind a complete g-code file will have additional commands and should be run through a Post-processor to format it correctly for Mach3 as well as ensure the proper sequence of commands are added/followed.  Other methods _could_ be used to automate the output from your  programs, but this is what Mach3/4 are designed for - proceessing G-code files!

Stephen "Highspeed" Kruse

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 »