06-18-2013 04:31 PM
Hi,
I have a VI template that I use to send commands to a number of devices that is not known at compile time. The VI template sends and receives text data using VISA Read and Write functions. The application spawns a number of VI instances based on the template by reading that number from a file. I'm having a problem with communications in that template and I'm trying to debug it. However, when I run the application through LabVIEW I can only see the template front panel. Is there some way that I can get LabVIEW to show me the block diagram for a VI template? In that way, I can set probes or at least view the execution of the template.
Thanks,
Jason Mazzotta
06-18-2013 04:52 PM
No there is not. To do that you can add the error out cluster and some other variables and things you want to watch to the top VI to view the values and errors being generated. Then when you are done troubleshooting just remove all the extraneous display components. You can only see the Block diagram in development mode. You can click the execution highlight to watch what happens and the errors generated while the vi runs, but for the exe you can only view the things you add to the vi to help watch the values and errors.
06-18-2013 05:46 PM
"You can only see the Block diagram in development mode. You can click the execution highlight to watch what happens and the errors generated while the vi runs, but for the exe you can only view the things you add to the vi to help watch the values and errors."
Thanks for the reply. I am actually trying to view the block diagram in development mode, but whenever I start the top level VI, LabVIEW hides the block diagram of the VI template. Is there some way to get LabVIEW to display the block diagram of the VI template, in development mode, while the top level VI is running?
06-18-2013 06:03 PM
Check the VI properties and make sure the VI block diagram is set to show.
06-18-2013 06:06 PM
That is uncheck the Remove VI Block diagram from the build properties of the project. This is not typical behaviour. Can you tell us more about your vi settings?
06-18-2013 06:24 PM
"That is uncheck the Remove VI Block diagram from the build properties of the project. This is not typical behaviour. Can you tell us more about your vi settings?"
Thanks for the reply, but again, I am not trying to run the compiled application. The build properties of the project affect the compiled application.
I am trying to run the application from within LabVIEW.
How can I get view the VI template block diagram while running the application in LabVIEW?
06-19-2013 12:52 AM - edited 06-19-2013 12:55 AM
Add an invoke node to your VIT diagram. Chooose the front panel->show method in the invoke node, and set it to "standard." That will open the front panel, and you can then show the block diagram from there by pressing ctrl+E or selecting Window-> block diagram from the menu.
Since you are debugging, another option is to put a breakpoint in the VIT, on the error cluster right at the beginning. This will take you directly to the block diagram when the breakpoint is hit. It also has the advantage the VI won't continue running until you unpause it, so you can debug the VI if issues are happening early on, before you can open the block diagram.