@ashish-mnnit wrote:
i have attached the vi with the message and i want to use the output of LED inside the while loop....simply as a clock for the flip flop ics...
If you want any useful answer, you need to ask a meaningful question. Your example VI does not even give a hint of what you want to do.
- There are two LEDs, one inside the loop and one outside the loop. You only mention one LED in your question.
- Let's assume you want ".not. x? 2" (you know that you can give controls and indicators reasonable and intuitive names, right, so why leave them weird?).
- Dataflow dictates that the code on the right executes exactly once at the start of the program and then never again while the loop keeps running. This means that the local gets read only once. In order to update that LED, it needs to be in a loop.
- You are not telling the full story, maybe you simplified your code too much. Is the value of the LED used is some more involved code, e.g. inside another loop? As it stands with the current code, simply place both LEDs inside the loop and branch the wire to both.
- Another dataflow problem is your use of the switch called "boolean". It will only get read once at the start of the program and later has no useful purpose. Typically, shift registers are initialized with diagram constants instead. Don't tempt the operator with useless buttons!
Anyway, back to the drawing board! Please make a more useful example, telling use what the purpose of the outside LED is in the grand scheme of things. Does it get read by some other code? Does it drive some DAQ? Why can't you do all in one loop?