LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Beating my foot with a hammer, or using PPLs - which is less painful?

LV2013 SP1, LVRT 2013, Win7

 

I'm new to PPLs (Packed Project Libraries) and it looks like they might solve a couple of problems for me, but they seem to want to be contrary sometimes.

 

I've boiled it down to a simple case.  The BROKEN error has come and gone over the past week, I don't understand what brings it on or takes it away.  Today I moved the building of certain PPLs out of the main project and into a separate project, and here it is again.

 

Here is a 55 -sec JING to show the problem <http://www.screencast.com/t/4NvcjQmVeus>

 

0:00 I have a LVLIB called JENKINS HASH, I want to make a PPL out of it.  It contains five files (The "64" versions are not used, but similar to the "32" versions, which I DO use).

 

0:02 I open the HASH 32 PANEL.  It's marked as INLINE SUBROUTINE, but I've tried using it as normal, with no effect.  Note that IT IS NOT BROKEN.

 

0:04 the Block Diagram shows some arithmetic code, with 3 calsl to a single subVI, and a TYPEDEF (the "hash" outputs).

 

0:07 the SubVI has nothing but arithmetic code in it. No calls elsewhere.  It is also marked INLINE SUBROUTINE, but changing that has no effect.

 

0:13 the one TYPEDEF used is a simple U32, formatted a particular way.  It is also in the LVLIB.

 

0:21 - the BUILD SPEC for the PPL is shown.  The output is called JENKINS HASH.LVLIBP.

 

0:28 - the only thing in the SOURCE FILE is the single TOP LEVEL LIBRARY, Jenkins Hash.

(I'm using this project for other PPLs too, but they're not germane to this issue).

 

0:32 - BUILD the thing.  Takes about a second, and you see the new file appear where it's supposed to.

 

0:39 - Open the PPL (*.lvlibp) and you see the five files in it.

 

0:41 - Open the VI from the PPL and IT IS BROKEN ?  ? ?

 

WHY, you might ask.  Well, just click on the broken arrow and LV will tell you, right?

 

0:45 - Click on the arrow and it tells me "something is missing".

It's not smart enough to tell me WHAT,

 

If I wanted programming to be painful, I would move to Microsoft C++.

 

Any ideas?

 

 

 

 

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 13
(3,420 Views)

Hmmm.  The HASH 64 version is NOT broken.

 

The difference (besides the code itself) is that It uses generic U64 (NOT a typedef) as output indicators.

 

If I convert the HASH 32 to use generic U32, it succeeds as well.

 

Why is it originally broken, though?  the TypeDef is right there...

 

 

 

 

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 13
(3,414 Views)

OK, if I change the BUILD SPEC to DISCONNECT TYPE DEFINITIONS (on the ADDITIONAL EXCLUSIONS tab), then it works, even using the TYPEDEF, and set to INLINE SUBROUTINE.

 

Still, I don't understand this.  I place the indicator from the TypeDef that's in the LVLIB.  I can't place the one from the PPL, because it's not built yet.   So, why doesn't it copy the LVLIB one to the PPL and then use it?

 

It's as if it's stlil trying to find the original .CTL file, but it's not in a path that the PPL can find.

 

Is there any sense behind this?

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 3 of 13
(3,408 Views)

Well, dang.  If I DISCONNECT TYPEDEFS in building the PPL, then place an instance of the VI on a diagram and CREATE CONSTANT from it, the constant is NOT an instance of the TYPEDEF and will not change if the TYPEDEF changes.

 

Which defeats the whole purpose of a TYPEDEF.

 

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 13
(3,371 Views)

I'm trying to find the post on this but I do recall there being some particular nastiness with TypeDefs and PPLs. Basically, the PPL namespacing ends up breaking the TypeDef for anything not living inside the PPL.

 

EDIT: I think this is what I was remembering.

0 Kudos
Message 5 of 13
(3,359 Views)

 the PPL namespacing ends up breaking the TypeDef for anything not living inside the PPL.

 

Well, in this case, the Typedef and the VI that uses it *-IS-* inside the PPL. 

 

And it STILL complains that it cannot find it.

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 6 of 13
(3,350 Views)

Ouch.  Sounds like the Hammer is the less painful option Smiley Wink

0 Kudos
Message 7 of 13
(3,335 Views)

Well, starting from scratch to make a submittable project for Tech Support, and it of course works.

 

BugChase.PNG

 

the VI here is an INLINE SUBROUTINE, same as my real code.

The ENUM is a strict TYPEDEF, in the same LVLIB file, same as my real code.

The BUILD SPEC puts it into a different folder from the source, same as my real code.

 

But I can build and open this one and it's not broken.

 

Wonder what I'm doing differently?

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 8 of 13
(3,325 Views)

OK, so I started a brand new BUILD SPEC, plugged in the same info and now it will work when built with the new one, and fail when built with the old one.

 

FAIL:

Fail 1.PNG

 

GOOD:

Good 1.PNG

 

Other than the name, no diifference do I see.

 

 

FAIL:

Fail 2.PNG

 

GOOD:

Good 2.PNG

 

FAIL:

Fail 3.PNG

 

GOOD:

Good 3.PNG

 

 

FAIL:

Fail 4.PNG

 

GOOD:

Good 4.PNG

 

FAIL:

Fail 5.PNG

 

GOOD:

GOod 5.PNG

 

FAIL:

Fail 6.PNG

 

GOOD:

Good 6.PNG

 

FAIL:

Fail 7.PNG

 

GOOD:

Good 7.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 9 of 13
(3,297 Views)

I see no difference in those BUILD SPECs, but one of them will always fail, and the other will always succeed.

 

This means it depends on some bit-rot within the PROJECT, or the Build Spec itself.

 

Just my favorite thing to have happen - random failures.

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


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 10 of 13
(3,292 Views)