LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI not working with web service (wrong app instance)

Hello

 

I have a web service where I have to write some values to a certain VI. This VI is located in the same project, but not in the web service.

Even though I open the VI using an application reference, the web service opens the VI in the "main application instance" and not in the instance that is my actual project. The problem is that this VI has to read from a state machine, but the values are of course incorrent when it is in the wrong instance.

 

Does anyone know what I am doing wrong? I have attached a screenshot of how I call the VI below

Thank you,

 

 

 

VI call.png

0 Kudos
Message 1 of 4
(2,772 Views)
A web service is a separate instance -- like an executable. And you can access Vis from it in the same way. Your project has to have TCP/IP enabled and it needs to be listening on a unique port.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 4
(2,744 Views)

It sems like my initial guess is not what is causing the problem. I have changed my VI real quick so it ignores the state machine and just executes when triggerd. This works when I start the web service in debugging mode. However when I actually publish the web service, there is no reaction and it's hard to debug a published web service as far as I know?

 

Attached are my VI server settings, the calling VI is still the same except for the port which I changed to 3365 just to be sure.

 

 

 

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

Ok the problem calling the VI from the web service is solved.

 

I am still stuck with my original problem though. I set a state in the state machine in the main app (not as a built app, just in developer mode or however you call it). When the webservice calls the VI using the state machine, it calls it in the wrong app instance, and the state machine returns it's default value...

0 Kudos
Message 4 of 4
(2,641 Views)