Hello Guest it is April 26, 2024, 01:57:49 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.


Topics - BOB88

Pages: 1
1
General Mach Discussion / Open Doors Inhibit
« on: September 10, 2010, 03:20:46 PM »
For Hood,

I would like to use the #2 user input (the one just under Input#1 used for open doors inhibit) to reset Mach3, just like clicking on the red reset button on the screen does.

I have input port 1, pin 13 available and would like to connect a mechanical switch to the input to trigger the reset condition.  Would you please tell me how to do that?  The book mentions that the Configure...System Hotkeys, also allows defining external buttons used as oem triggers but didn't give any examples of oem codes to use.

What do you think is the easiest way to do it?

Thank you

BOB88


2
Hi Drew,

Your program has helped me a lot to learn about script with mach3.  My turret has 8 positions, but no raise solenoid or index pins or BCD switches.
It is cycled one turret position by actuating a single air solenoid for about .55 seconds.

The turret is cycling fine by the following script in the file:    M20.m1s      located in the macros folder.

ActivateSignal(Output8)  'mapped to Port1 pin5, applies air to index cylinder
Code "G04 P.55"
While IsMoving()
Sleep 100
Wend
DeActivateSignal(Output8)   'turns off air to index solenoid which completes one index cycle.

So, any time I do M20 the turret advances and locks one position.  Great so far.


Now, I need to come up with the number of cycles or moves needed to get to the desired next tool.
In the M6Start.m1s, I'd like to calculate the unsigned value of the (CurrentTool minus SelectedTool)  which will give me the number of advances necessary to get to the next tool.  Then I can call or execute M20 that number of times to get to the selected tool.

How would you do that?  When you said M6 is not used in lathe but T0101, T0202,etc.  did you mean that M06 does not appear in the G-Code program itself, but just the T-numbers and that MACH3 knows to look at the M6Start when it sees a T-number?  (I noticed that you tested for M6)

Thank you for sharing your knowledge with newcomers to MACH.

BOB88


Pages: 1