Hello Guest it is April 19, 2024, 03:24:21 AM

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 - moorea21

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 »
1
General Mach Discussion / GETOEMdro; 'get' value to 1-4 decimal places?
« on: September 26, 2017, 01:16:43 PM »
I could really do with putting the actual value of, say, the X DRO into a 'long' variable type, including it's 4 decimal places, but 'GETOEMdro' only returns the'rounded' value. I could do with the first decimal place as well. Is there any way to do this?

2
I've posted this matter as a separate thread, as it's only distantly related to my original question now.

3
General Mach Discussion / Multiple axes for mach3 probe and home on 2 pins?
« on: September 21, 2017, 12:06:12 PM »
Can I use the circuit below with mach3? The idea is that I could run 'G28.1' and/or 'G31' for X and Y axes. See my previous post for the reasons if you're curious about why I'd want to do this. Would there be problems with doing 'probes' on more than 1 axis? Obviously I would only probe or home 1 axis at a time with this setup.

4
Okay, thanks for the advice.

5
Okay, thanks.

Without upgrading to mach4, I've come up with an idea that could allow me to probe on 3 axes in mach3; IF it works....

Basically, it would involve sharing the switches inputs across 2 pins (ie the pins configured as 'home' and 'probe') so that the same switch could (in theory) be used for homing X and Y, and probing X and Y.

See picture (attached, I hope) for a clearer explanation.

Can I use a setup like this? Or is it going to cause confusion to mach?

6
I've searched for 'G31.1' here and on google; nothing came up. Where can I look for more on this?

7
Thanks for the replies, I have looked into motors with fitted encoders, and they would certainly solve the problem of missing steps, but they are all beyond what I can afford.

The main gist of my question relates more to the behaviour of G28.1;
For instance, if this line appears in my gcode:-

G28.1 Y40

the DRO reads down from 40 until the home switch is triggered, then instantly reads 547.0000.
If I film the DRO, and slow the film down to maybe 3 frames a second, I can see what value the DRO was showing the instant the switch was triggered.

THAT is the value I want to be able to read into a variable in a macro, as it tells me how far the machine travelled in order to get to the switch.

What I would like to know is, how can I do something just like G28.1, but without it 'jumping' to the value 547 or whatever when the switch is tripped.

I know I can do 'G31 Y0', if my Y home switch is also configured as my probe, but I already use a different switch as my 'probe', with the Z axis. And as far as I can tell, mach only allows you to configure one port/pin as a probe.

8
Thanks for clearing up the difference between home and reference, that makes sense now.

As for logging missed steps:-

A couple of months ago I was running the machine (which is basically a large format printer), left the room for 10 minutes, then continued to run another 20 odd files of Gcode on the machine, on the same workpiece. When I eventually checked the results, I found it had happily traversed an area of the workpeice where it was not suposed to go. Took me 5 days of checking to discover that what had probably happened was that the net curtain in the open window by the machine had temporarily caught in the gantry belt... and I took another 2 days to rerun all the code on a fresh workpiece. Thankfully, as the files in this instance were much smaller than usual, I didn't write off another entire week of working time.

If I'd have had a message, or a log entry to flag this up, I'd have known to stop the machine, throw away the damaged print, look for the source of the problem while the evidence is still fresh, and then start again, thereby not wasting days and days completing an already ruined peice of work.

9
I'm hoping to home (or is reference? still not sure of the terminology) X and Y axes before and after a run using G28.1, and read the X and Y DROs into variables in a macro, to compare the 'before' and 'after' values, so as to flag up any lost steps during a run. Obviously the 'before' values (after initial home/reference) will always be zero, and the final ones will also be zero if no steps were missed.

The problem is, sometimes the value of the DRO changes to zero instantly as the home switch trips, sometimes it remains at whatever value it had, ie doesn't reset to zero. For instance, this happens if I write a G28.1 command from the MDI line, and sometimes in gcode running from a gcode file. For that reason, I tend to write 'G92 X0' after a G28.1 Xx line.

Is G28.1 supposed to always reset a homed axis to zero the instant it's home switch trips? For my purposes it would be handy if it didn't.

Is there a way to make sure it doesn't reset to zero, so I can insert a call (in the line after the G28.1 command) to a macro that reads the DRO? Or is a different command needed for that?
Alternatively, has anyone successfully used any other method for logging missed steps?

10
General Mach Discussion / CB wildcard for strings in mach macros?
« on: August 10, 2017, 06:40:20 AM »
I have a macro which reads the last 2 chars of the FileName of the file currently running, increments that number by 1, seaches for a file with that number as its name, and loads/runs it if found. If not found , it increments by 1 again.
I now want to change the file naming convention from, say, '21.nc' to '21 34.nc', where the number 21 refers to a position on a toolrack, as before. The other number (34) is not needed by Mach, only by the user.

To search for the next file I originally used
If Dir ("C:\Documents and Settings\User\Desktop\Gcode\" & (RackNum + 1) & ".nc") <> "" Then
etc

It would be really useful if I could have something like

If Dir ("C:\Documents and Settings\User\Desktop\Gcode\" & (RackNum + 1) & " " & ** & ".nc") <> "" Then
etc

where * would a 'wildcard' standing in for any single char. (A wilcard representing any number of chars would be equally useful here, I think)

Does Mach's version of CB have such a wildcard character? The CB 'EndUser' pdf doesn't mention wildcards (ctrlF), and neither did the macro programmers reference, but a quick google search turns up * as the correct character to use, but not in relation to Mach 3.




Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 »