Hello Guest it is July 19, 2024, 10:48:42 PM

Recent Posts

Pages: 1 2 3 4 5 6 7 8 9 10
1
VB and the development of wizards / Troubleshooting a lathe tool change script
« Last post by TXJM on July 19, 2024, 10:40:28 PM »
I am helping rebuild a small lathe with an 8 position tool changer.  This is my first script in Mach3.  We converted the tool changer from a pure pnuematic with a proprietary control board to a stepper with encoder driven rotary motion with a pnuematic lock.  The cylinder has sensors to read locked and unlocked position.  We have been trouble shooting the code and think it is tied to line two of the code not seeing the value of the variable "Tool".  I can put a number 1 through 8 into the SetCurrentTool function and the toolchanger unlocks, moves and locks as it should.  We also have the inputs rem'd out at this point in the trouble shooting.  One step at the time.  what is the best way to see if the function getting the current tool number and what is the best way to see that the variable, "Tool" changes?  Right now the code is loaded into M06 start and we are to the point that we are running it from the mdi.

Tool = GetSelectedTool()
SetCurrentTool(Tool)

Code"G53 X-0.2 Z-0.2"                     'Move to tool change location
While Ismoving()
Wend                         

ActivateSignal(OUTPUT4)             'unlock the turrent
While not Isactive(INPUT2)          'wait for the switch to signal end of stroke
Sleep(1000)                         'Give it time for the motion to fully stop
Wend

If GetCurrentTool() = 1 then        ' Check for the Tool #
   Code"G0 A2.3486"                 ' Move to position
   While Ismoving()                 'wait for the movement to stop
   Wend
   End If

If GetCurrentTool() = 2 then
   Code"G0 A4.6972"
   While Ismoving()
   Wend
   End If

If GetCurrentTool() = 3 then
   Code"G0 A7.0458"
   While Ismoving()
   Wend
   End If

If GetCurrentTool() = 4 then
   Code"G0 A9.3944"
   While Ismoving()
   Wend
   End If

If GetCurrentTool() = 5 then
   Code"G0 A11.743"
   While Ismoving()
   Wend
   End If

If GetCurrentTool() = 6 then
   Code"G0 A14.0916"
   While Ismoving()
   Wend
   End If

If GetCurrentTool() = 7 then
   Code"G0 A16.4402"
   While Ismoving()
   Wend
   End If

If GetCurrentTool() = 8 then
   Code"G0 A18.7888"
   While Ismoving()
   Wend
   End If

DeactivateSignal(OUTPUT4)              'Release air cylinder
While NOT Isactive(INPUT3)
Wend
Sleep(1000)                            'Give it time to complete end of stroke

End
2
Mach4 General Discussion / Re: PMC, Problems, How does it work, Removal.
« Last post by joeaverage on July 19, 2024, 08:13:48 PM »
Hi Brian,
thanks for the reply.

That is indeed exactly the way that I populated the 'PMC Objects' and also how I tried removing them.

It took ten or a dozen times before I stumbled on the correct keystrokes before I could select and retain a PMC object from the drop down list.
Then it took many tries before I stumbled on to the correct keystroke sequence to remove an object.

Not quite sure why I cannot select or deselect an object from the drop down list, but it did take repeated tries before I succeeded.

What is certainly true is that with a simple and functional one rung PMC object it caused a random fault with one output signal, in particular the Machine Enabled signal,
and when that screws up you can have some weird results! Since I've removed the PMC object things have gone back to normal.

As it turns out I was using the PMC to schedule the spindle circulation pump. The pump is very good, but rather drones. Thus I want it on only when I need it.

When the spindle turns on, and receives a signal from the BoB to that effect it turns the pump on......but for a few seconds after the pump turning on the flow detector has yet
to measure any flow, and this would normally be considered a fault. Thus I need a small delay such that the flow detector could reliably signal spindle coolant circulation before triggering a spindle alarm.
Also at spindle turn off I want the spindle coolant circulation pump to continue for twenty seconds or so, in part to ensure that the labyrinth seal air purge remains active (being commoned to the
spindle coolant circulation pump).

I have made a small PCB that handles the interlock, spindle fault, tool change air, taper blow air and monitors coolant flow, spindle temp and the tool detect switches. The PCB has a small 8bit micro so
it was really just a case of programming it properly to handle the pump scheduling/air purge scheduling. The PCB handles the spindle pretty much autonomously. seems like I have it working OK.

Craig

3
HiCON Motion Controller / Re: Mach 4 can't find Plugin and /sig files
« Last post by novation1 on July 19, 2024, 11:14:13 AM »
Also wanted to add that only the HiCon plugin and sig files aren't recognized. Others are loaded. 
4
Mach4 General Discussion / Re: PMC, Problems, How does it work, Removal.
« Last post by Brian Barker on July 19, 2024, 09:59:55 AM »
To disable or enable a PMC you need to do this under the screen settings when your in edit screen
Have a look at the attached image:


If the PMC is turning off something yes it could effect the machine. You need to make sure that it is not trying to turn anything off when your trying to use it... It's like having your wife help you and keeps locking you out of the house while your trying to work on the car. (maybe my wife is the only one that likes to lock me out because she forgets I am at the house doing stuff LOL) ..

