Welcome, Guest. Please login or register.
Did you miss your activation email?
September 16, 2014, 04:28:37 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Third party software and hardware support forums.
| |-+  SmoothStepper USB (Moderator: Warp9TD)
| | |-+  G-Code execution halts
Pages: 1 2 »   Go Down
Print
Author Topic: G-Code execution halts  (Read 3065 times)
0 Members and 1 Guest are viewing this topic.
TunerTom
Active Member

Offline Offline

Posts: 60


View Profile
« on: September 03, 2009, 08:36:16 AM »

I have just installed a Smooth Stepper interface. All seems to be working, but my code hangs after it encounters a user-written macro.  It used to work when connected to the PP. 

I added a button & LED to toggle the Tailstock extend/retract function...  (see image 1)

I wrote a VB macro to toggle LED on/off...  (see image 2)

I wrote 2 macros to operate the tailstock on Output(4) so I could manage the tailstock in G-Code
(see image 3)
(see image 4)

Now, take a look at the following code...

N10    %(DIAMETER Mode)
N20    %(Complete profile for KEGGOBLQ in G-Code)
N30    T0101                           %(Set Tool #1)
N40           M801          %(Be sure Tailstock is retracted)
...
...      Note Line N40 executes just fine and program execution continues on. If the tailstock is extended, it will retract.
...
N50    G0 Z-69.4   X40.0           %(Go to 'Home')
N60    M3                                  %(Spindle On)
N70    M800                            %(extend Tailstock)
...
...     The line N70 executes and the tailstock extends
...     At this point the program executions halts and the
...     only way to continue on, is to click the [Cycle Start] button
N80     G04    P1000       %(Dwell 1000 milliseconds)
...
...     From here, the bulk of the profile runs just fine
...     Then when the program reaches line N710  (see below)
...     the M801 executes and the tailstock retracts
...     At this point program execution stops and  the
...     only way to continue on, is to click the [Cycle Start] button just like line N70
...
N690    G0  Z-68.48 X17.44
N700    G0  Z-69.4  X40.0
N710    M801                                  
N720    G04 P1000           %(Dwell 1000 milliseconds)
N730    M5                      %(Spindle Stop)
N740    M30                    %(Reset program)

Although this is sort of 'livable', it is a nusiance to have to 'continue' program execution twice for each run.
Any suggestions would be most appreciated.

Thanks in advance.




* TunerTom_Image00001.jpg (7.74 KB, 365x135 - viewed 113 times.)

* TunerTom_Image00002.jpg (15.86 KB, 348x198 - viewed 122 times.)

* TunerTom_M800.jpg (10.47 KB, 344x132 - viewed 122 times.)

* TunerTom_M801.jpg (10.73 KB, 346x142 - viewed 112 times.)
Logged
TunerTom
Active Member

Offline Offline

Posts: 60


View Profile
« Reply #1 on: September 03, 2009, 09:26:01 AM »

Something to add...

The problem is not limited to user-written macros.
Other files will stop executing at the end of G0 and G1 lines.
In DIAGS, I see the "Dwell" is turning on, but not turning off unti [Cycle Start] is clicked.
Logged
ger21
Global Moderator
*
Offline Offline

Posts: 3,908



View Profile WWW
« Reply #2 on: September 03, 2009, 10:25:05 AM »

Do you have G4 set to milliseconds in General Config?
Logged

Jeff_Birt
Active Member

Offline Offline

Posts: 1,039




View Profile WWW
« Reply #3 on: September 03, 2009, 11:42:44 AM »

What version of mach and plug-in are you using. There has been one other report of a SS stopping after G0's. I have tested many SS's and have never seen this. It makes me believe that 'something' is amiss in the profile. Can you start withe a fresh clean mill profile and see what happens? I would suggest just getting the Ports and Pins set up first in the new profile and test the operation of G0's. Then if that works right copy over your macros.
Logged

Happy machining , Jeff Birt
 
TunerTom
Active Member

Offline Offline

Posts: 60


View Profile
« Reply #4 on: September 03, 2009, 03:33:51 PM »

OK  The "G04 in milliseconds" setting in General Config is turned on  (see first image)

Mach-3 Version R3.042.029 is installed  (second image)

Smooth Stepper USB Driver 2.04.06  (third image)

Smooth Stepper Plugin  Ver 0.015ogb Config  (fourth image)

Program execution still turns "Dwell" on and won't clear without clicking  [Cycle Start] as describer earlier.


* TunerTom_Image0008.jpg (134.67 KB, 986x623 - viewed 123 times.)

* TunerTom_Image0009.jpg (30.95 KB, 515x257 - viewed 114 times.)

* TunerTom_Image0010.jpg (110.04 KB, 929x575 - viewed 114 times.)

* TunerTom_Image0011.jpg (79.18 KB, 424x177 - viewed 109 times.)
« Last Edit: September 03, 2009, 03:35:33 PM by TunerTom » Logged
Jeff_Birt
Active Member

Offline Offline

Posts: 1,039




View Profile WWW
« Reply #5 on: September 03, 2009, 03:48:23 PM »

OK, it has to be something hidden in the XML. Please try creating a brand new one from the stock 'Mill' profile, just change it to use the SS and then set the Ports&Pins up properly. If that works then copy your macros over. I'm not sure what gets screwed up in a profile but there have been a few different reports on the forum of unexplainable silly things happening when a profile gets corrupted.

I had a call from a customer yesterday that started Mach up with a SS profile I sent them BEFORE loading the plug-in. After the SS plug-in was loaded it insisted on setting a bunch of things to default. Even when I walked them through the settings it still would not come out of fault. I sent them another profile (same settings as I was telling them to make) and it magically worked. Some strange Mach variables are being corrupted I would bet.
Logged

Happy machining , Jeff Birt
 
TunerTom
Active Member

Offline Offline

Posts: 60


View Profile
« Reply #6 on: September 03, 2009, 04:09:52 PM »

OK, I'll do that in the morning and re-post when I get it done. 

I'm doing this on the plotter I have at home on my computer here.
If you think I should really be doing this on the computer at work?

I can do that but I have to disconnect the working PP interface and since it is working
I would have to wait until the lathe is free... that could be a couple of weeks...

The computer at work has been optimized and stripped of everything except for Mach-3
Do you think running this at home on a PC loaded with software is a bad idea?
The plotter ran just fine through the PP here.

(my apologies if this is a dumb question)
Logged
Jeff_Birt
Active Member

Offline Offline

Posts: 1,039




View Profile WWW
« Reply #7 on: September 03, 2009, 04:23:33 PM »

The symptoms you are describing do not strike me as having anything to do with any background processes that might be running on your PC. Since you are using the SS and not the LPT the processor load on the PC is less critical. I think it has to be some goofy profile thing.

If you want to you can post your current XML and a short bit of Gcode (like 10 lines) that replicate the problem and I'll try it here.
Logged

Happy machining , Jeff Birt
 
TunerTom
Active Member

Offline Offline

Posts: 60


View Profile
« Reply #8 on: September 03, 2009, 07:37:12 PM »

Jeff,

The following code will "hang after executing line N70 and after executing line N110


N05          %(Intended as a Turn Profile)
N10    %(use DIAMETER Mode)
N20    %(Demo profile to show flow interruption)
N30    T0101                                                        %(Set front tool)
N40          M801                         %(Be sure Tailstock is retracted)
N50    G0 Z-69.4   X40.0
N60    M3                               %(Spindle On)
N70    M800                                                         %(extend Tailstock)
N80          G04    P1000                                        %(Dwell 1000 milliseconds)
N90    G0  Z-69.4  X31.76
N100    G01 Z-47.92 X31.76          F150.0
N110    M801                                  %(Retract tailstock to sand)
N120    G04 P2000                             %(Dwell 12000 milliseconds)
N130    M5                                    %(Spindle Stop)
N140    M30                                   %(Reset program)

I've also included the macro files for M800 and M801...
(rename to M800.m1s and M801.m1s

* JR_SmoothStep.xml (99.28 KB - downloaded 74 times.)
* TunerTom_M800.m1s (0.02 KB - downloaded 72 times.)
* TunerTom_M801.m1s (0.03 KB - downloaded 72 times.)
« Last Edit: September 03, 2009, 07:54:25 PM by TunerTom » Logged
TunerTom
Active Member

Offline Offline

Posts: 60


View Profile
« Reply #9 on: September 09, 2009, 04:47:22 AM »

Really wierd...

I've done a complete uninstall/reinstall of Mach-3 Version   R3.042.029   I removed the original c:\Mach3 folder beforehand and made copies of my two user-writter vb macros M800 and M801. I reinstalled Smoothstepper... went through all the setup steps.  This time Windows found Smoothstepper hardware... There must have been a trace in the Registry,  Maybe I should do a system restore to a date before Smoothstepper was ever installed.

At any rate, I redid all my Ports & Pins settings and my motor tuning...
Still the same problem.  Line N70 of my listed program executes  (M800, my Tailstock extend Macro)... "Dwell" comes on (I have no idea why) and "Dwell" stays on until I click the  [Cycle Start]  button. The program continues on and it executes line N110 (M801, my Tailstock retract Macro)...  and "Dwell" hangs again, list like line N70.  Everything else executes and continues on without interruption. Oddly enough, Line N40 (which is identical to Line N110) works just fine, even if I extend the tailstock beforehand (so the line will actually do something)

If I hook up the PP and disconnect the SS, everything works.
« Last Edit: September 09, 2009, 04:49:23 AM by TunerTom » Logged
Pages: 1 2 »   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!