NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

"Incorrect function" error on PostUIMessageEx in Labview with Labview runtime

Solved!
Go to solution

Hi,

 

I have a TestStand GUI developped in C#. Now, TestStand has some Labview modules that needs to send UIMessages to the GUI (It is too deep in Labview code to bring it back to TestStand to send the UIMessage).

 

When I am using the Labview Full development version 8.6.1, everything is fine, I can see my messages. Now, when I switch to Labview run-time 8.6.1, the invoke node PostUIMessageEx gives me an error: Incorrect Function (error 1).

 

I have been trying rebooting PC/TestStand/Labview without success. Is there anything I am missing?

 

Thanks

Alex

0 Kudos
Message 1 of 14
(4,749 Views)

Alex -

 

Can you provide a screenshot of the error as well as a screenshot of the section of code from which you post the UI Message?

Manooch H.
National Instruments
0 Kudos
Message 3 of 14
(4,712 Views)

Hi,

 

Here is the code and the error. Note it is working (I don't have the error) using Labview Full Development license, only when using Labview Run-time...

 

Thanks

Alexandre

 

code.JPG

 

Error.JPG

0 Kudos
Message 4 of 14
(4,707 Views)
What are the names of the two TRACE subVIs and what do they do?
Manooch H.
National Instruments
0 Kudos
Message 5 of 14
(4,704 Views)

These are 2 references to the TestStand Execution and Thread. The references are given in the "constructor" of our trace objects and are kept in global variables in those 2 Trace VIs.

 

Initially, I was using PostUIMessage, which requires Engine, Execution and Thread reference. Now, I am using PostUIMessageEx, which only requires Thread, so the first Trace VI is not necessary anymore (don't need the Execution reference).

 

All those trace (keeping communication log with a UUT) is pretty deep in our code. It is why those references are kept in global variables. It would be way more complicate to provide the Thread reference each time from TestStand...

 

Thanks

Alex

0 Kudos
Message 6 of 14
(4,700 Views)