Hello Guest it is March 29, 2024, 02:38:51 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.


Topics - moorea21

Pages: « 1 2 3 4 5 »
21
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

22
I need to interface a picaxe microchip with my pmdx122 breakerboard, so it can give a signal to mach to proceed when certain conditions are met (picaxe outputs to mach when an analogue light sensor's output drops by a certain percentage.)

The input pins on the breakerboard measure 2.8V unconnected, and my usual way of triggering them is to ground them using a switch... I have no idea how to trigger an input signal to mach using the picaxe's 5V 20mA output.

I can get mach3 to switch the picaxe on and off in VB script, that's working fine.

Having read the pmdx122 manual, it suggests that the voltage when the data bus buffer is tri-stated is approx 3.2V. I don't actually know quite what that means... apart from the fact that if I just connect the picaxe's output into mach's input, something may get fried?

Anyone done this before, or anything at all similar?

23
General Mach Discussion / pci parallel port drivers
« on: February 04, 2015, 06:33:39 PM »
My pc refused to boot up, has been replaced. Very annoying. I was running 2 parallel ports, built in and a moschip  MCS9865 pci card one. I have the driver cd for it, but having run every instance of setup on the CD, I still get 'no drivers installed' in device manager under 'pci parallel port'. This despite the fact that it worked fine on the old pc.

Is anyone else using one? What drivers should I use for 32 bit xp? So many on the cd, none work so far.

Thanks.

24
General Mach Discussion / Problems with For Next loop in script
« on: January 29, 2015, 03:33:53 PM »
I've been testing this script using MDI, for stopping X axis with an external input from a switch, and then allowing it to be moved afterwards:-

If IsActive(INPUT 1) Then  'If switch is tripped
DoOEMButton(250)   'stop X axis
DoOEMButton(1021)  'reset twice (once doesn't work)
DoOEMButton(1021)
End If
If IsActive(INPUT 1) Then
DoOEMButton(250)   'Do again to enable X axis to run again. Simply putting this command after 1st loop doesn't work
DoOEMButton(1021)
DoOEMButton(1021)
End If

If I trigger Input1 and hold it down, then run this, it works as I wanted it to, although it looks awful as a piece of code!

I want this script to run for 10 seconds, during which time it will 'look out' for input 1 triggering; so I put it inside a For Next loop, with a sleep command to ensure that this runs 50 times every second for 10 seconds; sufficient for my needs.

For i = 1 To 500
If IsActive(INPUT 1) Then  'If switch is tripped
DoOEMButton(250)   'stop X axis
DoOEMButton(1021)  'reset twice (once doesn't work)
DoOEMButton(1021)
End If
If IsActive(INPUT 1) Then
DoOEMButton(250)   'Do again to enable X axis to run again. Simply putting this command after 1st loop doesn't work
DoOEMButton(1021)
DoOEMButton(1021)
Sleep 20
End If
Next i

Unfortunately it works exactly the same as the first one; It doesn't seem to loop and wait for input 1 to activate; like the first one, it will only stop the axis and let it restart if I trigger Input1 and hold it down, then press run.

I can't see why it won't loop, sleep, and activate on input 1. Whatever it is, I just can't see it. I can't work out how to debug this at runtime, like in visual studio, as I don't know how to simulate the input 1's active signal.

Does anyone know why it isn't working as expected?

Thanks

25
General Mach Discussion / DoOEMButton(150), and (149)
« on: January 29, 2015, 12:47:39 PM »
I wanted to see what these commands actually do on my machine, so I typed 'DoOEMButton(150)' into the VB editor, tripped my limit switch on the machine to make sure it works correctly, then hit 'run' on the editor (As I understand it, this is supposed to override the limit switches.) Having pressed 'Reset', I find that the limit switch still works.

The same happened with OEMButton 149.

Have I misunderstood the function of these buttons?

26
General Mach Discussion / New to macros; do macros run only when needed?
« on: January 28, 2015, 12:47:05 PM »
I have had no luck getting homing to work on my machine, so I've decided to write a macro that should do what I want. This macro should set the DRO of X axis to zero if the switch wired to input#1 is tripped, and then reverse away from it. Not tested yet, as I'm not near the machine.

If IsActive(INPUT1) Then 'if switch is triggered
   DoOemButton (250)     'stop X axis
   Code "G92 X0"            'zero X axis
   Code "G00 X10"          'move away from switch
   While IsMoving()
   Wend
End If

This should allow me to zero from my Gcode program.

