08-05-2020 11:32 PM
Here...I attached one simple program that i am using in my application as flow..While loop code runs inside and executing results...Here I am passing while loop value in case structure...But it is not being executing...Why this is happening...!! How can pass to value in case structures...
Solved! Go to Solution.
08-05-2020 11:45 PM
You need to start with simple tutorials and learn about the principles of dataflow.
You have three independent code segments that all start at the same time. Only the loop will continue to spin while the other two will complete in an instant and will never execute again during that same run.
08-06-2020 12:20 AM
Well..!! I am accepting challenge...I want to put whole code in either in event structure or sequence structure..Is it correct way..??
08-06-2020 12:32 AM
@Tusharvp4 wrote:
Well..!! I am accepting challenge...I want to put whole code in either in event structure or sequence structure..Is it correct way..??
No.
08-06-2020 12:52 AM - edited 08-06-2020 01:51 AM
I tried this logic..
08-06-2020 01:09 AM - edited 08-06-2020 01:10 AM
Please stop posting meaningless garbage code that makes no sense. You NEED to start with tutorials and learn the basic principles of dataflow!.
Again you have three code fragments that all start immediately, the two on top will complete in nanoseconds while the event structure will wait forever because a timeout never happens (unwired timeout is infinite!) Changing any controls at this point does nothing because the terminals have already been read.
What is the program supposed to do?
08-06-2020 01:49 AM
I am reading data from measurement in while loop..Process 1 for storing data in Database..Process 2 is for PDF Report Code..
08-06-2020 02:08 AM - edited 08-06-2020 02:09 AM
Hi Tusharvp,
please do the basics tutorials to learn about THINK DATAFLOW!
Why do you need a FOR loop iterating just once?
Why do you need a sequence structure?
Why do you need local variables?
Your code may look like this:
08-06-2020 02:21 AM - edited 08-06-2020 02:25 AM
@GerdW wrote:Why do you need a sequence structure?
Your code (as written) will not care about booleans operated during the run. Not sure what the OP wants. ALso the stop contion should typically be "stop if true" unless the button has a weird default and mechanical action or the while loop does not even need to be there..
08-06-2020 02:43 AM
Hi Christian,
@altenbach wrote:
Your code (as written) will not care about booleans operated during the run. Not sure what the OP wants.
I agree on this one. Still no sequence needed when the "process" buttons are placed inside the loop…
@altenbach wrote:
ALso the stop contion should typically be "stop if true" unless the button has a weird default and mechanical action or the while loop does not even need to be there..
I just took what Tusharvp created: I always assume there is a conscious intention of the code creator…