Hello Guest it is April 26, 2024, 05:14:13 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 - Greolt

691
Scott

I got it to work.  Had to go with "IsActive(INPUT4)" as the "GetOEMLed(824)" would not work for some reason.

I tried to use "Ismoving()"  instead of  "GetOEMled (999)"  to check for system movement but could not figure how to get it to work.

Any ideas?

Greg




'Macropump to activate Auto Tool Zero (M615) from an external switch via input #4

A = IsActive (INPUT4)  ' Is switch pushed
B = GetOEMled (164)   ' Spindle is Rotating LED
C = GetOEMled (999)   ' System movement LED
D = GetUserDRO (1140)

If A And (B = 0) And (C = 0) And (D = 0) Then
Code "M615"
SetUserDRO(1140,1)
End If

If (A = 0) And (D > 0) Then
SetUserDRO(1140,0)
End If


692
Thanks heaps Scott.

So I got it almost right except I did not know how the "and" statement worked.

That will mean I can have the Input #4 the more logical way.  At rest = 0,  Pressed = 1.

If (A = 1) and (B = 0)  and (C = 0) and (D = 0) Then

If (A = 0) and (D > 0) Then


I only had it around the other way because I thought I needed it to make the "and" work in the first line.

I'm off to test this on my router.

Have in mind to build in a delay so that the switch must be pressed for one second before the M650 will run.

But I will get back to that.   So beware of more questions soon. ;D

Thanks again,   Greg

693
Well here is my attempt at a working macro.

No laughing allowed.  ;D

I could not grasp the "If Not" thing but this makes sense to me.


'Macropump to activate Auto Tool Zero (M650) from an external switch via input #4
'OEMled 824 or Input 4, will be normally active (1) until switch is pressed/closed (0)

A = GetOEMLed(824)  ' Input 4 LED
B = GetOEMled(164)  ' Spindle Rotating LED
C = GetOEMled(999)  ' System movement Led
D = GetUserDRO(1500)

If A and B and C and D = 0 Then   ' if every one of the three LEDs and one DRO are at zero then the M650 will be run
Code "M650"
SetUserDRO(1500,1)
End if

If A and D > 0 Then     ' if the switch has not been released then A will still be at zero so this will act as a lockout
SetUserDRO(1500,0)
End if


What do you think? 

Greg

694
So then I gather my example , the second one, is sort of right?

I know that it is not usable VB,  but is that what the first one means?

Thanks,  Greg

695
OK let me ask about the "If Not"

It is this that is a sticking point in my grasping it.

This is my best guess at what it is,

If Not(GetUserled(1500)) and X>0 Then

Means

If GetUserLed(1500)  is zero and X > zero Then

Is that right?

Greg

696
Scott

I have looked at this macro till my old brain hurts and I just can't get my head around it.

What is the purpose of reading and setting  "UserDRO (1500)"  ?

If I could grasp that the rest looks easy.

X=GetUserDRO(1500)

If GetUserLED(1500) and X=0 Then
code "M650"
SetUserDRO(1500,1)
end If

If Not(GetUserled(1500)) and X>0 Then
SetUserDRO(1500,0)
End If


Despite searching for a while, I don't understand the "If Not" .  Perhaps if I did the rest would make sense. ???

Greg

697
NC Pod / Re: Slow jog speed with NCpod
« on: February 22, 2008, 04:24:59 AM »

Well I found out that it was a bug in that version of the plugin.

Downloaded the latest and jogging is fixed.

Now I found that the Shuttle Pro does not play nicely with the NCpod.

Oh well, can't have everything.  :D

Greg

698
Thanks Scott

I'll have to get back to this in a couple of days.

We have our Melbourne Australia CNC BBQ on tomorrow and I have stuff to get ready. :)

Will have some more questions then. ;D

Greg

699
NC Pod / Re: Slow jog speed with NCpod
« on: February 21, 2008, 03:11:47 PM »
OK this is not a high traffic part of the forum.  :D

Can anyone tell me if they can get 100% jog rates with the NCpod?

Greg

700
Thanks very much Scott.

I have read through your post about ten times.  :)

Mostly it makes sense. Couple of questions,

The purpose of the brain?  Is that just because I asked how to do it with a brain or is there a purpose for it?  Why not a macro pump alone?

UserLED and UserDRO.  Do they need to actually exist on the screen?  Or can they just be phantoms in the background?

Next question,  the purpose of this is to trigger a Auto Tool Zero routine with an external button press.

Do I need to build in protection against accidental activation while Mach is doing something else?  Running a program or whatever.  Or is Mach going to protect itself from that automatically?

If you have read this far thanks again.  :)

Greg