annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

I have a case structure (with 10 cases) and I want only 2 of them to be included in a loop.

Risolto!
Vai alla soluzione

Hi all,

I am new in this forum and I have a question.

I have a case structure (with 10 cases) and I want only 2 of them to include in a loop.
how can it be done?

thanks.

mosheg.

 

0 Kudos
Messaggio 1 di 7
5.008Visualizzazioni

You're going to have to elaborate. A case structure has a selector input for whichever case should be run. All cases will be ignored other than the specific case that is selected when the code is run.

 

Share what code you've tried so far.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Messaggio 2 di 7
5.003Visualizzazioni

Thanks for the fast respone James.

OK, I'll be more specific.

the first 5 cases are preperations I am doing for a test.

6 and 7 are the actual testing (that is why I need to repeate them with different variables)

8 to 10 - are reporting and returning the system to initial state.

all cases are executed with no exceptions.

I can't loop 6 and than loop 7 (this is something I already did - for other needs) - I need a solution for looping them together. 

Regards,

Moshe

0 Kudos
Messaggio 3 di 7
4.992Visualizzazioni

Please include a Snippet of your code, or attach your VIs, so that we can better assist you. You can control which cases are operated based on your case selector... so I don't see what issue you're having.

 

"Give me six hours to chop down a tree and I will spend the first four sharpening the axe."  - Abraham Lincoln

 

Here are some free training tools primarily focused on LabVIEW and NI hardware to help get started.

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide

Learn NI Training Resource Videos

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Messaggio 4 di 7
4.990Visualizzazioni
Soluzione
Accettato da autore argomento mosheg

Use Proper State Machine, where you can select cases based on your Needs

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Messaggio 5 di 7
4.986Visualizzazioni
Soluzione
Accettato da autore argomento mosheg

I would suggest you look at the State Machine template and use that, it is a while loop with a case structure inside of it. This way, you can use the State Machine messages define the next state (or "case number").

CLD | CTD
0 Kudos
Messaggio 6 di 7
4.982Visualizzazioni

Sounds like what you really need is a State Machine.  But without some real code to show what you are trying to do, we are just guessing here.



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
Messaggio 7 di 7
4.950Visualizzazioni