07-17-2005 05:13 AM
07-17-2005 06:01 AM - edited 07-17-2005 06:01 AM
Message Edited by Raghunathan on 07-17-2005 06:05 AM
07-17-2005
06:09 AM
- last edited on
07-09-2024
12:41 PM
by
Content Cleaner
The big concept in LV is dataflow - a piece of code will execute when all its inputs are available. When you connected the two loops you caused a data dependency - the data in the wire coming out of loop one will only be available when the loop ends. So what happens is that you run loop 1 and when you stop it, the T value goes over to the second loop, which only starts running now. Since it gets T, it stops after one iteration. You can see this if you turn on Highlight Execution (the light bulb button). There are several ways to go around this - the simplest is a local variable - right click the stop button and select Create>>Local Variable. You can change this to be read and put it in the second loop. You will need to change the mechanical action of the button and make sure you set it back to false. A more advanced method is the event structure.
These are the basics in LV. To learn more, I suggest you read the LabVIEW user manual. Also, try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide.
07-17-2005 10:51 PM
Hi tst,
I downloaded LV style guide and those tutorials. Thanx for the info. It will surely help.
Regards,
Giridhar Rajan
Automation Engineer,
Cruiser Controls
Mumbai, India