CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 15, 2019, 11:04:52 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Error message for '#' symbol  (Read 1014 times)
Dragonfly
CNC Jedi
*****
Offline Offline

Posts: 2225



View Profile
« on: July 26, 2019, 12:10:39 pm »

I am using a modified PP for generating code to do fine thread tapping with CB and Mach3. (Basically peck drilling is replaced with calling a Mach3 macro.)
I use MOP header function to set some Mach3 variables in the G-code - thread pitch, rotation speed, depth from which the macro calculates the actual turns the tap must do and sets the speed.
However I am getting status messages "Unexpected token '#' at line xxx".
The code is generated correctly and the header is inserted into it. Simply CB does not recognize the '#' symbol.
Maybe in future releases this could be corrected.


* CB-Token.jpg (226.23 KB, 925x694 - viewed 73 times.)
Logged
lloydsp
CNC Jedi
*****
Offline Offline

Posts: 8085



View Profile
« Reply #1 on: July 26, 2019, 13:14:43 pm »

DF,
All you have shown us is that you're getting the error you said you were getting.

Without the macro code, I doubt we'll be able to help more than just to say, "Yep! There's the error!"

Lloyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
Dragonfly
CNC Jedi
*****
Offline Offline

Posts: 2225



View Profile
« Reply #2 on: July 27, 2019, 10:34:32 am »

Lloyd, either I didn't explain it clear enough, or you didn't read carefully.
I have no problem posting the macro but it is a Mach3 macro and has nothing to do with CB.
The '#' (hash) symbol is used to define a variable in G-code. So when I prepare a MOP I write a MOP header containing
#501 = 0.35 (thread pitch)
#502 = -5 (depth)
#503 = 10000 (speed in deg/min)
CamBam includes those lines in the generated G-code (giving a warning about the '#' symbol).
The macro, when called from the G-code, reads those values and calculates the actual turns the tap must do to reach the set depth.
I repeat. The code runs fine. There are only warning messages about unexpected token and only when the actual code is generated - written to a file. On tool path generation there are no warning messages.
Logged
lloydsp
CNC Jedi
*****
Offline Offline

Posts: 8085



View Profile
« Reply #3 on: July 27, 2019, 13:24:59 pm »

Ah... OK... I did misunderstand, although upon re-reading your post, it seems you described it adequately.

Yeah... one of those irritating 'cosmetic' bugs.  It should be fixed.

Lloyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 4079



View Profile
« Reply #4 on: July 27, 2019, 15:19:32 pm »

I don't think there is anything to correct in CamBam, it's just informing the user that an unexpected symbol was found but it still went on to generate the code.

It looks to me like a 'sanity check' regarding the text entered in 'MOP Header' so that you don't go on to cause a problem at the cutting stage.
Logged

Made in England
Dragonfly
CNC Jedi
*****
Offline Offline

Posts: 2225



View Profile
« Reply #5 on: July 27, 2019, 20:24:12 pm »

That's right, Eddy. Because the warning appears only on actual file generation it's almost certain  CB does a sanity check.
I don't know how it works internally but if it is a range of allowed symbols the '#' can be added as it is used in real world G code text.
Either way, as long as the user header is included correctly, not a big problem. Just an observation from me.
Logged
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 5677



View Profile WWW
« Reply #6 on: July 27, 2019, 21:17:58 pm »

Hello

Quote
Simply CB does not recognize the '#' symbol.

same for the '=' .... (but the warning appears only for the first "wrong" char so it do not appears with the # before)

++
David
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.105 seconds with 19 queries.

Copyright © 2018 HexRay Ltd. | Sitemap