LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PLAYING LABVIEW PROGRAM IN SLOW MOTION

A friend has given me his labview program regarding CONTROL of a stepper motor. I have difficulty in understanding his workable program. Is it possible to RUN the drawing of program in slow motion so that I can understand the steps in the construction of the program. I have seen such slow motion PLAY program in labview tutorials.
0 Kudos
Message 1 of 8
(3,767 Views)
Yes. When you open the block diagram, the menu bar has a light bulb button called Highlight execution. Press it and the VI will run in slow motion. There are two things to keep in mind: one, if the program is large it may be hard to follow the code, especially if you have data moving between different loop. Also, if you have timing issues in speaking with the motor, keep in mind that the program will run slower. Two, if you have loops in your VI, the VI will go through each and every one, which may take some time. If you want to speed things up, use breakpoints at various places in the code and when the execution pauses, turn highlight execution on. In general, the only good way to go would be to have properly designed and built programs and proper documentation on the code.

___________________
Try to take over the world!
Message 2 of 8
(3,764 Views)
You suggested:

If you want to speed things up, use breakpoints at various places in the code and when the execution pauses, turn highlight execution on.

How to ADD breakpoints?

If I use the PLAY mode in the tutorial I can change the pointer to ANYWHERE which I want to clarify. Can the construction of the labview pogram be shown PIECE by PIECE?
0 Kudos
Message 3 of 8
(3,719 Views)
I'm sorry. There are a few things I don't understand.
First, are you talking about LabVIEW online tutorials. If you are, then I can't help you because I never tried them so I don't know how they look.
Second, what do you mean by showing the program piece by piece? You can go over the entire program in LabVIEW and if you have subVIs (the equivalents of functions in other languages), you can go into them by double clicking their icon.
Third, did you press the highlight execution button? If so, what is your current problem?

The breakpoint tool is the bottom left one in the tools palette (the one that looks like a stop sign). You can use it to place breakpoints in the code (click it on a wire), and the program will stop when it gets to that point. You can resume the program by pressing the pause button in the toolbar. You can also use conditional probes to break programs only when certain conditions occur.

___________________
Try to take over the world!
0 Kudos
Message 4 of 8
(3,712 Views)
I have used the highlight button. The problem is I want to check something almost to the END of the program. It takes a very long time to go there. How do I speed things up so that I reach the END part faster. In labview tutorials we can play any part of the program.
0 Kudos
Message 5 of 8
(3,692 Views)
Please don't confuse some tutorial with some kind of animation with a real VI that is executing. It's sort of like comparing watching a football game recorded onto a DVD versus watching it live in a stadium.
0 Kudos
Message 6 of 8
(3,687 Views)
The breakpoint, described above, is still the answer, assuming that you're really examining a VI and not some LabVIEW tutorial:

1. Put a breakpoint right before the portion of the code near the end of the execution that you are really interested in
2. Run the VI normally; it will quickly hit that breakpoint and go into a paused mode and open up your block diagram showing the breakpoint
3. Click the "light bulb" to enable execution highlighting (slow motion)
4. Now click the pause button (to the left of the light bulb), and the VI will proceed from your breakpoint in slow motion

Remind yourself up front that you must remember to remove any breakpoints when you are done examining things in slow motion, or you are likely to have problems later when your VIs stop on their own.

--John
0 Kudos
Message 7 of 8
(3,683 Views)
Thanks
0 Kudos
Message 8 of 8
(3,649 Views)