Hello Guest it is April 26, 2019, 12:29:30 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 - 01sporty

Pages: « 1 2 3 4 5 6 7 8 »
61
VB and the development of wizards / Re: Code Won't Load / Success!!!
« on: January 05, 2007, 12:11:41 AM »
In a nutshell, The Code Won't Load because there's no IsLoading() function.

To elaborate.  The following code works fine by itself:

While IsActive(Input2)
ActivateSignal(OUTPUT8)
Wend
While IsActive(Input3)
DeActivateSignal(OUTPUT8)
Wend


But when Mach3 loads a program, it does a run simulation as it loads each command.  This way it checks commands for syntax and draws the toolpath display.  When it encounters code that depends on a mechanical action to continue, it will sit there and wait for that action to occur.  Obviously this will never happen since it's a simulation.

Fortunately, there's a command just for this situation.  IsLoading: "Returns true if the part program is loading rather than being actually run (e.g. so the toolpath is being generated or regenerated)."

So my little while loop code becomes:

If IsLoading() Then
Else
While IsActive(Input2)
ActivateSignal(OUTPUT8)
Wend
While IsActive(Input3)
DeActivateSignal(OUTPUT8)
Wend
End If


This tells Mach to go on to the next command if it's loading, otherwise do the code.

I knew I had to be missing something simple.
Then again, I guess it's only simple once you've figured it out.
Regards,
Walt

62
VB and the development of wizards / Re: Code Won't Load
« on: January 03, 2007, 05:23:38 PM »
Hi Scott,

I see what you're saying.  That's really not what I want to happen.  I'm trying to avoid simply putting in a timing delay if possible.  I want all my actions to occur in a linear fashion.  That way, the machine runs at it's maximum speed and has no chance of crashing if there is any decrease in air supply.

To expand on this, here's what I'd like to see happen:  The INPUT3 switch is on the air cylinder in it's normally relaxed position.  The INPUT2 switch is at the end of the stroke of the air cylinder.  The air cylinder is OUTPUT8.  Both switches are normally closed but I don't think that matters since Mach3 lets you define normally high or low.  So, what I'm trying to accomplish is: trigger the cylinder, wait for the cylinder to reach the end of stroke, de-activate the cylinder, wait for the cylinder to get back to the beginning of its stroke and finally, continue the program.

The while loop routine I originally came up with accomplished this very well, ---  when run by itself from the MDI line.  I still find it odd that it runs there but won't run inside a program.

As confused as ever,
Walt

63
VB and the development of wizards / Re: Code Won't Load / Back Again
« on: January 02, 2007, 06:11:25 PM »
After more playing, things weren't working as well as I thought.

You're exactly right about the while loop.  Things started hanging and running really, really s l o w.  Checked my processes and Mach3 was using 98-99 percent CPU.  Yikes.

I really like the idea of the SystemWaitFor command, but it just isn't happening for me.  Here's what I scripted:

ActivateSignal(OUTPUT8)
SystemWaitFor(INPUT2)
DeActivateSignal(OUTPUT8)
SystemWaitFor(INPUT3)

It sure looks simple enough but it just sits there when I try to run it.  (I think I heard it chuckling.  Must be time for a nap.)

Regards,
Walt

64
VB and the development of wizards / Re: Code Won't Load
« on: January 02, 2007, 04:51:59 PM »
Well, upgrading to 2.0.028 did the trick.  I get so used to Mach3 being bullet proof, it just doesn't occur to me to check it.

Now, if I could just solve the limit switch problem...............

Thanks for all the support.  Sometimes it just takes a couple of fresh perspectives to get pushed in the right direction.

Regards,
Walt

65
VB and the development of wizards / Re: Code Won't Load
« on: January 02, 2007, 04:20:11 PM »
More info.

The M code is just what I originally posted:

While IsActive(Input2)
ActivateSignal(OUTPUT8)
Wend
While IsActive(Input3)
DeActivateSignal(OUTPUT8)
Wend


Input2 & 3 are micro switches.  Output8 is to a solenoid to activate the air cylinder.

Everything is being run through a G100 & Mach3 version 2.0.010.

The code appears to run just fine on another computer that isn't actually driving anything.  The other computer is also running version 2.0.028.

I suppose I should try upgrading the machine computer to 2.0.028 and see if that helps.  But, before I do that, I'll probably try the xml file from the computer that doesn't work in the computer that does work.  If the problem follows the xml file I may be a bit closer.

Regards,
Walt

66
VB and the development of wizards / Re: Code Won't Load
« on: January 02, 2007, 03:16:17 PM »
Yup.  I already made that mistake.  (see my post of a few days ago)  I always try to make sure my mistakes are new and fresh (to me anyway).

Like a said, if I run the macro from the manual data input line, it does just fine.  It just doesn't like to load once I put it in a program.  Once again, I'm sure I must be overlooking some small but significant detail.

Regards,
Walt

67
VB and the development of wizards / Re: Code Won't Load
« on: January 02, 2007, 03:02:49 PM »
Sorry, I should have specified that.  Yes, I'm using M110 for this bit.

Walt

68
VB and the development of wizards / Code Won't Load
« on: January 02, 2007, 02:19:33 PM »
I wrote the following routine to cycle an air cylinder.  It work just fine when run from MDI.  But, when I put it in a program, Mach3 loads until it reaches the line with this macro then quits loading.

While IsActive(Input2)
ActivateSignal(OUTPUT8)
Wend
While IsActive(Input3)
DeActivateSignal(OUTPUT8)
Wend

Could I get suggestions on how to fix this??

TIA
Walt

69
Mach3 and G-Rex / Re: Won't move off limit switch.
« on: January 01, 2007, 08:27:26 PM »
Yes, I am running a G-Rex.  Or, at least I'm trying to.  It has a lot of idiosyncrasies, like this limit switch thing.  I've attached the xml file.

I just ran into another issue.  I wrote this bit of code I call m109 to turn an air cylinder on.
ActivateSignal(OUTPUT9)
It worked fine yesterday and today it triggers a reset.   It's exactly like m107 and m108 which still work fine.  I need a break.

While you're looking, how about taking a peek at this snippet of code.
While IsActive(Input2)
ActivateSignal(OUTPUT8)
Wend
While IsActive(Input3)
DeActivateSignal(OUTPUT8)
Wend
This probably belongs in another section but why start another thread?  This code cycles an air cylinder.  It works fine when run it alone but when it's put in a program, Mach3 won't load.  It gets to the m110 and just stops loading.  Any idea on how this can be fixed?

Any and all suggestions will be greatly appreciated,
Thanks,
Walt

70
Mach3 and G-Rex / Won't move off limit switch.
« on: January 01, 2007, 05:38:50 PM »
My limit switches are working fine insofar as they stop the appropriate axis from moving.  But, once I'm on  a switch, it won't let me reset and move off the switch.  It just keeps beep beeping at me.  Everything looks fine on the diagnostic screen.  That is, the output 1 led goes out and the limit led's come on when the switch is triggered, it just won't reset in order to get off the switch.

Suggestions Please???????

Pages: « 1 2 3 4 5 6 7 8 »