ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

WCF web services with LabVIEW

I'm glad that you were able to find another way of accomplishing what you were trying to do.  That actually sounds like a pretty great solution to your problem, and I'd love to see how you implemented that.

0 Kudos
Message 2 of 3
(4,078 Views)

Kyle,

 

The biggest issue with the built in LabVIEW method is that it doesn't work for WCF or I would have used it even though I'm not happy with using .NET to replace .NET.  I can give you the overview of what we did and then I can get you more details if it's useful to you.

 

On the LabVIEW end, we created a Daemon that receives TCP messages from  external code and puts them into local queues and a send block that formats a message into a format usable by C#.  The format we chose was ini file because, while size inefficient, it is tolerant to missing keys.

 

On the C# end, we did basically the same thing by creating a class which has a TCP receive thread which decodes the ini format and waits for TCP messages from LabVIEW.  When a message is received and event is raised which can be handled as needed.  Similar to the LabVIEW side, there is a send method that formats a class into a message that is sent to LabVIEW

 

On the LabVIEW side, we just send a cluster into our send block and on the C# side, we have a matching structure/class with matching elements.  This allows us to make the communication between the two transparent and we can focus on the LV and C# code instead of the communication protocol.

 

Leon

0 Kudos
Message 3 of 3
(4,047 Views)