From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-01-2010 09:01 AM
Hey,
Just wondered if there was a way to track where the program is using Boolean LEDs etc.
Basically, I'm debugging some code I've written and I need to know what part of the code the program is looking at.
I have error wires all the way through my code, so I was thinking of unbundling the error wire, extracting the T/F and going from there.
I need the LED to switch on when the VI passes through that section of code and then switch off again.
This way I can watch the LEDs on the front panel as the program deals with different parts of code. This would make debugging much easier!
Cheers
Tom
09-01-2010 09:03 AM
Are you familiar with probes?
09-01-2010 09:10 AM
Probes? No, I'm afraid not.
Are they in LabView 7.1?
09-01-2010 09:11 AM
You can also use the Highlight Execution feature that is available on the block diagram.
Simply click on the lightbulb icon and run the VI. It will be running extremely slow, but you will see exactly what is getting executed, while it is being executed.
09-01-2010 09:16 AM
@Moorpheus wrote:
Probes? No, I'm afraid not.
Are they in LabView 7.1?
Probes have been around for a long time. You just right-click on any block diagram wire and select probe. A pop-up window will appear with the wire's current data (which updates when the value changes). There will be a little number on the wire that indicates which probe it's associated withsince you can make many probes. You can also make custom probes. That part is newer to LabVIEW.
Also, don't forget you can also set breakpoints in LabVIEW code.
09-01-2010 09:16 AM
Ah I didn't know about the highlight execution button (I'm still fairly new to LabView).
I will investigate if that is suitable, or if it runs too slowly for my needs.
Are there any other possible ways?
09-01-2010 09:18 AM
http://zone.ni.com/reference/en-XX/help/lv/71/lvhelp/Debugging_Techniques/
09-01-2010 09:19 AM
@Moorpheus wrote:
Probes? No, I'm afraid not.
Are they in LabView 7.1?
Ah I didn't know about the highlight execution button (I'm still fairly new to LabView).
I will investigate if that is suitable, or if it runs too slowly for my needs.
Are there any other possible ways?
Indicators. Please take the time to read the LabVIEW manual and do some tutorials.
09-01-2010 09:26 AM
smercurio beat me to it. Indicators are really the best way to monitor your variables. Just add extra ones wherever you need while you're debugging your code. When you're done troubleshooting, simply erase them so they don't take up memory and slow your VI with unnecessary front panel screen updates.
09-01-2010 09:30 AM
Yeah that's what I've been trying.
To be honest, I think it is working - the issue is with the incoming data.
(What I mean is - my program is doing what it's supposed to do but the quality of output is being affected by the terrible inputs)
Cheers for all your help guys!