The PMC is very powerful but it can make some odd errors!
5
Mach4 General Discussion / G76 Threading problem.
« Last post by Rimmel on July 19, 2024, 08:40:59 AM »
Mach 4 4809 - ESS 285

I have a machine "Upgraded" from Mach3 to Mach4: Got a Rotary encoder setup ABZ. Working fine.

If I run this threading GCode (below) it will sometime run but others (random) it just sits on the G76 line and will not move any further.

Anyone have any idea why? Seems like it's not recognising the Index sometimes.

To be clear this code runs and cuts a great thread quite often, but then will just refuse. I can reset it and it will still not run and then all of a sudden it will run again.

How can I debug/investigate the error (Mach4 doesn't throw up and error)
Code: [Select]
G40 G54 G80 G98 G18 G21

G99 (Feed per Revolution)
G97 S450 (Constant Speed)
M03 (Spindle Forward)
M08 (Flood)
G00 X10.0
G00 Z5.0 (Rapid move to Clearance Height)
G4 P2.0

G76 P030060 Q0.001 R0.015 K3
G76 X9.02 Z-19.0 R0.0 P0.44 Q0.015 F0.75
G80 %
M5
M9
G98

M09
M05
M30 %
6
Mach4 General Discussion / Re: G76 K options - could someone explain please
« Last post by Rimmel on July 19, 2024, 06:16:20 AM »
Most lathes are run in feed per rev (G99) that way if you override the spindle speed the feed follows also G96 needs feed per rev to compensate for the change in diameter as the spindle changes speed so will the feed.

G98 & G99 are modal so if you do not change them they stay active so you normally have the G99 in your start up line.

Most lathes use feed rates between 0.05mm to 0.40 mm per rev for turning depending on the size and power of the spindle and the depth of cut.  When using carbide the speed and feed should be in the working range of the insert and the depth of cut adjusted to allow the machine to cut without issue.

If you are using CAM to program there will be an option for feed per rev (in fusion this is set in the tool library) or it may be a post option on some systems.

Its better to use feed per rev on lathes after all that is how a manual lathe works.

There is also the G32 and G92 threading options.


Threading in Mach4 just seems so FLAKEY - you just cannot rely on it.

E.g. I can run a threading routine 10 times - no problem. Then I edit the Gcode to change a parameter in the G76 line and the next run the program hangs on the G76 line.

I have literally spent 4 days just trying to get the threading working. For a product that is supposed to be an "Upgrade" to Mach3 I feel a little bemused.

I also think they made the G76 threading too complicated for what is needed. In Mach3 you basically had an X starting point (Thread Major) a Z staring point. Then an X end point ( thread minor) and Z end point and pitch. Simple as you like. The "Ugrade" seems to be ironic in nature. E.g is it an "Upgrade" if you cannot reliably use it?



7
Most lathes are run in feed per rev (G99) that way if you override the spindle speed the feed follows also G96 needs feed per rev to compensate for the change in diameter as the spindle changes speed so will the feed.

G98 & G99 are modal so if you do not change them they stay active so you normally have the G99 in your start up line.

Most lathes use feed rates between 0.05mm to 0.40 mm per rev for turning depending on the size and power of the spindle and the depth of cut.  When using carbide the speed and feed should be in the working range of the insert and the depth of cut adjusted to allow the machine to cut without issue.

If you are using CAM to program there will be an option for feed per rev (in fusion this is set in the tool library) or it may be a post option on some systems.

Its better to use feed per rev on lathes after all that is how a manual lathe works.

There is also the G32 and G92 threading options.
8
HiCON Motion Controller / Mach 4 can't find Plugin and /sig files
« Last post by novation1 on July 18, 2024, 01:29:44 PM »
Machine was running fine. I sold the machine and it was moved to a different location. It was just powered up after sitting for a couple of months. It now has an error message (can't read from file description 3, (error 23) data error. Also Mach can't see the plugin and sig files that are in the plugin folder. Also started VSI device manager and can see the controller which is a 7766. Any ideas on how to correct this so I can get out from under this thing.
9
Mach4 General Discussion / Re: five axis
« Last post by Bill_O on July 18, 2024, 10:35:12 AM »
Thanks for the information Craig, Katz and Chad
10
Mach4 General Discussion / Re: G76 K options - could someone explain please
« Last post by Rimmel on July 18, 2024, 07:07:08 AM »
In most cases option 0 is the one to use.

Mach4 has two types of G76 try the Fanuc single line version its much less complicated. Page 46/47 in the lathe manual.


In most cases option 0 is the one to use.

Mach4 has two types of G76 try the Fanuc single line version its much less complicated. Page 46/47 in the lathe manual.



Thanks for the reply Graham. The single line is definitely easier.

One thing, the "Wizard" inserts a G99 into the code before the threading canned cycle. But the manual does not. Is the manual assuming you insert it or does the G76 automatically do it?

thanks again
Pages: 1 2 3 4 5 6 7 8 9 10