LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing a Windows Form reference from C# .NET to LabVIEW

Solved!
Go to solution
Well, in case that 2 processes are involved, the easy approach I described is not applicable indeed. Nevertheless there are more flexible ways to have different processes talk to each other than old-school Windows messages. One technique are so-called named pipes:
Fortunately, they became pretty handy with .NET 3.5:
Anyway, if your application works like it should, leave the implementation as it is. I'd just recommend having a look at named pipes forfuture uses.
Cheers,
Hans
P.S.: As long as no inconsistencies or exceptions occur, thread unsafe GUI updates are no issue. But when they come, you'll know whatto look for! 😉

Well, in case that 2 processes are involved, the easy approach I described is not applicable indeed. Nevertheless there are more flexible ways to have different processes talk to each other than old-school Windows messages. One simple technique are so-called named pipes:

http://msdn.microsoft.com/en-us/library/aa365590(VS.85).aspx


Fortunately, they became pretty handy with .NET 3.5:

http://www.switchonthecode.com/tutorials/dotnet-35-adds-named-pipes-support

 

A different, much more powerful (and elaborate) way to transfer data between loosely coupled components is MSMQ:

http://msdn.microsoft.com/en-us/library/ms711472(VS.85).aspx

 

MSMQ is something that really rocks, I absolutely love it and I could cry about the fact that it's so little known.
Anyway, if your application works like it should, leave the implementation as it is. I'd just recommend having a look at named pipes and the like for future uses.


Cheers,

Hans

 

P.S.: As long as no inconsistencies or exceptions occur, thread unsafe GUI updates are no issue. But when they come, you'll know what to look for! 😉

0 Kudos
Message 11 of 14
(1,236 Views)

BTW, regarding MSMQ: I've posted an example in the forum some time ago:

http://forums.ni.com/t5/LabVIEW/MSMQ-with-Labview/td-p/154334

 

Wow, 3 years ago. Time flies...

My very basic example uses polling to read messages from a queue frequently. In real world applications, you'd rather use event based message retrieval.

0 Kudos
Message 12 of 14
(1,233 Views)

CAR 242214 discussed in this thread has been fixed in LabVIEW 2013. For a more complete list of bugs fixed in LabVIEW 2013, check the LabVIEW 2013 Bug Fixes. You can download an evaluation copy of LabVIEW 2013 at http://www.ni.com/trylabview/ or if you have an earlier version of LabVIEW installed and an active SSP subscription, you will be able to download the latest version of LabVIEW through NI Update Service.

 

Jeff Peacock

 

Product Support Engineer | LabVIEW R&D | National Instruments

0 Kudos
Message 13 of 14
(962 Views)

Thank you NI 

 

Three years from report of the bug to a fix which isn't too bad considering it was a low priority request (with relatively few people benefiting from it).

 

regards

Peter Badcock
Product Development
ResMed Ltd.
Peter
0 Kudos
Message 14 of 14
(954 Views)