LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HOW TO VOID A MEASUREMENT

Solved!
Go to solution

Hi,

 

Where i am taking my measurement, occasionally i am reading a bad string from the board that is outputting.

 

Is there a way i can void this measurement without stopping the loop?

 

such as measuring the string length and if under a certain amount goto the end of the loop and take another reading?

 

attached is the vi.

 

 

Thanks 

 

Alex

0 Kudos
Message 1 of 12
(2,669 Views)
Solution
Accepted by topic author Detox92

Just place all the anaysis and output code inside a case structure and execute it only if the data is valid. Leave the other case empty.

Message 2 of 12
(2,653 Views)

Hi,

 

Thanks for the reply,

 

Is there any chance you could show me on my vi or in an example, i am very new to this and im not 100% on what you mean.

 

Sorry and thanks

 

Alex

0 Kudos
Message 3 of 12
(2,649 Views)

Alex,

 

First, Your VI is almost unreadable. You have wires hidden behind structures and youseem to have an aversion to straight wires. (Although the latter may simply be the insane Auto Wire Routing tool.) The diagram is more than twice the size of my 27 inch screen.

 

You seem to have a well-defined string format (which can probably be decoded in one step using Spreadsheet String to Array). The Search/Split String function has an Offset Past Match output. If the match is not found that output will be -1. You could test for -1 at those outputs to detect a missing character.

 

I do not understand what you are trying to accomplish with your conversion of 2D arrays to Dynamic Data Type to a single scalar.  Index Array, Add Array Elements, or Mean.vi seem like they would make more sense.

 

You do not need to add a second indicator to the Gauges to get a digital readout. Just pop up on the indicator and choose Visible Items >> Digital Display.

 

Lynn

Message 4 of 12
(2,636 Views)

Morning Lynn,

 

Thanks for your input, as i had said in my last post, I only started using labview about a week ago so i have no doubt that my vi is very long winded, but hey its a learning curve!

 

I will try and see if i can use some of your advice and believe me i hope i can simplify the whole process.

 

 

 

Thanks 

 

Alex

0 Kudos
Message 5 of 12
(2,613 Views)

Hi,

 

I am still struggling with this issues.

 

Is it possible to "goto" end of loop with out actually ending the loop itself?

 

I know that my string should be 156 characters long so I can use the string length function to get this value and if it is less than 156 I have a True value but how can I use this to void the measurement without stopping the whole process.

 

Again sorry if this is a simple one but I am very new to this.

 

 

Thanks

0 Kudos
Message 6 of 12
(2,564 Views)

Detox92 wrote:

Is it possible to "goto" end of loop with out actually ending the loop itself?


That makes no sense.

 

But I think what you need is a Case Structure around your code after you verify the string length.


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
0 Kudos
Message 7 of 12
(2,550 Views)

>>That makes no sense.

 

I think that is a harsh reply for a newbie.  His statement actually makes sense to me.  And most "text programmers" would understand.  He is just having trouble thinking dataflow.  Anyway, the key is to use a case structure such that you skip executing a portion of code (.e.g. jump to end of loop) under certain conditions.

http://www.medicollector.com
0 Kudos
Message 8 of 12
(2,542 Views)

@josborne wrote:

>>That makes no sense.

 

I think that is a harsh reply for a newbie.  His statement actually makes sense to me.  And most "text programmers" would understand.  He is just having trouble thinking dataflow.  Anyway, the key is to use a case structure such that you skip executing a portion of code (.e.g. jump to end of loop) under certain conditions.


I know it is a data flow issue.  And I completely understand the goto.  But how do you go to the end of a loop without ending it?  If you are at the end of a loop, you just ended it.  That is what I am saying makes no sense.  Skipping code in an iteration is a different story.  That makes complete sense, done simply with a case structure.  Or if I go back to my Basic/Pascal/ANSI C days, an if..end statement.


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
0 Kudos
Message 9 of 12
(2,533 Views)

Hi everyone,

 

and thanks for your replies.

 

To be honest, for me as a newbie it did make sense, but at the same time i understand what you are saying now you have said it. 

 

I think that yes what i am looking to do is..... skip executing a portion of code sa this will bypass the breakdown and extraction of the data i want left out.

 

How would i go about this?

 

Thanks again for your help

 

Alex

 

 

0 Kudos
Message 10 of 12
(2,526 Views)