LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cluster rounding off value

I have a cluster that is used to set RS232 port parameters, then I use unbundle by name to extract 6 of the 8 values, one of which has a decimal point.  I bundle them by name into a new cluster, which is displayed to the user.

The new cluster has removed the decimal point, changing 1.5 to 2.  Probing the wire into the cluster shows the 1.5 is there, but the cluster is removing it.  

I can break out each value into a indicator, but I think this should work.

This shouldn't be this hard, can someone please tell me what I am doing wrong?




metzler CLAD
0 Kudos
Message 1 of 5
(1,847 Views)

that lil red dot on the indicator means something in the cluster is being coerced to a similar datatype- I suspect that's related to your issue...  also using the bundle by name can make things easier to read although it takes up a lot more room...

 

edit: try deleting that indicator and making a new one by right clicking on the output of the bundle and selecting "create indicator"

 

0 Kudos
Message 2 of 5
(1,845 Views)

Your cluster template wired to the bundle node has noting to do with the datatype of the display.

 

Not only do you have floating point values for items that should only exist as integers, all representation seem to be reversed. Who made that typedef??

 

Here is the cluster constant corresponding to your display shown next to your template (arranged vertically in cluster order). Note that all datatypes are flipped! Do you know the difference between blue and orange?

 

altenbach_0-1609961117476.png

 

 

In addition, you also need to look at the display format of your indicators. Only parity and flow control show 6 digits, the rest 0 digits.

0 Kudos
Message 3 of 5
(1,835 Views)

Altenbach,

You are correct, I am embarrassed to admit that I do not have very good grip on the difference of the LabVIEW numerical values.  I can't seem to find information that helps me out very much - do you know of a resource that would help me?

The cluster was borrowed from another VI, as I don't have very much experience with Clusters.  

Thanks for your advice.




metzler CLAD
0 Kudos
Message 4 of 5
(1,746 Views)

https://zone.ni.com/reference/en-XX/help/371361R-01/lvhowto/numeric_data_types_table/

 

you can google more info about integers and floating point numbers...

 

https://www.youtube.com/watch?v=9zKpOP78DXM

 

just some info to start....

0 Kudos
Message 5 of 5
(1,742 Views)