LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

To use sting to be selector of case structure for creating system boot up sequence.

Solved!
Go to solution

Hi 

 

I am trying to use the structure as the figure to design the system boot up sequence but it is not feasible, seems the string "initial reset wait LED turn on" can not be separated to small strings

"initial"

"reset"

"wait"

"LED turn on"

 

Does anyone know how to fix it?

 

Patrick0830_1-1591603962797.png

Patrick

 

 

0 Kudos
Message 1 of 8
(2,950 Views)

Hi Patrick,

 

You only have a single string being used as the selector so it will always be the same.  You could use something like an enum with separate items defined as "initial", "reset", etc.

enum example.png

 

PsyenceFact

0 Kudos
Message 2 of 8
(2,936 Views)

You might want to have a look at the Natt Sequence.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 8
(2,915 Views)
Solution
Accepted by topic author Patrick0830

'Spreadsheet string to array', with newline as separator will convert if to an Array that you can loop over.

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 8
(2,910 Views)

Hi PsyenceFact

 

Thank you for your reply, I'd like to have system to complete the sequence automatically, so I will try to find the other approach.

 

Patrick

0 Kudos
Message 5 of 8
(2,862 Views)

Hi Yamaeda

 

Thanks for your comment, I created the VI as below, seems workable

 

Patrick0830_0-1591714068459.png

Patrick

 

Message 6 of 8
(2,859 Views)

Where does this "string" come from? If this is just a diagram constant, you could replace it with an array of strings or an array of enums, then loop over it. If this is read from a file, read it as 1D array of strings using "read delimited spreadsheet"

 

(What is the purpose of the sequence structure? Makes no sense to have it. I would recommend to go back to the tutorials)

0 Kudos
Message 7 of 8
(2,856 Views)

@Patrick0830 wrote:

Hi Yamaeda

 

Thanks for your comment, I created the VI as below, seems workable

 

Patrick0830_0-1591714068459.png

Patrick

 


You don't need to wire N and instead replace "index array" with autoindexing. Notice the red coercion dot? It indicates a type mismatch.

 

altenbach_0-1591714606933.png

 

Message 8 of 8
(2,854 Views)