Debug without decimal places

More
6 years 2 months ago #177887 by wudejo
Hi

I want to print a text with (DEBUG, xxxxx xxxx) and inside the text there is a variable. It will show the variable with 6 decimal places. Is there a way to cut it to no or only one decilmal place ?

Best
wudejo

Please Log in to join the conversation.

More
6 years 2 months ago #177890 by anfänger
You can use round first, this will give you the nearest integer.

Please Log in to join the conversation.

More
6 years 2 months ago #177892 by wudejo
Replied by wudejo on topic Debug without decimal places
Ok, thanks. But i don't understand exactly. Can you write me the syntax for that ?
Thank you...

Please Log in to join the conversation.

More
6 years 2 months ago #177898 by anfänger
Take a look ad the G code overview of LinuxCNC

linuxcnc.org/docs/html/gcode/overview.html#gcode:functions

Should be something like this:

#<intvar> = ROUND[#yourparameter]

(DEBUG, xxxxx #<intvar> Xxxx )

Or something like this I can‘t test it now

Please Log in to join the conversation.

Time to create page: 0.078 seconds
Powered by Kunena Forum