Hello Guest it is April 27, 2024, 12:58:00 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 »
191
General Mach Discussion / Re: thc in macropump
« on: September 29, 2010, 05:37:02 AM »
That's what I was starting to think, then I thought 'can it really be that simple?' I could dummy up a logic on/off signal, set it all up, and see...

Will keep you posted

Rich B

192
General Mach Discussion / Re: call macro from another macro
« on: September 28, 2010, 12:30:45 PM »
Thanks Ray,

That's excellent in depth stuff, just what I was looking for.

Would it make a difference if a macro made a call to a macropump, that just happened to be idle at that particular point in the execution of a gcode file? Macropumps apparently get called automatically every 0.2 sec, but there may be a situation where the macropump's code would be useful in certain situations between those times. An alternative might be to add the macropump's code as a subroutine within the macro itself, I guess. 

Incidentally, I also posted on the same day on the subject of DTHC, asking if anyone could direct me to some example code, but it seems it's not generated much interest. Would you take a look and tell me if you think my post is unclear, too hard to answer, or too easy (ie I should be able to find it myself?) or am I just being impatient?! I'll happily rephrase it if it doesn't make sense, or wait, or whatever.

Anyway, thanks for the advice, it's good to know there are people out there who know Mach well enough to answer questions like that

Rich B

193
General Mach Discussion / Re: call macro from another macro
« on: September 28, 2010, 09:13:01 AM »
Hi JHC,

Thanks! Good to know it can be done.

Having a bit of trouble following your code. It's for passing a parameter from 1 macro to another?
Is that the same as calling a macro form within another macro?

Would you mind maybe posting an example llne of code which would call a macro?
Not sure where MO6 fits here, sorry for the ignorance!

Rich B

194
General Mach Discussion / Re: thc in macropump
« on: September 28, 2010, 03:42:07 AM »
If you mean the one by Brian Barker, I believe this is for analogue inputs. Mine is digital input, and I was under the impression that Mach 3 already has DTHC built in, so wouldn't need a plugin. Do you know where any code for running THC exists?

Something like

(-macropump-)
If Mach on then
If sensor input = 1 then THC down
Else if tool change macro is running then THC up
Else if do nothing
End

This is just pseudo code sketch.

Does something like this exist in useable form?

Not sure where to look!

Rich B

195
General Mach Discussion / Re: call macro from another macro
« on: September 27, 2010, 01:19:24 PM »
Then we await their presence with great anticipation! Or something...

Rich B

196
General Mach Discussion / thc in macropump
« on: September 27, 2010, 12:46:07 PM »
Hi,

I'm using my Z axis to drive a dispensing pump (as in my previous posts.) The pump's pressure (ie whether the Z axis advances or not) will be regulated by a logic on/off signal from a strain gauge/amp/comparator circuit. The circuit appears to work fine as a spice model, parts are on order for the circuit itself, so all's well there, barring signal to noise ratio problems.

I'm hoping to run a macropump to control this using DTHC. So the macro will keep the dispensing pump at optimum pressure whenever mach is running, by doing a 'THC down' whenever the pressure drops off a bit.

Trouble is, beyond defining this as rather fluffy pseudocode, I'm unclear about what the code might look like. I don't want to confuse myself further by looking at the wrong macros for inspiration.

Can anyone suggest a bit of code that already exists that might do some/all of what I need? My code understanding is not fantastic, but hopefully I could see how it works. Then me/my friend who enjoys programming/ can put something together that does the job!

Thanks,

Richard B

197
General Mach Discussion / call macro from another macro
« on: September 27, 2010, 12:14:49 PM »
Hi,

I'm guessing this is possible; can I call a macro from inside another macro, maybe via some conditional statement or other? Something along the lines of "If A=0 then M06"?

Thanks, Richard B

198
General Mach Discussion / Re: F for feedrate
« on: September 05, 2010, 03:23:55 PM »
Thanks all,

I think I got the idea!

Rich B

199
General Mach Discussion / Re: F for feedrate
« on: September 04, 2010, 06:07:14 PM »
Yep, thanks again Hood, that's clear Just wondering if it's possible to alter the speed of just 1 axis on the fly...

Richard B

200
General Mach Discussion / Re: F for feedrate
« on: September 04, 2010, 03:20:49 PM »
Thanks, Hood.

So I could set a feed rate for a particular axis; it would apply to all other axes as well, if those axes are mentioned in any G01 lines after the F command. So effectively I can't change just one axis' speed using F. So I need to set those by altering max speed in config/motor tuning.

Is there any way of altering the max speed of an axis 'on the fly', ie from Gcode as it runs? write and call a macro?

Richard B

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