DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

(my) DQMH PPL and VILIB PPL best practices

Debugging: (depending on what you want to do)

Fridu_11-1623165545582.png

 

Exclude dependent packed libraries: (Always enabled!)

Exclude dependent shared libraries: (Always disabled!)

Fridu_12-1623165593210.png

 

 

Use Pre-/Post Build Actions to optimize your build

  • Remove all Breakpoints before you build
  • Check for misssing Items.
  • set conditional disabled symbols

Fridu_13-1623165643896.png

 

DQMH Module's (generic):

- Move Tester inside of the Library

- Set main.vi public (easier to debug)

Fridu_5-1623161555282.png

 

Call (non PPL) DQMH from PPL DQMH modules

  • The GUI is available as source code and will be compiled later as EXE
  • The GUI DQMH modules are not used as a PPL
  • The Module1 uses requests from the GUI / delivers data with broadcasts

 

Fridu_0-1623226836209.png

Obtain Request Events.vi

For all GUI-DQMH modules "Obtain Broadcast Events.vi and Obtain Request Events.vi) must be extended. The VI searches via "VI server" the instance with the valid UserEvent registrations).

Fridu_1-1623227225398.png

 

TestStand error / stop module integration:

- generate an additional vi to receive the desired events under TestStand (running in a TS-thread)

Fridu_8-1623162046762.png

 

Add LVLIBP-search path to your Application.ini file (TestStand and normal applications)

  • viSearchPath="C:\xxx\Components\Libraries\*"
  • ShowLoadProgressDialog=False

 

Lessons learned:

  • Circular dependencies
    It's not possible to build PPL with circular dependency
  • Namespace
    Attention the namespace of a VI or control and typedef changes Typedef controls. The type definition inside and outside the Packed Library is not compatible.
    It can cause problems with queues and type casting for example!
  • Semaphores
    If Semaphores are used over the PPL border, an separate LabVIEW Semaphores PPL (wrapper) must be created. The problem lies again in the fact that a Semaphore is in the background a "Typedef Queue" which gets a new Type in the new Namespace of the PPL.
  • TestStand
    If PPL cannot be opened with the TestStand "Runtime Engine", it may be because the controls on the front panel are not Pubilc.
    (For libs and for DQMH modules).
  • Missing Items in Projects / lvlib
    Missing items result in partially not executable PPL (even text files and images)
  • After renaming the project, the PPL build specification must be recreated
  • Broken code within "disabled structures" may break the PPL!
  • Never, ever use Error Rings and XNodes!

 

Main Application settings

If you receive "Error 1003 occurred at File XXX.lvlib:Start Module.vi" you can try the following setting:

  • Fridu_1-1625753834881.png

     

  • I do not recommend "Disconnect type definitions" for PPL's", but for application its worth a try! 😉


In case of strange crashes, recompile the PPL with the MGI Solution Explorer!

  • Consider build order!
  • opposite direction of the hierarchy

 

=> Still under construction... please wait for updates! 😉

 

Have FUN with PPL! 

Claude

 

CLA / CTD
Message 1 of 7
(3,810 Views)

Updated and extended...

CLA / CTD
Message 2 of 7
(3,750 Views)

Updated (Pre-Postbuild / Application settings)

CLA / CTD
Message 3 of 7
(3,707 Views)

Added Main application settings

CLA / CTD
Message 4 of 7
(3,401 Views)

HI , THIS HELPS A LOT. THKS !

 

I GOT A QUESTION:

Obtain Request Events.vi

For all GUI-DQMH modules "Obtain Broadcast Events.vi and Obtain Request Events.vi) must be extended. The VI searches via "VI server" the instance with the valid UserEvent registrations).

 

The picture is not clear enough.Could u show me where  i can find the vi(the valid UserEvent registrations)?

 

Thanks!

0 Kudos
Message 5 of 7
(2,382 Views)

These VIs are only needed if you mix PPL and non-PPL event/broadcast registrations of the same library.

1) Insert the Helper_BroadAndRequest.vim in the "Obtain Request Events.vi" and "Obtain Broadcast Events.vi" in the false case.

Fridu_1-1645542943094.png

 

2) Make the Wrapper_Obtain Broadcast.vi and Wrapper_Obtain Request.vi static in Memory

=> Replace "Obtain Request events.vi "Obtain Broadcast Events.vi" in the Main.vi of your DQMH module

Fridu_2-1645543195301.png

Well, it sound a littlebit complicated and strange. But something magical happens with these little VIs. Try it and let me know! 😉

=> These little changes allow you to register events of already started PPL modules in non PPL modules.
=> Hint: all Helper_xxx.vi can be stored outside of the DQMH module. The Wrapper_xxx.vi are members of the DQMH modules

 

Cheers and have fun

Claude

 

CLA / CTD
Message 6 of 7
(2,372 Views)

added "Never, ever use Error Rings and XNodes!" because of the learnings from Darren Nattinger
=> Thanks for sharing!

https://www.youtube.com/watch?v=HKcEYkksW_o&ab_channel=GDevConNA

 

 

CLA / CTD
Message 7 of 7
(1,595 Views)