LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Dippi

Shared Variable - Round to...

Status: New

When using the Sahred variable (SV) with "Bind to source", the SV uses the datatype of its source.

If you are using the datatype "double" you can see all fractional digits.

That doesn't make sense all the time - e.g. if you want to display temperature values.

 

Our idea is to give the user the opportunity of controlling the number of digit of precision.

 

Digits of precision.jpg

 

Thanks

6 Comments
Brian_Powell
Active Participant

I'm not quite sure I know what you're proposing.  Are you suggesting it's an option for when variables are written to, or read from?

 

At first glance, the temperature logger example you gave is a problem with display, not with the shared variable itself.  So perhaps the graph should let you limit the precision shown in that panel.

 

This also might be a case where you shouldn't use "bind to source", but should instead round the value read from a temperature sensor before writing it to a shared variable.

 

Stepping back into a philosophical discussion, it might be interesting to introduce a data type that knows what precision its data is.  For example, if we are connected to a temperature sensor that is accurate to 0.1 deg C, then that attribute could propagate along with the data, so that displays knew not to display thousandths of a degree of precision (and maybe drew error bars on a graph).  (And it would be way cool if you switched to a more accurate sensor, and more accurate data was displayed without having to change your program.)

 

Dippi
NI Employee (retired)

Hi Brian,

 

it's an idea of a customer, who already uses the functionality of LabVIEW DSC and the "value resolution" of logging.

He told me, that his value will be only logged to citdel if the change of the value is at least the value resolution.

BUT the value itself won't be changed,

e.g. Value change from 33.4567 to 33.9567

Better:

33.5 to 34

 

I'm suggesting this option when you read the variables...

 

Thanks

viScience
Active Participant

Yes, that is true, the display in the DSM will get truncated instead of rounded to the setting in the value resolution parameter.  I maintain a database of all the I/O points in my system including such parameters as scaling factors, resolution, deadbanding, etc.  I can then use this information to condition my HMI displays and reports that are generated by querying the citadel historical record.

Brian_Powell
Active Participant

So is this a feature request for the Distributed System Manager?  (To be able to round or truncate?)

 

Or is the idea to have more attributes on the data (such as precision, etc.), and (optionally?) honor them wherever the data is read?

 

Dippi
NI Employee (retired)

the idea is to have more attributes on the data (such as precision, etc.), and (optionally?) honor them wherever the data is read?

Dippi
NI Employee (retired)

Hi Brian,

 

I again talked to our customer.

The best thing is to reduce the number of precision in citadel already if the measurement type is "temperature"