LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending message from Labview to a TestStand GUI

Hi,

 

Basically, I have a TestStand GUI programmed in C#. In my sequences, I call Labview modules to communicate with the UUT(telnet or serial). The Labview communication module is using a tracing module that records all communication in a text log file.

 

I would like to see the UUT communication log displayed in my GUI. So somehow, I would need a message being send from Labview (from our communication module) to the GUI. The way our code is done, we are too far away from TestStand to use the UIMessages.

 

What would be the best way? We could probably send windows messages using user32.dll. Do you have any example of doing this?

 

Thanks

Alexandre

0 Kudos
Message 1 of 5
(2,854 Views)

Hi Alex,

 

I am assuming you want to use the messaging to make sure that your log file is not being used by both the UUT and the UI simultaniously. If this is the issue, you can read the file in an event only called between steps (such as the tracing event built into TestStand), so that you are only reading the file at times when a code module cannot be accessing it.  If you are running your module in parallel with your sequence, you could use a variable accessible to both environments, such as a datasocket variable, to determine when the file can be used by each source.  Unfortunately I don't know of any examples using windows messaging since the built in UIMessage functionality is usually an option. Please provide a bit more detail if neither of the solutions I described will work for you, and I'll look into other possibilities.

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 2 of 5
(2,831 Views)

Hi,

 

I probably gave too much detail on what I was doing. In fact, I have a Teststand GUI (programmed in C#) that launches my TestStand execution. In TestStand, I call some Labview VIs. From these VIs, I need to send information to the GUI.

 

I am now looking in .NET remoting based on this link: http://zone.ni.com/devzone/cda/epd/p/id/6064 with a .NET remoting server in my GUI and a .dll client that will be used by my VIs.

 

Still, I was looking for different alternatives; maybe somebody has a different idea.

 

Thanks

Alex

0 Kudos
Message 3 of 5
(2,825 Views)

Hi Alex,

 

In this case, I'm still not clear as to why you cannot use the built in UIMessaging functionality.  If you pass a TestStand engine reference into your LabVIEW VIs, you can invoke the post UI message method directly in your code module. You can then process the message events in your UI. Please clarify if there is some component of your system that is preventing you from using this system, and I'll be happy to provide more assisstance!

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 4 of 5
(2,797 Views)

Hi,

 

I did not know you could do that. Do you have any example? Still, the .NET Remoting works fine, but it might be easier and cleaner using the UIMessages from Labview (no extra dll to compile for .NET client).

 

Thanks

Alex

0 Kudos
Message 5 of 5
(2,793 Views)