LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tracking VI progress using LEDs

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

0 Kudos
Message 1 of 12
(4,108 Views)

Are you familiar with probes?

--
Tim Elsey
Certified LabVIEW Architect
Message 2 of 12
(4,106 Views)

Probes? No, I'm afraid not.

 

Are they in LabView 7.1?

0 Kudos
Message 3 of 12
(4,096 Views)

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.

Message 4 of 12
(4,094 Views)

 


@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. 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 5 of 12
(4,084 Views)

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?

0 Kudos
Message 6 of 12
(4,083 Views)
Message 7 of 12
(4,078 Views)

 


@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.

 

0 Kudos
Message 8 of 12
(4,074 Views)

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.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 9 of 12
(4,062 Views)

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!

0 Kudos
Message 10 of 12
(4,051 Views)