LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV2010 - trouble using post-build action

I just discovered post-build actions in LV2010, and I would like to use them, but it doesn't seem to work.

 

Specifically, it never runs the VI.

 

No error, no message, it just never executes.

 

I am building an LLB target for PXI.  The HELP say to make sure the post-build VI is under My COMPUTER.

 

I want to run it under MY COMPUTER (I want it to create a new folder on a server and copy the new LLB into that).

 

It never ran.

 

I moved the VI to the target where the BUILD SPEC is (instead of MY COMPUTER), thinking maybe the HELP file didn't account for multiple targets.

 

It never ran.

 

The VI was generated by the GENERATE VI button, and I didn't change it except to put in a probe.

 

It never ran.

 

Attached is a pic.

 

Anybody see something I'm doing wrong?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 9
(3,050 Views)

OK, so a PRE-BUILD action never gets called either.

 

 

So, I started from scratch and created a new project with a new main VI, and a new Build Spec to create an EXE.

 

No multiple targets or anything fancy.

I created the VI with the GENERATE VI button, and assigned it as the post-build action.

I created a probe on the ERROR wire.

It never runs. PostBuild 2.PNG

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 9
(3,041 Views)

To verify the VI is run, place a breakpoint in the VI and see if it stops.

George M
National Instruments
0 Kudos
Message 3 of 9
(3,039 Views)

I've done that, as well. No go.

 

If I run the post-build VI manually, the probe changes to FALSE, and gives me a  time of execution, so I know just the probe is a valid indicator of whether it ran or not.  It's not a re-entrant VI, so there's no confusion there.

 

The panel controls never change, as they should if it was being called.

 

It's just not being called.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 9
(3,032 Views)

For what it's worth, I'll mention this.

 

In the process of installing LV2010, I had driver issues, and I wiped out all NI stuff (with MSIBlast) several times and re-install LV, then I had to manually install the Device Drivers,because the automatic install didn't do it. (Probably didn't need to blast everything, but tech support recommended it during the chase).

 

The EVALUATION copy of LV2010, that I had previously installed on Win 7 running under VMWare Fusion on my Mac, had worked flawlessly - all drivers were there and the program talked to all hardware OK.

 

I just tried this issue on that platform, and it has the same problem.  A new project, with a new MAIN, a new BUILD SPEC, and a new POST-BUILD VI, created with the GENERATE VI button.  It's never called.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 5 of 9
(3,023 Views)

OK, I've SOLVED this issue........ sort of.

 

 

See attached pic.

 

You have to SAVE the post build VI after making any changes (like adding a probe).

 

If you do that, then it hits the breakpoint, but it's in ANOTHER COPY of the VI.

 

Notice, in the pic there are TWO VIs named "Useless PostBuild".

 

The one that breaks has a Call Chain of "AB_Build_Invoke.vi - AB_Engine_Build.vi - AB_Build.lvclass:User_PostBuild.vi"

 

The one that doesn't has a title of "Useless PostBuild on Useless.lvproj/My Computer"

 

I don't understand why, but there it is.

 

 

PostBuild.PNG

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 6 of 9
(3,011 Views)

Oooo - nasty LabVIEW behavior:

 

1... Set breakpoint in POSTBUILD vi.

2... BUILD main

3... Breakpoint hits in POSTBUILD vi.

4... Close POSTBUILD vi diagram and panel.

5... LabVIEW hangs.

6... Click CANCEL button on BUILD dialog.

7... LabVIEW hangs.

8... CLose BUILD window.

9... LabVIEW still hangs.  Cannot operate in PROJECT window, cannot operate menus, LabVIEW is dead.

 

I suppose it's waiting on the POSTBUILD to finish, but it never will.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 7 of 9
(3,007 Views)

In order for changes to pre or post build action VIs to take effect, the changes needs to be saved. This is because, as you have seen, the VIs run in a different application instance than the project. This is so those VIs do not cause conflicts with user source code. So the behavior you are seeing is correct.

 

The other behavior of the hangs you are seeing is a side effect of having the VI operate in another application instance. By closing the VI's front panel you can no longer cause the VI to continue and thus the build operation and LabVIEW are left waiting.

George M
National Instruments
0 Kudos
Message 8 of 9
(2,998 Views)

In order for changes to pre or post build action VIs to take effect, the changes needs to be saved.

 

--- Well, yes, I finally figured that out.  It would be helpful to have that explained in the HELP for the POSTBUILD tab.

 

 

The other behavior of the hangs you are seeing is a side effect of having the VI operate in another application instance. By closing the VI's front panel you can no longer cause the VI to continue and thus the build operation and LabVIEW are left waiting.

 

--- I also figured that out the hard way.  Perhaps the GENERATE VI could generate one that had the USER IS ALLOWED TO CLOSE option turned OFF.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 9 of 9
(2,994 Views)