NativeCAM is Features renamed

More
04 Jul 2017 15:38 #95359 by eFalegname

Fern, maybe I have to delete my old modified files and reinstall NativeCAM...

I do not think so but I see a newline is missing after the postamble (% must be on a line by itself),
I will correct this for sure but meanwhile you only have to do this :

Add a new line after G28 in the postamble just like you added one before it

Fern


Hi Fern,
We all miss you. In the meantime, I post the solution in case it may serve someone...

line 3548...
if self.pref.use_pct :
return self.pref.default + gcode_def + \
_("(end sub definitions)\n\n") + gcode + self.pref.ngc_post_amble + '\n%\n'
else :
return self.pref.default + gcode_def + \
_("(end sub definitions)\n\n") + gcode + self.pref.ngc_post_amble + '\nM2\n'


Cheers,
Floris

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

More
04 Jul 2017 15:47 #95362 by FernV
Replied by FernV on topic NativeCAM is Features renamed

... a newline is missing after the postamble (% must be on a line by itself),

In the meantime, I post the solution in case it may serve someone...


The easiest way would be to add '\n' at the end of the postamble

Fern

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

More
04 Jul 2017 19:03 #95371 by eFalegname
Hi Fern,
I have some gcode files with trochoidal operations that I am trying to insert as items into linear arrays, I try to pass some parameters to them, but NativeCam does not allow adding the parameters to the start of the subroutine, I have tried to do it also at the beginning of the file using the Gcode function but it always gives me the same error. Could you tell me how I can do it?
Thank you!
Floris

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

More
04 Jul 2017 19:54 #95372 by FernV
Replied by FernV on topic NativeCAM is Features renamed

Hi Fern,
I have some gcode files with trochoidal operations that I am trying to insert as items into linear arrays, I try to pass some parameters to them, but NativeCam does not allow adding the parameters to the start of the subroutine, I have tried to do it also at the beginning of the file using the Gcode function but it always gives me the same error. Could you tell me how I can do it?


It is possible to include a g-code file and define up to 6 parameters, but it is not best for an array.

The turner-cube examples show how to add parameters that will change at each loop of an array. You first define initial values and at the beginning (or end) of the group of items in your array, you re-calculate new values as needed.

Could it work for you ?

Fern

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

More
05 Jul 2017 08:36 - 05 Jul 2017 09:18 #95380 by eFalegname
Good morning Fern.
Sorry I did not explain well what I want to achieve, I'm trying to pass a parameter to my inserted gcode, here's the possibilities I have tried so far but without a positive result:

A ) Parameteres at begining of array



B ) Using inserted Gcode parameters



C ) Parameters at the begining of Gcode file



D ) Including custom G Code into the array doesn't work either

It may be that the inserted gcode should respect a certain format or simply do not need to write the name of the variable on NativeCam but follow a logical order of appearance when listing the variables?
Thak you!
Floris
Last edit: 05 Jul 2017 09:18 by eFalegname.

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

More
05 Jul 2017 13:50 #95393 by FernV
Replied by FernV on topic NativeCAM is Features renamed
Hi Floris

#<d8> is a local parameter to 'ncam.ngc' while it is needed in the sub-routine 'o<incl_gcode_006_sub>' defined in the included file 'B O M_CF-iii T8.ngc'. Included files are always placed at the beginning of 'ncam.ngc' with a call to them in the code with a parameter list (1 to 6). Including those files elsewhere in the code would create a mess if placed in an IF, REPEAT or WHILE condition

You will have to edit 'B O M_CF-iii T8.ngc' in one of these 2 ways :
  • Use a global parameter like #<_d8> then modify GCode Line to #<_d8> = 7.95.
    This is simple and quick but I prefer keeping a local param like the next option.
  • Pass the value to 'Include GCode' to a Param (1 to 6) either #<d8> OR 7.95 (not the equation)
    assign the value at the beginning of 'B O M_CF-iii T8.ngc' like
    #<d8> = #(param number)

Fern
The following user(s) said Thank You: eFalegname

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

More
06 Jul 2017 08:36 - 06 Jul 2017 08:39 #95426 by eFalegname
Hi Fern!
I agree with you, the second option is more appropriate because using global variables include the danger of being able to forget them around. And it works, it works great!!
I have assigned the numerical value 7.95 to the first "# 1" parameter of the Gcode in NativeCAM, then I modified the Gcode to define in the first line the equation that passes the value of the NativeCam parameter to the Gcode:





Thank you so much for your precious time and valuable advices!
Cheers,
Floris
Attachments:
Last edit: 06 Jul 2017 08:39 by eFalegname.

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

More
10 Jul 2017 14:27 - 10 Jul 2017 18:14 #95604 by eFalegname
Hi Fern,
I have an annoying effect after the last tool change, just inside the last array (always with the "insert Gcode" OP) starting from the second element, the Z is reset a few mm higher, linuxcnc manages to mill the first element of the last serie and the remainder of the array is not milled. This only happens in the last array and regardless of the number of tools used in the file.
Any idea what I missed this time?
Thanks,
Floris
note: Since the last tool is shorter than the previous one I think maybe the last tool change does not set the tool length on the G57 work offset.
Last edit: 10 Jul 2017 18:14 by eFalegname.

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

More
10 Jul 2017 18:13 - 10 Jul 2017 18:20 #95614 by eFalegname
updated: When the Gcode file is compiled with Native CAM the error is not reproducible, but when the Gcode file is included in the NativeCAM array, the error is always repeated in the last tool change.
What do you think Fern, maybe I have a problem with my macro M6 or there is someone else who has had this situation?
Last edit: 10 Jul 2017 18:20 by eFalegname.

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

More
10 Jul 2017 18:45 #95617 by FernV
Replied by FernV on topic NativeCAM is Features renamed

updated: When the Gcode file is compiled with Native CAM the error is not reproducible, but when the Gcode file is included in the NativeCAM array, the error is always repeated in the last tool change.
What do you think Fern, maybe I have a problem with my macro M6 or there is someone else who has had this situation?

Is your tool change in the included file and repeatable ? What if it was out like in 'Tool Change' but if you use more than one cutter, you might have to split your file

Fern

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

Time to create page: 0.547 seconds
Powered by Kunena Forum