Hello Guest it is April 25, 2024, 04:09:36 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 »
71
I want to be able to preserve the value of 'FileNum', (variable used in a macro), and access it from other macros after the macro that generated it is switched off, or use it in the same macro called again later in my Gcode. I tried this:-

Dim FileNum As Double

'Code arriving at a value for FileNum...

Param1() = FileNum

It tells me I have a type mismatch at the last line, which I don't understand, as the manual says that parameters are doubles, like my variable.

My variable is never more than 2 digits long, so doesn't have to be a double; I just thought it needed to be, in order to transfer its value to parameter1.

Am I not assigning the value of FileNum correctly to Param1()?
How can I pass values from one macro to another?

Thanks,

M21


72
General Mach Discussion / Re: mach ignoring macropump code
« on: April 21, 2015, 10:31:47 AM »
Okay, point taken. I'll think through my title posts a bit more clearly next time too.

73
General Mach Discussion / Re: mach ignoring macropump code
« on: April 21, 2015, 08:14:39 AM »
It turns out that g31 is working ok, just incredibly slowly. I've increased feedrate accordingly, problem solved. Thanks All!

74
General Mach Discussion / Re: mach ignoring macropump code
« on: April 21, 2015, 07:24:55 AM »
What I'm trying to do is get the Z axis (syringe driver) to withdraw completely, to the point where it trips a switch telling the axis to stop moving, in order to ensure that has sufficient clearance to go and pick up the next 'syringe' of paint.

When it has done this, the Z  drive moves down until it contacts the back of the 'syringe' plunger, then stops moving.

Currently this last operation is achieved using homing. I was hoping to achieve the 'withdrawal' stage using G31, a macro, a hack, whatever, in veiw of the fact that homing the same axis in 2 directions is not allowed in Mach.

75
General Mach Discussion / Re: mach ignoring macropump code
« on: April 21, 2015, 05:33:15 AM »
With probe set to port1 pin 12 (the switch), and Z set at 25000, I used G31 from mdi line to test, got 'probe ignored...', changed probe to active low, tried g31 z0, no movement on axis, no status line report. G00 etc etc all work fine. What's it doing now?

76
General Mach Discussion / Re: mach ignoring macropump code
« on: April 20, 2015, 04:34:24 PM »
I would if I could! It was probably at least 6 months ago, and would have been on the old pc that died. I'll try configuring my switch as 'probe' tomorrow, and try a G31 command to see if it works. The description in the manual sounds like the sort of behaviour that I need it to have. Thanks for the suggestion.

77
General Mach Discussion / Re: mach ignoring macropump code
« on: April 20, 2015, 04:24:05 PM »
Is it possible to use G31 in the opposite direction to the homing direction for an axis? I thought it wasn't, but the manual makes no mention of that, so I'm not sure what led me to that conclusion.

78
General Mach Discussion / Re: mach ignoring macropump code
« on: April 20, 2015, 04:19:28 PM »
I have, but it seemed to do the same as G28.1, unless I did something wrong.

79
General Mach Discussion / Re: mach ignoring macropump code
« on: April 20, 2015, 04:13:57 PM »
Brains seems to only allow me to have one button push as an end result. Not helpful, as I want to

1001 'feedhold
252 'switch off Z axis
1021 'reset
1021 'reset again
252 'switch z axis back on again

Can an OEM trigger make this run in macro form when the switch (currently input#1) activates?

It seems like it ought to in principle, but heres nothing in the manual for making oem triggers start a macro. Can anyone guide me to that information?

80
General Mach Discussion / Re: mach ignoring macropump code
« on: April 20, 2015, 02:18:30 PM »
Ah, I forgot to say, my Z needs to home in the opposite direction. I hadn't thought to include this information, sorry. The whole reason for this is to keep my Z homing in the positive direction, while this other homing like behaviour goes in the opposite direction. Mach doesn't allow 2 homing directions for the same axis...

Cutting the step signal to the driver works, but when I send the step signal through the 18feet of wire it takes to go from the BOB through the (previously input#1) switch to the driver, the step signal is too weak to trigger any behaviour in the driver it seems. Very annoying that is, as it worked brilliantly with just 4ft of wire. I suppose I could rig something up with an external supply and a relay, but I'd rather not.

So, will putting something like the original script into 'brains' give me a quicker response than using macropump? If it could , problem (maybe) solved.

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