LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HSDIO times out when code is built as dll; works in source as well as standalone executable.

Solved!
Go to solution

Hi, Forum:

I'm just looking for general advice on what kinds of things I should be looking for, like maybe a build specification or something.

 

Thanks!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 1 of 6
(2,287 Views)

Somebody smarter than myself told me the LV dll's run single threaded or was they run in the UI (which may be one in the same)...

 

So does your code need to run multiple threads"?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 6
(2,281 Views)

What is calling your dll?  I think that a lv dll can be thread safe... but not without the caller being multithead .  HSDIO is really a thin wrapper to a dll itself.  Writing code in LabVIEW that wraps up a set of calls to a wrapper to a dll and exposing them as a dll seams sort of-- 

What is the Politically Correct term for "Stupid?"

"Should be" isn't "Is" -Jay
Message 3 of 6
(2,270 Views)

I see a pattern here.  I will definitely look into the dll angle of things.  Thanks for the starting point!

 

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 6
(2,264 Views)

So here are some of the details.  The dll is being called from a custom test sequencer as a plugin.  Only one of these plugins ever executes at a time.  The code is ugly and violates all kinds of LV best practices, but there doesn't seem to be any obvious race conditions, at least.

 

Now you'll laugh even harder when I tell you that the guts of the dll started out as a standalone LV (source code) test that needed to have the outputs exposed so the LV plugin framework that it was dropped into can access the results and expose THAT as one of the outputs of the dll.  So we have about three layers of BS to navigate before the data gets outside the plugin.  I can't really show you a dumbed down version of the code because I haven't figured out how to do that yet.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 6
(2,250 Views)
Solution
Accepted by topic author billko

Fixed it.  I ran the offensive standalone-turned-subVI in its own thread (I chose "other 1") and now it works.  I wouldn't have guessed this if no one started talking about threads.

 

THANKS!!!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 6 of 6
(2,233 Views)