LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I place text vertically in a string indicator? See description below (code attached).

Solved!
Go to solution

This is what I'm getting when I'm running the code:

GRCK5000_0-1690207706883.png

 

This below is what I would like to get instead.

GRCK5000_1-1690207796928.png

How to achieve this?

 

 

 

 

0 Kudos
Message 1 of 12
(1,552 Views)
Solution
Accepted by topic author GRCK5000

Just simply add an EOL constant to it.

ZYOng_1-1690208382134.png

 

ZYOng_0-1690208352624.png

 

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
Message 2 of 12
(1,546 Views)

Great! Thank you, ZYOng!

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Acts 20: 35 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 Kudos
Message 3 of 12
(1,536 Views)

I'm working on an XControl that's a string indicator with changeable vertical orientation.  I'll post it when it's ready.

0 Kudos
Message 4 of 12
(1,449 Views)
Solution
Accepted by topic author GRCK5000

Hi GRCK,

 

so you want to interleave the chars in your string with the same number of LF chars?

 

Try this:

The main part is the Interleave1DArray function, the stuff around that is just to create the strings you want…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 12
(1,445 Views)

Thank you GerdW! This is awesome! It's always a good thing to learn different ways of doing thing.

0 Kudos
Message 6 of 12
(1,423 Views)

Depending on what you're doing, you might want to throw in a "Trim Whitespace.vi" at the end. Both solutions so far have an extra newline after the last character.

0 Kudos
Message 7 of 12
(1,417 Views)

@BertMcMahan wrote:

Depending on what you're doing, you might want to throw in a "Trim Whitespace.vi" at the end. Both solutions so far have an extra newline after the last character.


Or just put a Decrement function after the String Length.

0 Kudos
Message 8 of 12
(1,407 Views)

Hi Paul,

 


@paul_a_cardinale wrote:Or just put a Decrement function after the String Length.

Interleave1DArray might give "unexpected" results for input arrays of different length…

 

(Btw. my snippet only works with plain ASCII. Handling Unicode strings the same way might also introduce "unexpected" results…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 9 of 12
(1,390 Views)

@GerdW wrote:

Hi Paul,

 


@paul_a_cardinale wrote:Or just put a Decrement function after the String Length.

Interleave1DArray might give "unexpected" results for input arrays of different length…

 

(Btw. my snippet only works with plain ASCII. Handling Unicode strings the same way might also introduce "unexpected" results…)


You're right; it won't work correctly (because the input arrays are truncated to the length of the shortest one.

0 Kudos
Message 10 of 12
(1,369 Views)