Machsupport Forum
Mach Discussion => Mach Screens => Flash Screens => Topic started by: azambuja on September 08, 2008, 01:44:07 PM
-
Hello friends,
How can I make this transformation:
1.3333 to 1.33 ???
I tried to use this code:
X=Round(GetDRO(0),2)
AB=Round(X*100)/100
Call SetOEMDRO(800,AB)
but the number I got was 1.3300.
All that I wanted was 1.33.
Thanks for any support.
-
Can you format your dro/s to only display two decimal places and then when it pulls the value from that DRO will it only use what is seen?
Just thinking out loud.
Brett
-
How can I format my DRO's?
I do not know how to do it.
If you know how, hepl me.
thanks
-
If this is a flash screen your dealing with, I can't help you.
Brett
-
Yes, it is a flash screen.
And thanks again.
-
Hi,
To format a DRO use:
Example will format DRO 104
fscommand( "DROFmt104", "%.0f")
To format to time based:
Example will format DRO 815 and 814
fscommand( "DROFmt815", "%D:%H:%M:%S")
fscommand( "DROFmt814", "%D:%H:%M:%S")
Thanks,
Jason Blake
-
These are the formating parameters:
Days:Hours:Minutes:Seconds
"%D:%H:%M:%S"
(f)loating point number, (4) decimal points, (+) or -
"+%.4f"
integer, no decimals
"%i"
hex number
"%x"
Format to send the above:
fscommand( TYPE fmt DRO Number , ABOVE FORMAT )
Example:
fscommand ("DROFmt800" , "format" )
-
This was really helpfull.
Thanks a lot.
azambuja
-
Great ;D
-
Thanks for helping Jason. :)
Brett