Machsupport Forum

Mach Discussion => Mach Screens => Flash Screens => Topic started by: rapunzel123 on October 14, 2011, 11:28:51 AM

Title: decimal precision
Post by: rapunzel123 on October 14, 2011, 11:28:51 AM
hello there,

i just designed my first basic flash screen and i have a question:

how can i change the decimal precision of some dynamic texts like the dro for the axes? at the moment i have 1.0000 showing. how can i change this to 1.00?

it would be great if someone could help me. have a nice day!
Title: Re: decimal precision
Post by: zealous on October 21, 2011, 05:30:18 PM
Hi Sorry for the delay in responce,

These are the formating parameters (for example do "+%.3f" and it would come out 0.000):

Days:Hours:Minutes:Seconds
Code: [Select]
"%D:%H:%M:%S"
(f)loating point number, (4) decimal points, (+) or -
Code: [Select]
"+%.4f"
integer, no decimals
Code: [Select]
"%i"
hex number
Code: [Select]
"%x"
Format to send the above:
Code: [Select]
fscommand( TYPE fmt DRO Number , ABOVE FORMAT )
Example:
Code: [Select]
fscommand("DROFmt1819", '%.0f');