キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

.net constructor timeout?

解決済み
解決策を見る

Hello,

I am using a .NET constructor node in LV 2009 to connect to an existing third-party .dll. If the XML file the DLL is using to get it's configuration data is OK, the .NET constructor executes quickly and immediately gives me the .NET reference to use. However, is something is amiss with the DLL setup, the constructor takes 40-60seconds to execute, but then gives me no error. Is there any way I can set a 'Timeout' or something similar when using the constructor node so that if it is taking too long to execute, I can stop and produce an error or something?

Thanks,

Mello

 


Data Science Automation

CTA, CLA, CLED
SHAZAM!
0 件の賞賛
メッセージ1/10
4,689件の閲覧回数
解決策
受理者 Mellobuck

Hi Mello,

 

you could measure the time needed to execute the constructor and decide on that value...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
メッセージ2/10
4,671件の閲覧回数

You can't set a timeout on the constructor, so you would need to resort to what GerdW mentioned.

 

I am confused by one thing. You said "if something is amiss with the DLL setup". Would this be just the XML file, or something else? Can you check the XML file yourself before calling the constructor?

メッセージ3/10
4,664件の閲覧回数

Hello,

Yes it would be the XML file. If the DLL is pointing towards an incorrect IP, for example. I could parse the XML file myself, it is the setup file for Windows Communication Foundation. I am currently testing GerdW's method, and will let you know.

-Mello


Data Science Automation

CTA, CLA, CLED
SHAZAM!
0 件の賞賛
メッセージ4/10
4,662件の閲覧回数

It seems that I tried to take one step forward and went five steps back.

 

Now, the constructer node just keeps giving me an error 1172. This happens wherever I try and use it, even in a new project with a new VI, only containing the node. This is only when I browse for the path, the built-in .NET functions work fine (Timer, Calendar etc.)

 

These were working this morning. When the XML, as above, was set up correctly no problems or errors on the node. We even rolled back the .DLL's to where we had left them before we started this morning, with no help.

 

I really don't even know where to look here, I have repaired labview and restarted a number of times...

-Mello


Data Science Automation

CTA, CLA, CLED
SHAZAM!
0 件の賞賛
メッセージ5/10
4,647件の閲覧回数

reboots maybe required if the dll is registered. (confession: outside my comfort region)

 

Dr Gray's Nugget here offers other methods for loading, they may help.

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
メッセージ6/10
4,636件の閲覧回数

With .NET private assemblies the most likely problem with constructors is that of dependencies on other private assemblies.

 

What do you mean by "This is only when I browse for the path". Which path? The path of the private assembly?

メッセージ7/10
4,624件の閲覧回数

By "Only when I browse for Path" I meant the Browse button at the top of the .net dialog that let me browse to the private assembly.

 

The error is gone, I hadn't copied the XML setup file for the new test. Now back to testing what I had originally planned...

-Mello


Data Science Automation

CTA, CLA, CLED
SHAZAM!
0 件の賞賛
メッセージ8/10
4,615件の閲覧回数

Re: Ben

 

Explicit loading of the library with Dr. Gray's VI was successful, but had to effect on the error in the constructor node.

 


Data Science Automation

CTA, CLA, CLED
SHAZAM!
0 件の賞賛
メッセージ9/10
4,613件の閲覧回数

Mellobuck wrote:

Re: Ben

 

Explicit loading of the library with Dr. Gray's VI was successful, but had to effect on the error in the constructor node.

 


I suspect that should read " but had NO effect...".

 

If you know you are loading teh right dll and other calls work (double check to be sure!) then I have to ask if the dll is healthy.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 件の賞賛
メッセージ10/10
4,606件の閲覧回数