LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Solved!
Go to solution

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
Message 1 of 7
(4,667 Views)

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
Message 2 of 7
(4,662 Views)

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
Message 3 of 7
(4,651 Views)

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
Message 4 of 7
(4,649 Views)
Solution
Accepted by topic author 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
Message 5 of 7
(4,645 Views)
Solution
Accepted by topic author 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
Message 6 of 7
(4,641 Views)

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.


GCentral
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
Message 7 of 7
(4,609 Views)