LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shared Library dll won't exit when called by UI

Hello experts,

 

I have created a shared library dll from LabVIEW source code. In essence it does very simple operation:

1. Initializes PXIDMM

2. Configures Measurement

3. Reads Measurement

4. Closes

I ran this vi and it does what it should.

I built Shared Library dll and tried to call it from Test Stand - works perfect.

But when I call it from Custom UI it does all what it should and keeps repeating

the cycle. Here is IO Trace for clarity:

 

89. niDMM_init ("PXI1Slot11", VI_FALSE, VI_FALSE)
Process ID: 0x000017EC Thread ID: 0x00001094
Start Time: 15:40:15.3508 Call Duration 00:00:00.1849
Status: 0 (VI_SUCCESS)

90. niDMM_ConfigureMeasurementDigits (PXI1Slot11 (0x00000027), 5 (0x5), -1.000000 (-1.000000E+00), 5.500000 (5.500000E+00))
Process ID: 0x000017EC Thread ID: 0x00001094
Start Time: 15:40:15.5358 Call Duration 00:00:00.0000
Status: 0 (VI_SUCCESS)

91. niDMM_Read (PXI1Slot11 (0x00000027), 3000 (0xBB8), 1996.489380 (1.996489E+03))
Process ID: 0x000017EC Thread ID: 0x00001094
Start Time: 15:40:15.5358 Call Duration 00:00:00.1091
Status: 0 (VI_SUCCESS)

92. niDMM_close (PXI1Slot11 (0x00000027))
Process ID: 0x000017EC Thread ID: 0x00001094
Start Time: 15:40:15.6449 Call Duration 00:00:00.0034
Status: 0 (VI_SUCCESS)

93. niDMM_init ("PXI1Slot11", VI_FALSE, VI_FALSE)
Process ID: 0x000017EC Thread ID: 0x00001094
Start Time: 15:40:15.6494 Call Duration 00:00:00.1841
Status: 0 (VI_SUCCESS)

94. niDMM_ConfigureMeasurementDigits (PXI1Slot11 (0x00000029), 5 (0x5), -1.000000 (-1.000000E+00), 5.500000 (5.500000E+00))
Process ID: 0x000017EC Thread ID: 0x00001094
Start Time: 15:40:15.8336 Call Duration 00:00:00.0000
Status: 0 (VI_SUCCESS)

95. niDMM_Read (PXI1Slot11 (0x00000029), 3000 (0xBB8), 1996.448975 (1.996449E+03))
Process ID: 0x000017EC Thread ID: 0x00001094
Start Time: 15:40:15.8336 Call Duration 00:00:00.1082
Status: 0 (VI_SUCCESS)

96. niDMM_close (PXI1Slot11 (0x00000029))
Process ID: 0x000017EC Thread ID: 0x00001094
Start Time: 15:40:15.9418 Call Duration 00:00:00.0229
Status: 0 (VI_SUCCESS)

 

If someone experienced this behavior please share the solution. 

I appreciate all your inputs

 

Regards,

Leonid.

0 Kudos
Message 1 of 6
(1,899 Views)

I'm guessing there's something wrong with your code.  (Vague descriptions with no example code begets vague answers with no real value - GIGO.)

 

Don't worry - I suffer from the same issues when I ask for help, too.  Ugh.

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 2 of 6
(1,870 Views)

Hi GIGO,

 

Please take a look and tell me if you think something wrong with the code. I am attaching the source code and the Shared library dll I built from the code. Please note again - this dll works as designed if used in Test Stand, but fails to exit after executed in the custom UI. 

 

I appreciate all the inputs. Looking forward to hear from you or anyone else.

P.S. PXIDMM is NI PXI-4071 DMM

 

 

Download All
0 Kudos
Message 3 of 6
(1,841 Views)

Sorry, could you please re-upload the files?  It seems that I can't download them for some reason or other.  😞

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
(1,834 Views)

Hi Bill,

 

Files are attached. Thank you

 

Leonid.

Download All
0 Kudos
Message 5 of 6
(1,813 Views)

It was the custom VI I was really interested in.  Sorry I didn't realize that you uploaded the source code for the dll (even though you made that clear).

 

I guess I'm not doing so well, today - you sure you want me to help you?  😉

 

Anyway, when something works well in one environment but not another, I would check the environment - in this case, the custom VI - to see what might be happening.  When you take a fish out of the water and it dies, you don't suspect something was wrong with the fish.  😉

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 6 of 6
(1,800 Views)