04-05-2011 09:40 PM
Yo!
At the first execution of my program, graphs and results are perfectly shown but during the second execution, somehow the value that is within the while loop of my subvi just could not get out of the while loop and it continues running in the while loop which results my graphs not to be plotted when there is a new set of data coming in. Can someone help me to source for the solution?! I need it as soon as possible..
Regards,
Kok Wan
04-05-2011 11:03 PM
Hi,
According to your logic, while loop will continue till you get empty string. So you need to check array value second time when you run your vi.
Also you can use for loop instead of while loop.
04-05-2011 11:36 PM
04-06-2011 12:23 AM
Hey,
How do i check my second array value to see if its correct? I have no idea what is input string does not contain data in expected format. Can you give me an example of it? THANKS for the reply.
Regards,
Kok Wan
04-06-2011 02:34 AM - edited 04-06-2011 02:34 AM
Hi Kok,
you really should stay in your original thread, no need to upload that big archive twice...
Then your subVI should be replaced by this:
No need to use IndexArray (and the very similar function IndexStringArray). FOR loop has the advantage of automatically stopping at "end of array"...
Your error description seems to come from a ScanFromString function. Are you sure it's generated in this very subVI? Are you really sure about this?
04-06-2011 02:46 AM - edited 04-06-2011 02:50 AM
Hi GerdW,
I'm trying to duplicate what you have created, however, I can't seem to add a continue if true function into the for loop. How did you manage to do that?
Also, what is the red dot at the N (Count terminal)? How do you add it?
Really appreciate the help you are giving me, and sorry for being noobish at LabVIEW.
Cheers,
Kok Wan.
04-06-2011 02:48 AM
04-06-2011 03:07 AM
Hey GerdW,
Have you seen my reply? I accidentally posted it earlier on.
Cheers,
Kok Wan.
04-06-2011 03:55 AM
Hi Kok,
yes, I had seen that "Hi"
Have you read the context help for the FOR loop? Then you would have noticed this...
04-06-2011 03:58 AM
Hi,
I had figured it out but i still get the same error which is error 85 " Scan failed. The input string does not contain data in the expected format". I really do not know what is this error about. OMG!
Regards,
Kok Wan