LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

line macro equivalent in labview

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? 

0 Kudos
Message 1 of 22
(3,917 Views)

What does "line macro" mean?

0 Kudos
Message 2 of 22
(3,906 Views)

@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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 22
(3,901 Views)

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.

0 Kudos
Message 4 of 22
(3,899 Views)

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.

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 22
(3,893 Views)

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.

0 Kudos
Message 6 of 22
(3,874 Views)

@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

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 22
(3,867 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 22
(3,855 Views)

 


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

 

0 Kudos
Message 9 of 22
(3,841 Views)

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.

0 Kudos
Message 10 of 22
(3,836 Views)