LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

wiring inputs n outputs for case structure

Hi everyone...

I have a simple basic question...How to wired the correct tunnel for output in case structure.Because when I try to wire the build array to the case structure, It shown as white terminal....How how to make solid color terminal for output tunnel...Actually I forgot how to wire it correctly..so...I hope u guys can remind me again...thank u very much...
0 Kudos
Message 1 of 12
(2,982 Views)
You have to wire the output for the other cases.  In your case, the "Error" case doesn't have the output wired.  You can right-click on the output and select "use default if not wired" so you don't have to wire every case, but in your situation, that would result in an empty array if an error occurs.  So, you would want to wire the input array to the output of the case statement.
0 Kudos
Message 2 of 12
(2,980 Views)
Hi Matthew...

I try to follow ur instruction with rewire the input array to the case output..But It seems like nothing changes happen.It still with the white terminal.Can u explain it briefly about this.Sorry if I don't understand u .coz I'm slow...
0 Kudos
Message 3 of 12
(2,975 Views)

Sometimes a picture can show it better.

 

Can you explain how that input string to this while loop looks like? It seems to me that whever you are doing, you are doing it way too complicated. 🙂

(You defniitely don't want to configure the tunnel to use default if unwired, because you loop can only stop if there is an error, an error would always clear the array and you'd never get a useable output).

Message Edited by altenbach on 09-22-2007 09:43 AM

Message 4 of 12
(2,974 Views)
Hi Altenbach...

Thank u very much for ur help.I'm always make a careless mistake.thanks to u guys.Now,I'm be able to display my data into table something like attachment below.Actually I'm using IIOA to parse the value into string...something like that...

V = 238.25 I = 23.82 P = 5676.12
V = 237.79 I = 23.78 P = 5654.28
V = 237.35 I = 23.74 P = 5633.54
V = 236.94 I = 23.69 P = 5614.09
V = 236.56 I = 23.66 P = 5596.12
V = 236.22 I = 23.62 P = 5579.80
V = 235.91 I = 23.59 P = 5565.29
V = 235.64 I = 23.56 P = 5552.72
V = 235.42 I = 23.54 P = 5542.22
V = 235.24 I = 23.52 P = 5533.88
V = 235.11 I = 23.51 P = 5527.78
V = 235.03 I = 23.50 P = 5523.98
V = 235.00 I = 23.50 P = 5522.52
V = 235.02 I = 23.50 P = 5523.40
V = 235.09 I = 23.51 P = 5526.62
V = 235.21 I = 23.52 P = 5532.16
V = 235.37 I = 23.54 P = 5539.95
V = 235.58 I = 23.56 P = 5549.92
V = 235.84 I = 23.58 P = 5561.99

Then I try to convert this string into numeric or dbl coz I want to merge it with signal.So, it looks like complicated like u imagine.

Now,I have one other question.refer to my vi, I have used elapsed time so that it will run from the start time until target time.But its only can be determined in seconds.So, how can I modify it with using elapsed time for day.I mean this prog will start on Monday for example n stop at wednesday.It means it will run for 3 days...thank u very much...Smiley Happy
Download All
0 Kudos
Message 5 of 12
(2,943 Views)
Well, my question was more specific. 🙂
 
Please do the following:
  1. Create a string indicator in the string leaving the right shift register of the upper small while loop.
  2. Run the VI once so the string indicator contains data.
  3. Now right-click the terminal of the new indicator and do a "change to constant".
  4. Copy and paste the diagram string constant into a new VI
  5. Save the new VI under a new name and attach it here.

You have a simple string to extract three arrays, but it takes you a screenful of code to turn it into a table. What does your missing subVI (stringToByteArray.vi) actually do? It is a bad idea to name your VIs so they can be confused with existing system VIs ("String to Byte Array" in this case). So, you convert parts of your string to a byte array (in one form or another), then immediately back to a string using "string to byte array". You are doing this all way too complicated!

About your timing problem. You can convert any time in days, hours, etc to a number in seconds using simple math. Where do you perceive a problem?

What determines the loop rate of your VI and what is a typical loop rate? What is IIOA?

Message 6 of 12
(2,926 Views)
Just do the math.  There's 86,400 secs in a day, so 3 days (72 hours) would be 259,200 secs.
0 Kudos
Message 7 of 12
(2,925 Views)
Hi Altenbach...

Maybe you're right...It seems like I create a simple string n convert it with some complicated way.Actually, IIOA means Instrument I/O assistant..So, maybe they can be confused with existing system VIs ("String to Byte Array" in this case).I'm using this subVI to collect the data from hardware.coz I do not know how to program it manually.Refer to the image IIOA below..I want to take all ASCII representation parameters into string.So when I click auto parse.It will read all data such as...V = 240.21 I = 24.02 P = 5769.98  in one string.So its hard to me to seperate this V, I n P into 3 section.So what can I do is to parse the data into tokens manually. Use the response window to manually create data tokens to use in an application.Then I use the Binary representation column to parse binary numbers and strings or binary number arrays.So I pick string from this binary column to make each data can be seperately into 3 section.Then, I convert this IIOA vi into front panel n it will automatically show the block diagram..n i'm just modify it a little bit....So this is what I mean...I hope u understand...

Actually,I try following ur instruction that I create a string indicator after right shift register of the upper small while loop.When I run the vi, this string can't show data from input.Then, when I change this indicator into constant...broken wire will appear.It is what I'm mean..Or I'm wrong again....Thank U very much....Smiley Happy
0 Kudos
Message 8 of 12
(2,902 Views)
Hi...Matthew....

Thank U very much...U give me the idea.It seems like I can do that.But...its there any other ways to do it.Because I want to show the Indicator or control with the date and time.I mean it will show the date from the start time n show the last date period in the last time it operated.Thank u very much..Smiley Happy
0 Kudos
Message 9 of 12
(2,900 Views)


@TaKiMi wrote:
Hi Altenbach...
It will read all data such as...V = 240.21 I = 24.02 P = 5769.98  in one string.So its hard to me to seperate this V, I n P into 3 section.

Not that complicated! Here's one quick way how you could parse the string (code A). If you want to built the table by appending consecutive iterations, you can do so in a shift register (code B). I attached code B as a VI, modify as needed.



 


@TaKiMi wrote:
Then, when I change this indicator into constant...broken wire will appear.
That's normal since a diagram constant is a data source (like a control) and you can have only one source per wire. Once you delete all the rest, the error will clear up.

Message Edited by altenbach on 09-23-2007 10:07 AM

Download All
Message 10 of 12
(2,891 Views)