Hello Guest it is January 29, 2023, 04:23:57 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.


Topics - moorea21

Pages: 1 2 3 4 5
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
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.

3
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?

4
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.




5
I'm writing a series of macros that will 'log' the execution of files; start/end time, line number at termination, method of termination etc.

There are a number of ways in which a file could be terminated; the ones I need to loook out for are
a) when the user terminates the run with Estop, Stop, or Reset buttons (all are acceptable on my machine,) and
b) when a particular switch is tripped to an input on the BOB

When either of these things happen, I want to be able to note which method of termination was used, and then call the macro that records this.
I'm unsure whether/how to look out for these conditions; macropump code looking out for all possible termination conditions would be slow and cpu hungry; this could be done with brains and macropump, I suppose, but I don't know how yet.

Is there a way of basically checking the input and DRO's to find which was done, ONLY if and when the machine stops running?

Thanks

6
Hi,

My machine needed to 'zero' it's Z axis in both direction (complicated reasons,) so I set up one of the limit switches to be read as a 'probe' by mach, with the intention that this sort of command:

G31 Z-25000 (a value beyond the point at which the switch should trigger)
G92 Z0
would move the Z axis away from its home position, and reveerse it into the 'probe' switch at the other end of it's limit of travel, at which point it would deam that position to be Z0.

It moves fine, trips the switch fine (marked 'digitzing' or something similar in the diagnostic panel,) but doesnt stop the axis after the switch is tripped. I've checked the wiring, config, and function of the switch itself and the breakout board it's wired to, and can;t see why this won't work. Sample code attached, and xml.

I havent used the machine for 2 years, and I don't seem to have saved the xml for the setup I was using last time, so I've had to modify a previous copy. Also, I can't remember if this problem got solved 2 years ago or not.

Is this something a demo version just won't do?  Or is there something hiding in the config that I havent properly understood?

7
This macro is called from the 8th line of a gcode file. I've stripped out all the non problematic code, and I'm left with

Message "halt"
Sleep 1000

DoOEMbutton(1003)
While Not GetLED(4)
Wend

Code "M98 P113"


The first 2, and last lines are not strictly necessary, (just there in case anyone thinks it's a pointless macro...) it worked fine before, but today the same thing happens on each run :- 'Terminating scripts'.

I close Mach, try to reopen; clicking/double/triple clicking machloader does nothing. Trying to modify and save the macro that was open in notepad gives a message that 'this is being used by another program', and shutting down the PC for a restart as last resort gives a message about 'DDE Server Window still being in use.

This macro worked fine a week or 2 back  (it's never had 'End' on the end), why has it suddenly gone weird?

M21

8
General Mach Discussion / mach3 loading previous version of gcode
« on: May 26, 2015, 01:58:28 PM »
Today Mach found a 'new' trick; I run a gcode file, close Mach, edit the gcode file and save it, load it back into Mach, and lo! Mach has loaded up the version of the file BEFORE I made changes to it.

I'm not imagining this, its driving me ******* nuts, how do I stop it ? Is this some kind of malfunction?

M21

9
General Mach Discussion / simulate switch inputs in mach3? How?
« on: May 23, 2015, 11:13:00 AM »
I was hoping to run my code as a simulation on my other pc (no parallel port drivers installed) but I can't, because I don't know how to simulate switch inputs in simulation mode.

The code I've been running has some odd behaviour during homing; I was hoping to see if it behaved the same on another machine.

Can I simulate switch inputs in Mach3?

Thanks,

M21

10
I know OEMDRO 83-88 are the machine coordinates for all 6 axes, but what are the OEMDRO numbers for the 'non-machine' coordinates. I looked through the programming manual and tried 'Work X' etc, 'Part X' etc in a macro to return their values; nothing matched what I see in my DRO's on screen. I have no idea what I'm looking for.

M21

Pages: 1 2 3 4 5