Create new Named Parameter

More
6 years 11 months ago #151469 by Vmax549
Replied by Vmax549 on topic Create new Named Parameter
OOPS I forgot to tell you it is in namedparams.py.

(;-) TP

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #151470 by smgvbest
Replied by smgvbest on topic Create new Named Parameter
which PP source file has that definition been added and where in that file?

first thing if PP is calling that definition, don't do a import within the definition. you'r importing it every time its call, that's disk IO and is the slowest thing you can do.

LinuxCNC specification decides how the named parameter should pass data. you have to adhere to the specification. PP also has to adhere to same specification.

In the program flow in the PP gui is a section names 50ms_timer of similar. many things are called from it. so you have to trace your program to find out if your in that loop.

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #151471 by Vmax549
Replied by Vmax549 on topic Create new Named Parameter
That would be well outside my paygrade (;-).

BUT I did solve teh problem. Reading back in teh manual PP has NO idea what an int() is it ONLY understands float values SO I had to inject the datetime value BEFORE it got to teh Gcode side of teh script and from there it works fine.

It can engrave the Date Time from a G47 call now.

ManfDate: 112820192045
S/N: 0000012345

Thanks for all the insight on LinuxCNC, It is a big help.

(;-) TP

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #151505 by andypugh
Replied by andypugh on topic Create new Named Parameter
I can't help feeling that you might be doing this the wrong way.

A one-time call to a User M-code that returned the date/time/serial would be a lot more efficient.

Have you considered what happens is the time changes during the engraving?

For interest you might want to look at some G-code I wrote that engraves numbers without using any external fonts or CAM:

forum.linuxcnc.org/20-g-code/27169-g-cod...numbers-on-cylinders

It's not directly usable in your case, I suspect, as it uses a rotary axis.

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #151517 by Vmax549
Replied by Vmax549 on topic Create new Named Parameter
Hi Andy it works perfectly now that I fugured out that PP does not understand anything but a float value . BUT Python does so I just had to move teh DATETIME over to puthon to use when creating teh engraving sequence to be used by PPs G47 sequential s/n engraving function.

ACtually I used their code and create a new Gcode G46 that has all teh attributes of their G47 except it only engraves teh DateTime. It uses a set of numbes that are predefined. The Height and wideth can be adjusted with G47/46 parameters.

On the part there is a pad machined to receive the Datetime and S/N.

When the pad is machined the prefixes are engraved from CAM

ManfDate:
S/N:

Then the gcode calls teh G46 and engraves teh Date time and then moved and calls the G47 and it engraves teh next S/N

ManfDate: 112920161805
S/N: 000123456

Just like teh big boys can do it.

It does not matter about teh time value as it is ONLY called one time in teh routine and teh resolution is down to minutes.

IF you try to put teh datetime into a Mcode it will always come out as a Float value with decimals. I tried that already.

The G46 method works perfectly. You could actually roll it all into the G47 function with switches .

ALSO teh PP routine only does X axis engraving. I also changed that to be able to do Y axis and I am going to take a look at Axis as well.

NOW if PP can add that routine it will be swell.

(;-) TP

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #151522 by Vmax549
Replied by Vmax549 on topic Create new Named Parameter
Hi Andy interesting how you did teh cylinder engraving . Haas has teh Cylindrical engraving function.

For having alpha letters I used this MacroB setup and borrow teh letters www.cncci.com/post/a-letter-engraving-custom-macro

The letters are also scalable .

(;-) TP

Please Log in or Create an account to join the conversation.

Time to create page: 0.365 seconds
Powered by Kunena Forum