NEWS
LinuxCNC 2.5.2 Release
LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Gcode error

Gcode error 05 Apr 2012 02:34 #18982

  • rene
  • rene's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 1
Hello,

I build this machine:
I want that every Operator our company can use this machine so i made a gladevcp userinterface,
The glade panel is standalone and loads after the axis program.
All hal boxes in this panel are connectet with analog ports.
The gcode programm read these analog ports

The problem is when axis starts the analog ports are zero and axis shows an error message.
how can stop axis from sending this gcode error messages.

In the attach is this gcode programm. Error is in Line 115
Sorry for my bad english. This attachment is hidden for guests. Please log in or register to see it.
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
Last Edit: 05 Apr 2012 02:35 by rene.
The administrator has disabled public write access.

Re:Gcode error 05 Apr 2012 04:26 #18983

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 5082
  • Thank you received: 102
  • Karma: 136
You will have to somehow not have a negative feed value to prevent the error. Perhaps use an absolute number that can not be negative.

Very nice video and a neat machine... you do have a lot of error messages on your screen to work out.

John
Last Edit: 05 Apr 2012 04:31 by BigJohnT.
The administrator has disabled public write access.

Re:Gcode error 05 Apr 2012 04:36 #18984

  • Rick G
  • Rick G's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1088
  • Thank you received: 17
  • Karma: 80
Did not have time to follow the logic but perhaps if after...

#<rueckfahrspeed> = [#<temp1> - #<pos1>] / [#<schneidzeit> + #<haltezeit> * 60]
You added logic that...

If <rueckfahrspeed> is less than or equal to 0
#<rueckfahrspeed> equals 10 or some number that will not cause a problem

Then continue, again I have not followed your logic but earlier in your program you have...
#<rueckfahrspeed> = 10

Rick G
The administrator has disabled public write access.

Re:Gcode error 05 Apr 2012 04:49 #18985

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 5082
  • Thank you received: 102
  • Karma: 136
Good idea Rick, I just tested in the Axis Sim and F0 is an acceptable G code so if less than 0 set to 0 should solve the problem.

John
The administrator has disabled public write access.

Re:Gcode error 05 Apr 2012 07:36 #18988

  • rene
  • rene's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 1
Thank you BigT for the compliment.

I have found the problem. :)
At the start of axis the parameter #<laenge> = 0
with this parameter i calculate #<rueckfahrspeed>

#<temp1> = [#<laenge> + 20]
#<leerlaufzahl> = 0
o102 while [#<temp1> GT #<maxlaenge>]
#<temp1> = [#<temp1> - #<maxlaenge>]
#<leerlaufzahl> = [#<leerlaufzahl> + 1]
o102 endwhile

#<rueckfahrspeed> = [#<temp1> - #<pos1>] / [#<schneidzeit> + #<haltezeit> * 60]

so get a negativ number

If fix this with

O112 if [#<laenge> EQ 0]
#<laenge> = 1000
O112 endif

modified Gcode in the attachments

now i get no error massage but when i now start axis the interpreter hang up.
This attachment is hidden for guests. Please log in or register to see it.
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
The administrator has disabled public write access.

Re:Gcode error 05 Apr 2012 07:38 #18989

  • rene
  • rene's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 1
After exiting Axis this error is shown. This attachment is hidden for guests. Please log in or register to see it.
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
Last Edit: 05 Apr 2012 07:39 by rene.
The administrator has disabled public write access.

Re:Gcode error 05 Apr 2012 07:55 #18991

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 5082
  • Thank you received: 102
  • Karma: 136
If when you load a G code file with loops Axis hangs up it is usually a loop that does not ever exit or loops a zillion times.

John
The administrator has disabled public write access.

Re:Gcode error 05 Apr 2012 08:15 #18993

  • ArcEye
  • ArcEye's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1418
  • Thank you received: 114
  • Karma: 130
Hi

JT beat me, the video looks like it is in an endless loop.

The errors are related to loading the .ngc file too which figures

Only thing to do is revert to the file that loaded and slowly introduce the changes until you hit a problem.
I would suspect that your substitution of 0 for 1000 is having an unforeseen effect in another section of the code.

regards
The administrator has disabled public write access.

Re:Gcode error 05 Apr 2012 09:11 #18996

  • cncbasher
  • cncbasher's Avatar
  • OFFLINE
  • Moderator
  • Posts: 761
  • Thank you received: 35
  • Karma: 53
O112 if [#<laenge> EQ 0]
#<laenge> = 1000
O112 endif

this should be a lower than or equals if equate , i under stand this to equate to 0 only and not a lower than or equals , so i recon it hangs up
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 1.073 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.