ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

adding decimal to an integer

I'm reading 3 digit integers back from a controller in the form of XXX. I need to format them to the form XX.X

Example

245 should read 24.5, or 345 should read 34.5.

Besides the easiest method of just dividing bt 10 is there a labview function that will place the decimal in my integer number where I need it to be?

0 Kudos
Message 1 of 3
(2,796 Views)

No, division is just fine.Well, you could multiply with 0.1 instead 😄

 

If it is just a string: insert a dot char after the 2nd char (as most "controllers" managed by VISA functions deliver strings...).

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,792 Views)

Thank You.....

0 Kudos
Message 3 of 3
(2,779 Views)