04-21-2023 10:10 AM
I built an array and I would like the number being fed into the array to be in hour/ minute/ second (HH: MM: SS)?
I've tried it, but it did not work. Can anyone please help?
My code:
The results on the front panel that I don't like:
Can someone please help?
Solved! Go to Solution.
04-21-2023 10:33 AM - edited 04-21-2023 10:34 AM
Hi GRCK,
you should have learned by now: when you need a specific display format in a FP element then you need to configure that specific display format in that FP element!
You also should have learned by now: even though you apply a specific format to BD constants it's still the DBL datatype with the same DBL values inside the shift register. Th eindicator on your FP doesn't care about properties of BD constants, it only receives the value…
Did you set the display format of the numeric element inside the array as needed?
04-21-2023 10:57 AM
Thanks GerdW! Yes, I should've known this by now. smh 😑. But It works now; I updated the array on the front panel to the same format.
But here is another question that arose. Let's say I have two 2D arrays and I just want to have the first column being in the format of HH:MM:SS, but the rest of the columns to be normal.
How do you do that?
Here is my code:
Front panel:
04-21-2023 11:02 AM
Hi GRCK,
@GRCK5000 wrote:
But here is another question that arose. Let's say I have two 2D arrays and I just want to have the first column being in the format of HH:MM:SS, but the rest of the columns to be normal.
You should have learned by now: in an array ALL elements share the same properties!
So you cannot have different properties for numeric elements in the first row of the array compared to the other rows…
Suggestion: use a string array, here you can format the strings as needed!
04-24-2023 05:53 PM
@GerdW wrote:
Hi GRCK,
@GRCK5000 wrote:
But here is another question that arose. Let's say I have two 2D arrays and I just want to have the first column being in the format of HH:MM:SS, but the rest of the columns to be normal.
You should have learned by now: in an array ALL elements share the same properties!
So you cannot have different properties for numeric elements in the first row of the array compared to the other rows…
Suggestion: use a string array, here you can format the strings as needed!
You can also use an array of clusters. That can give you some more flexibility in your visual formatting.