LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET event handling

Hello all,

 

I'm building an automation process in LV which controls an application by using it's remote DLLs written in C#.

The actual execution of the application is working, I can configure,load and run the test procedures after extracting their dedicated IDs using another VI I built.

 

My problem is the event handling.

I have tried to fix it after reading the following threads:

http://forums.ni.com/t5/LabVIEW/Net-Event-Handling/m-p/562572/highlight/true#M264082

and

http://digital.ni.com/public.nsf/allkb/2AF19EBDFA4AC82D862576B6006E7FE8

 

The problem remains.

When I run the main VI I see the dialog setup window from the software but there is not action taken by the Reg event callback section.

 

My question is: Is this the correct way to setup an event callback mechanism in the main VI with the connections as shown in the attached file? 

And if yes, then is the callback VI itself is set properly ?

 

I also have linked several string indicators to the callback VI to check if it's working but without success.

 

Attached are the Main VI (VFremoteWithEvents070213) and the event handling VIs', 2 DLL are the ones I use for the software connection.

 

Thank you,

 

Lev,

 

 

 

0 Kudos
Message 1 of 5
(3,013 Views)

Hey LevKL,

 

I opened you're project and I couldn't seem to locate the VIs "initapplication.vi" and "LoadConfigFile.vi", are these native to LabVIEW or did you make them?

 

 

Bobby Breyer
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(2,988 Views)

First: don't destroy the event callback refnum immediately after you create it. That will likely prevent the callbacks from running properly, although I'm not certain of that - I've never tried immediately destroying the refnum.

 

Several of your callbacks don't do anything, so it would be difficult to know if they run or not. My favorite way to test if a callback is working is to drop a "One Button Dialog" function in them that alerts me to the callback name so I can see that it fired. You can also pause the callback VIs or set a breakpoint in them so that the code will pause when they execute.

Message 3 of 5
(2,985 Views)

To ShishKeBobby

 

These VI are not native to LabView.

 

Please see attachment for details.

 

Thank you,

0 Kudos
Message 4 of 5
(2,957 Views)

Hi LevKL,

 

I think nathand is on the right track to guiding you to a solution.

Bobby Breyer
Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(2,935 Views)