09-13-2010 01:55 PM
Is there an equivalent to the line macro in labview? Perhaps in grid based coordinate form? Essentially, I would like to be able to use it for an error log?
09-13-2010 02:26 PM
What does "line macro" mean?
09-13-2010 02:32 PM
@Ravens Fan wrote:
What does "line macro" mean?
Same question here.
If it is like "Printf" then you can use a one button dialog. The Call chain will tell you who is being called from where.
Ben
09-13-2010 02:35 PM
In CVI _LINE_ returns the current line number of the code. What I'm looking for is something that will report the file and grid location of the labview block diagram.
09-13-2010 02:37 PM - edited 09-13-2010 02:39 PM
No grid location but the "Call Chain" will return an array of the callers of the VI whose block diagram the Call Chain in in when it executes.
Ben
PS The request for the "grid Location" has me thinking you are looking at a large block diagram. If you absolutely have to know WHERE then a break point is about as close as you will get.
09-13-2010 02:51 PM
The diagram is large, but I didn't write it, so following proper guidelines is not an option in this case. This is required for run-time execution inside of the final executable so a breakpoint won't cut it.
09-13-2010 02:55 PM
@Steve Block wrote:
The diagram is large, but I didn't write it, so following proper guidelines is not an option in this case. This is required for run-time execution inside of the final executable so a breakpoint won't cut it.
"required" is a very strong word in the software world.
Do you mean to say that if you can not report the grid location "game over man"? (may it not be so!).
I have an event logger that reports events to a backround process and includes the call chain but it does not report the grid location. In fact, in an exe there is no diagram so the grid location means nothing in an exe.
If you tell us more maybe somebody can help.
Ben
09-13-2010 03:03 PM
Technically speaking...
You could establish a grid pattern for the diagram and then use digram constants (by hand) to gen messages. They would have to be updated when the screen grew and many other issues, but if there is a spec that says grid, then at least that would work.
Hardly automatic.
Ben
09-13-2010 03:38 PM
@Steve Block wrote:
Is there an equivalent to the line macro in labview? Perhaps in grid based coordinate form? Essentially, I would like to be able to use it for an error log?
In what way? I still don't understand what you're trying to accomplish. Are you trying to identify the source that generated data that indicates an error condition? That implies that somewhere you have an error handler that accepts an error wire. You would need to trace back this wire to the source. Otherwise the only thing you can really point to is the error handler, which can be anywhere on the block diagram, potentially nowhere near the source of the data. There is no automatic way to trace the wire back to the source. I suspect scripting may be used here, but I wonder if the effort is really all that worth it. In my error handling I provide information as to the source of the error in terms of the call chain as well as the "command chain", which is the sequence of steps that was being performed. Also, an extensive logging mechanism provides me a LOT of information with which to track down problems.
09-13-2010 03:44 PM
You can try dropping bits of code into your code which write to the Windows debug output. Tag the outputs with whatever makes sense. This technique is described here. You can modify the log VI to only log when a debug flag is present with compile flags for the executable.