cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

Design Pattern Case-Structure

Hey Guys,

 

im thinking of the design pattern of my Projekt.

I will have an case structure and using 3 different Com-Ports. But 1 com-port is set for all cases and mostly one of the left is used per case.

Now i learned previously that it is mostly recommended to initialize the Ports in the very beginning before the structure starts.

So the question is know should i initialize them inside the cases, because in this way they are only initialized when they are used and the one for all cases outside?

Should i initialize them all outside of the structure and just pass them through the structure without using them?

Or at least you may recommend another strategy?

Thanks for help and stay healthy

gotti

0 kudos
Mensaje 1 de 5
1.788 Vistas

It is impossible to give advice without more information and seeing your code draft.

 

  • What do the com ports do? What on the other end of the communication?
  • How can you set a port for all cases? Is that outside the case structure?
  • What does "mostly" mean in this context?
  • If something is on the left, what's on the right?
  • Yes, initialize them outside the toplevel loop.
0 kudos
Mensaje 2 de 5
1.774 Vistas

So here is the program attached

0 kudos
Mensaje 3 de 5
1.717 Vistas

This entire program seems "inside-out". Why is there no top-level while loop? How is the user supposed to run this? (e.g. once the program starts, operating the tab control has no effect!)

 

What is the purpose of the tab control? Why is it even connected to a case structure?

What you need is a proper state machine with a loop controlling the UI and possibly multiple loops, each handing one task as needed.

0 kudos
Mensaje 4 de 5
1.676 Vistas

Help -> Find examples -> State machine fundamentals

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

Qestit Systems
Certified-LabVIEW-Developer
0 kudos
Mensaje 5 de 5
1.670 Vistas