- Posts: 2
- Thank you received: 0
Debug without decimal places
6 years 2 months ago #177887
by wudejo
Debug without decimal places was created 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
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.
6 years 2 months ago #177890
by anfänger
Replied by anfänger on topic Debug without decimal places
You can use round first, this will give you the nearest integer.
Please Log in to join the conversation.
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...
Thank you...
Please Log in to join the conversation.
6 years 2 months ago #177898
by anfänger
Replied by anfänger on topic Debug without decimal places
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
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
