Debug without decimal places
11 Aug 2020 12:06 #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 or Create an account to join the conversation.
11 Aug 2020 12:32 - 11 Aug 2020 12:33 #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.
Last edit: 11 Aug 2020 12:33 by anfänger.
The following user(s) said Thank You: wudejo
Please Log in or Create an account to join the conversation.
11 Aug 2020 12:51 #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 or Create an account to join the conversation.
11 Aug 2020 14:03 #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
The following user(s) said Thank You: wudejo
Please Log in or Create an account to join the conversation.
Time to create page: 0.063 seconds