Can I call this macro when needed by using an M command in the Gcode? Would it switch off after it has returned to the main Gcode?
The problem is, I only need this to happen once in each file, but if the macro is constantly running in the background checking the input, it will use a lot of processor power; not good.

27
General Mach Discussion / G28.1 not zeroing axis
« on: January 27, 2015, 12:54:18 PM »
To simulate zeroing after many missed steps, I manually placed my x axis at approx. X=0, and ran this code:-

g00 x700
g92 x800
g28.1 x0

it crashed the switch, crunched while missing steps, and set the X axis to +100.

I then ran:-
g92 x0
g00 x700
g92 x600
g28.1 x0

This time it went past software zero, slowed down, tripped the switch, gave X as -100.

What I wanted it to do in both cases was to move towards the home switch, trip it, give it a value of zero, then move back from the switch.

My homing is configured as below:-

Axis          X
Reversed    no
Soft Max    100
Soft Min   -100
Slow zone  1.0
Home off   0.0
Home neg  yes
Auto Zero   yes
Speed        20%

No other switches are enabled.

I have obviously misunderstood how to set this up properly, I can't see (from how I understand it) why it does this. What am I misunderstanding, and what do I have to change?

Thanks

28
Can I home just 1 axis from from gcode or a macro? Or am I limited to zeroing all axes at once?

29
Starting to set up home and limits on my machine, basically a 2d plotter that uses paint instead of a pen, and I have 3 questions:-

1) I need 2 of its axes to home in both directions. X axis needs a 'rough home' switch at the far end of its travel, and a 'fine home' switch close to the other end. Z axis (which is not like a milling machine's Z axis; all this one does is work like a syringe driver to push paint) needs to use both of its limit switches as home switches. I have to specify a direction for each axis to home in; but in both cases I need it to home in the opposite direction as well, something which I believe Mach doesn't allow for.

I could use a G01 command to drive either axis until the limit switch opposite the home switch is tripped, but I then need to assign a value to that axis using G92 and then continue on to the next line of code; which tripping a switch configured as a limit won't do.

As a workaround, I had considered wiring the 2 limit switches up to Input #1 (I don't use a guard) and Input #2, and using these signals to open a macro that says either 'Set X DRO to my value, and go back to main program'  or 'Set Z DRO to my value, and go back to main program' as appropriate. I have 2 parallel ports, so using another 2 input lines in addition to my ganged limit switches on port1, pin11 is no problem.

Is this a reliable way to do this? Or is there a way of doing this just in the main gcode file?

2) I'd like to be able to switch off one of my Motion Control MSD 415 drivers during a large part of the execution of my code, I'm not sure if this is possible; if so, would it involve wiring the 5V supply to the driver via a Mach output pin, and switching it off (and later back on again) from a macro? If so, potentially simple to do. If its position changes during the off period, it's not a problem.

3) I have home switches configured for 4 axes, and I want them all to home individually, is this possible? If so, could someone show me an example of how this is coded?

Thanks anyone...

30
General Mach Discussion / dying motor(s)?
« on: January 08, 2015, 05:19:20 PM »
I have 2 nema 23 motors (X,Y), one of which (Y) started 'slipping', (for want of a better word) today. Its holding torque when not moving seems to be a good as ever, but when the y axis goes some distance, then stops and reverses, it makes a sound which was familiar to me when I ran it off a much lower current when testing. The motor has worked fine on the odd occasions I've used the machine in the last 4 or 5 years, I recently mothballed the machine, moved it, and reassembled it, and suddenly this happens.

It's a belt driven axis, I checked and rechecked everything there that could slip, nothing wrong.

Running the motor at 1/6th the acceleration didn't help, in fact, when I set it back to full acceleration, it had got worse.

The x axis motor, which works fine, feels very stiff and notchy to turn by hand, off the machine.

Are either or both on their way out? I hope not. I hadn't expected it to be such a sudden demise if so. I have a spare motor, which may not be that good either. I had expected a longer lifespan; the Z axis is not light by any means, and the Y axis does do a lot of small moves, and a few large ones. Also, the Y axis motor's bearings take the full side force of any acceleration/decceleration, although on this machine, there are no cutting forces or sideways forces for it to cope with. But as I said, the Y axis motor feels smooth to turn by hand., it's the X that's 'notchy'

Could it be a Mach problem? I doubt that, so I haven't reloaded Mach to test that idea.

M21

Pages: « 1 2 3 4 5 »