LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wrap in to string Indicator

Solved!
Go to solution

Alwin_Capsys_0-1666765000653.png

Is there any property to update string like this when an array of different value comes? I need to keep on updating the string continuously.

0 Kudos
Message 1 of 22
(3,129 Views)

You are not providing enough information. What is the relation between the array and the string?

What I see in you picture is a String control (not an indicator, I guess). If you want to update the string programatically and not interactively, an indicator should be more suitable. To update a control, you can use a Local Variable or a Value property node (the property node can be used in another vi passing a reference of the indicator to that vi). To update an indicator, you can simply use its Terminal on the Block Diagram, too.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 22
(3,108 Views)

Generate a user event when you send a new string. Failing that, remember the old array and compare it so you notice when a new one appears.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 22
(3,091 Views)

Sorry for the insufficient information. I hope the below image can explain you more about this. Updating to string is not a matter, but wrapping the string like below mentioned picture is my required thing. 

Alwin_Capsys_1-1666772863897.png

The above mentioned picture is just for an example. But my string should look this.

0 Kudos
Message 4 of 22
(3,078 Views)

And use a local variable instead of property node to update the value for best performance. If there are many updates per second, consider updating the indicator only as often as the UI needs to update.

(edit: did not see previous post before posting this)

Certified LabVIEW Architect
0 Kudos
Message 5 of 22
(3,072 Views)

Hi, please understand that, updating to string is not a matter. But, how the string looks, that's only my concern.

0 Kudos
Message 6 of 22
(3,069 Views)

Hi Alwin,

 


@Alwin_Capsys wrote:

The above mentioned picture is just for an example. But my string should look this.


Use SearchAndReplaceString on the result of ArrayToSpreadsheetString and replace all linefeeds by spaces!

 

ArrayToSpreadsheetString will always place linefeeds between rows of a 2D array…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 22
(3,059 Views)

I hope you meant this. If it is, it doesn't meet my requirement.

 

Alwin_Capsys_0-1666775024490.png

 

 

0 Kudos
Message 8 of 22
(3,049 Views)
Solution
Accepted by topic author Alwin_Capsys

Replace linefeeds AND carriage returns

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 9 of 22
(3,037 Views)
Solution
Accepted by topic author Alwin_Capsys

We can only guess your requirements when you do not provide the VI. From the picture, I guess you want four spaces instead of EOL, so do:

thols_1-1666775791581.png

 

Certified LabVIEW Architect
Message 10 of 22
(3,035 Views)