LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data type problem

Solved!
Go to solution

Hello buddies. I am a Labview novice and has just started on a project involving communication with an MOS (Magnetic Orientation Sensor)
Basically a string in Hex is read in and I want to convert it into numbers. I am having problem probably due to data type, since when I use "highlighted execution", everything was fine, until it reaches the division part. The precision suddenly changes to 2 significant figures. Also, somehow the data could not be shown in the cluster, except for the integral ones. (voltage and temperature)

I am pretty sure it's due to data type, coz the integral ones are ok. I am using double precision, which should be fine. Please help me to find the solution!

Thanks in advance! Your kind help is highly appreciated!

Download All
0 Kudos
Message 1 of 5
(2,307 Views)
Solution
Accepted by topic author coolmatthew

On your front panel, right-click on one of your "output cluster" numbers, then go dpwn to "Representation." The VI you attached has all the numbers as U32 (I think the last one was actually U8). This is an integer. Change what you want to DBL. Then right-click the number again, go down to "Diaplay Format" to get the number fo decimal places (or sig figs) you want to see. That will do it.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
Message 2 of 5
(2,297 Views)

The displayed precision on highlight execution has nothing to do with the underlying data.  It just so happens the highlight execution display is showing 2 decimal places.

 

The displayed precision on your indicator has nothing to do with the data coming in.  It just depends on how you set the display format for each of the indicators within that cluster.

 

So, what problems do you actually have?

0 Kudos
Message 3 of 5
(2,294 Views)

Oh Thank you so much!!! I changed the data type of the cluster but I forgot to change the data type of the indicator!

Appreciate your kind help!!!

0 Kudos
Message 4 of 5
(2,288 Views)

It is fixed now, thanks anyway!

0 Kudos
Message 5 of 5
(2,286 Views)