Hello Guest it is April 18, 2024, 12:34:34 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 - 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 »
81
General Mach Discussion / Re: mach ignoring macropump code
« on: April 20, 2015, 11:39:40 AM »
Having just spoken to the manufacturer of my drivers, I may be able to simply use a 'normally closed' switch in series with the lead that runs from the breakout board to the driver, which when tripped by the z axis movement will switch off the step signal to the Z drive, causing the motor to stop. May try this before investigating software solutions, will post something soon.

82
General Mach Discussion / Re: mach ignoring macropump code
« on: April 20, 2015, 11:27:19 AM »


This is representative of the kind of code; not much to see. The Z drive needs to withdraw until it trips a switch that currently activates input#1. When that happens, I want the Z drive to stop moving, and the next line of code to execute; the one that names the resultant z position as 0. Z works like a syringe driver; it withdraws fully (-40000 is a 'fake' position guaranteed to make the axis go far enough to trip input#1 switch regardless of where it starts from,) and moves to X151 to pick up a tube of paint.

( 4.nc  11/04/2014 18:06:54)
G21
G90
G64
G00 A0.2 F2500
( TOOL CHANGE :  4 )
M06 T4
G00 Z-40000
G92 Z0
G00 X151...

G00 X0 Y0
M06 T1
M30

It only does this at the beginning and end of each file, when it picks up/drops off a new tube of paint to paint with. There is some flexibility built into the physical structure of this axis; if it overruns a bit, no harm, but currently it overruns by about 5-6mm sometimes, which is pushing it.

83
General Mach Discussion / Re: mach ignoring macropump code
« on: April 20, 2015, 10:15:49 AM »
Okay, a fudge will do in this instance. But 'DoOEMButon (1021)' twice before 'else' for some reason doesn't work; I get the same status line telling me to press cyclestart. Why might that be?

Also, the script sometimes takes too long to respond, even though it's always activated in the same circumstances while only 1 axis is moving (same one each time.)

I know nothing about 'Brains' yet, but would that be a way to make sure the script runs more promptly?

Thanks

84
General Mach Discussion / Re: mach ignoring macropump code
« on: April 20, 2015, 09:03:53 AM »
Now it does work, so it must have been pilot error of some sort, although I feel sure I'm not doing anything differently today.

I have made a point of closing and reopening mach after each change to macropump file, but then I'm sure I did that yesterday as well. Maybe not...

Using the MDI line to provide a testable axis movement, it stops the axis (not very abruptly, but well enough for this application,) and gives me a status line that says  'MDI line paused.. hit CycleStart to continue'. As I don't want it to continue with the paused move, but instead go to the next line of code, I was thinking of adding 'DoOEMButton(1021)' twice after the 'Else' statement.

This seems a clumsy way to achieve this, is there a more 'normal' way to get it to execute the next line after stopping the axis's movement?

85
General Mach Discussion / Re: mach ignoring macropump code
« on: April 19, 2015, 04:33:17 PM »
I triple triple checked... and it's in the right directory. Mystified

86
General Mach Discussion / Re: mach ignoring macropump code
« on: April 19, 2015, 04:12:47 PM »
Erm...

I enabled it in general config, I don't remember there being any more to it than that. Nothing in the manual.

?


87
General Mach Discussion / mach ignoring macropump code
« on: April 19, 2015, 03:07:27 PM »
In a previous thread I started (Problems with For Next loop in script), BR549 kindly gave me this script to run in macropump:-

IF Isactive(input1) Then
DoOemButton(1001)
While Ismoving()
Wend
DoOemButton(1003)
Else
End IF
END

According to my logbook, it worked. Next day, the PC died, and has now been replaced. But now macropump code of any sort doesn't work. I then tested the above code in the vb script window; as predicted, it locked up the processor. I tested this code instead (by pressing input 1 switch to make it active; checked in diagnostics screen):-

IF Isactive(input1) Then
Code "G00 X200"
End IF
END

No joy in macropump, but works from VB code window. All this despite 'run macropump' being enabled in general config.

macropump file is called 'macropump.m1s', my xml is attached in case that helps anyone.

Anyone know why macropump code is not being run?

Thanks, R

88
That's great, thanks for that. I'd convinced myself that the picaxe wouldn't hold at 0V if driven low. I think that was mostly where I was confused. I'll try this tomorrow.

Good to know I won't be turning the BoB into smoke.

89
I'm not at all experienced in these things, rather bumbling my way through it all.

I checked the figure of 6uA;- it's 2mA... and I may have misinterpreted the context too. From Steve Stallings at PMDX:-

"The inputs (pins 11, 12, 13, and 15) of the PMDX-122 need to be driven from a
circuit that can sink 2 milliamperes to ground with the voltage being driven within
0.4 volts of ground."

The code is all up to me.

I think I may be misunderstanding something quite fundamental here, maybe about microprocessors in general, or BoBs, or parallel ports:-

1) If my picaxe is normally outputting 5V INTO the input pin on the BoB, and then it goes low, does that then mean that the picaxe is driving the input pin to 0V? Or does it mean it's left floating? I assumed the latter, as I thought a lack of output from a microprocessor output pin just means it floats around, not tied to 0V.

2) Normally, inputs on my BoB are connected just to switches that act to ground the 5V that my multimeter tells me exists at the input pin. Having trouble getting my head around connecting inputs to anything other than switches; the idea of driving an external voltage into an input pin is a bit alien to me.

If I'm driving 5V into the input, is that input then just held at logic high (5V), or is it held at logic high with 5+5=10V potential? I baulked at the thought of trying that, it sounded like a way to ruin my BoB.

I'd be quite happy to connect the picaxe output (approx 15mA) to the input pin on the BoB and trigger Mach by sending it low; I'd like to understand what I'm doing a bit better before trying it. As I said, I'm probably missing a basic understanding of something here. Hopefully it's not too exasperating to attempt to explain it to me; the effort is certainly appreciated.

90
I see, I think. So if I'm driving the picaxe pin low, I am basically grounding the input on the BoB , as the picaxe and BoB would share a common ground. If so, that makes a lot more sense than adding a relay. I only really decided on a relay as it isolates the BoB electrically from the picaxe, to reduce any noise etc problems between the 2. I'll try just a transistor, especially as the pin only sources 6uA according to the manufacturer.

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