02-22-2010 02:20 PM
Yup, it's that time of the development cycle. Here's my question. In C++ if you see a problem, you just say foobar.cpp line 410, you're using a redundant for-loop. In a text-based language, it's rather simple to pinpoint exactly where the problem resides by just saying the line number. However, I can't really do the same in LabVIEW (at least I don't know of a way.) I know that when I move the scroll-bars with my mouse (bottom and right), I will get the little bar at the top saying origin (-401, 234), is there a way for me to get the same level of precision from my cursor? It's much easier to to say: In foobar.vi 20, 319, you're using the wrong sub-vi.
I'm using LabVIEW 8.6.
Solved! Go to Solution.
02-22-2010 02:45 PM
Are you talking about putting some debugging information in your error messages?
I don't understand what the cursor position as to do with your error message. You can't identify subVI's or functions by a particular position on the block diagram. The block diagram is a visual representation of the code only meaningful to the programmer. It has no meaning whatsoever to the compiler. The compiler converts the block diagram layout to something it understands. You could comnpletely rearrange your block diagram and wind up with the same compiled code.
If you need to put additional information in your error messages in pop up error dialogs, then you can modify the source text box inside the error cluster to add some additional information.
02-22-2010 03:01 PM
02-22-2010 03:46 PM
I understand now. I was thinking error messages is because the only time I see .cpp error line ### is right before LabVIEW development environment crashes on me for some reason.
What you could do, is turn on labels for important sections of your code. So turn on a label for a SubVI and edit the label to something unique. If you have a Build Array, that is what it will say when you make its label visible. You could edit that to say Build Array100, to distinquish it from Build Array 101 somewhere else nearby. It would show up on screen and on printouts. And it would maintain that name no matter how the block diagram would get rearranged. Of course it would take some diligence on the part of the programmer to assign and modify these labels. But it might be possible to do some scripting to browse through the block diagram items and assign some unique modifiers to the various nodes and ensure the labels are visible.
02-22-2010 04:00 PM
Screen shots work well, especially with annotations added. Large block diagrams could cause issues with this - yet another reason to keep them small.
There is a fair amount of free software better than Paint to graph screenshots and annotate things. I use GIMP, but it is a bit complex for the casual user. A search for open source bitmap editors should give you lots of options.
02-22-2010 04:16 PM
DFGray wrote:
There is a fair amount of free software better than Paint to graph screenshots and annotate things. I use GIMP, but it is a bit complex for the casual user. A search for open source bitmap editors should give you lots of options.
The Code Capture Tool comes to mind.
02-22-2010 04:23 PM
DFGray wrote:Screen shots work well, especially with annotations added. Large block diagrams could cause issues with this - yet another reason to keep them small.
There is a fair amount of free software better than Paint to graph screenshots and annotate things. I use GIMP, but it is a bit complex for the casual user. A search for open source bitmap editors should give you lots of options.
Paint.NET (Windows only) is a good alternative to GIMP for this.
As for the 'yet another reason to keep them small' comment - OOOORRRR you buy a larger screen (or have your boss buy you a larger screen) :P! In all seriousness that is one lesson I had to learn the hard way. Now, I keep my code all within 1 screen and if it extends beyond that I rethink what I'm trying to accomplish.
02-22-2010 04:34 PM
one possibility: the reviewer could put comments right on the BD. Perhaps use a free label with a special background color. Use a unique tag in the label. Then you can find all of these comments by searching for the tag text on block diagrams.
more complicated but faster to find: create a broken subVI and drop it on the BD where you want to call attention. Then you can find these "comments" using the List Errors window.
02-22-2010 04:37 PM - edited 02-22-2010 04:38 PM
I use free labels when going through a review with a unique tag to distinguish these labels from other text in my LV code.
For example, if you create a label during your peer review (double-click on empty space in the BD) and start each of these free labels with "Initials-EDIT: ....." you can then go back later with Edit > Find & Replace (text search) and search for all of your edit notes by searching for 'Initials-EDIT'.
02-23-2010 04:59 AM
Thats exactly what i do... I just add a label "Guru(reviewer Name):and the comments" wherever the attention is required so that the developer can search for "Guru(reviewer Name):" in the entire hierarchy and make required corrections.
Guru