07-13-2015 12:25 PM
This maybe a silly question, but is there a way to configure a numeric table to display columns with different amounts of digits? (Such as having the first column consist of outputs with only one digit, while the second column displaying three.)
07-13-2015 12:30 PM - edited 07-13-2015 12:33 PM
You would have to do this with an array of strings. You could set the Number to Fractional String node to however many decimals you want depending on the cell and then output to your array.
Like this:
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-13-2015 12:37 PM - edited 07-13-2015 12:40 PM
I assume you mean an Numerical Array (2D)
The answer is NO.
All elements in an array share a single format. Each element has to be the same.
A "Table" is rendered to in LabVIEW as the "Table Control" which is a string output.
Each cell of a LabVIEW "Table" Control can have different formatting (Font ,Text Color, Background Color)
But they are all strings so you will need to convert your numbers to strings.
Depending you what your data looks like you could use an array of clusters where each row is a cluster with each item in the cluster with it own formatting.
07-13-2015 01:17 PM
Keeping everything as Float and not converting to string,
but convert your 2D array of floats to a 1D array of clusters of floats.
Then you can set different format for each column.
.
07-13-2015 02:00 PM - edited 07-13-2015 02:12 PM
@Labrat212 wrote:
This maybe a silly question, but is there a way to configure a numeric table to display columns with different amounts of digits? (Such as having the first column consist of outputs with only one digit, while the second column displaying three.)
A table is just a 2D array of strings. If the strings represent numerics, you have full control how to format it. I don't see the perceived problem.
07-13-2015 02:31 PM - edited 07-13-2015 02:43 PM
What you can do is having a subVI that strips decimals to your values, so basically you provide a 2D array of U8 containing decimals you wish for each value. Inside it strips from 1.23456 to be 1.23000 for instance, then in your 2D array control/indicator you can have the option to strip trailing zeros...
07-13-2015 02:45 PM
@Jimmy.chretien wrote:
What you can do is having a subVI that strips decimals to your values, so basically you provide a 2D array of U8 containing decimals you wish for each value. Inside it strips from 1.23456 to be 1.23000 for instance, then in your 2D array control/indicator you can have the option to strip trailing zeros...
I like this idea. If OP can use an array instead of a table, this is the way to go.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'