LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot create a webservice

Hello,

 

I have followed the webservice tutorial for a simple sum vi, as located here:

 

http://zone.ni.com/devzone/cda/tut/p/id/7350

 

However, when I attempt to apply this to a vi that simulates a signal to a numerical indicator, the webservice doesn't seem to be created properly as when I try to retrieve the data through http://localhost:8080/Cons/Constant it does not retrieve anything.

 

Are there any additional steps that I have to do in order to get this working? Any help would be appreciated!

 

Thanks

0 Kudos
Message 1 of 4
(2,233 Views)

Hey Emengo,

 

A common mistake that is made when creating web services is that people forget to connect the connector pane terminals to an output graph/chart/indicator etc. Would it be possible to get a copy of your project so we can have a look at what you’ve done?

Regards

Andrew George @ NI UK
0 Kudos
Message 2 of 4
(2,213 Views)

Hi Andy,

 

My attached vi generates a noisy signal which is then displayed to a graph. I have a connector pane terminal connected to a numerical indicator for the "output power".

 

( The values I use are:

  • R1 = 68,
  • R2 = 47,
  • Current Shunt = 400,
  • Freq to Vol = 66 )

I have it set up so that it should be able to connect to http://localhost:8080/WindSim/windturbinesim2 ? I could get it working for the NI sum.vi example, and if I'm clear the vi does not need to be running. However, if your webservice is sending a value that is dependent on the vi running at that time (eg. if you're wanting to obtain a real-time value) then would you have to run the vi whenever you wanted to access the webservice?

 

Thanks

Download All
0 Kudos
Message 3 of 4
(2,207 Views)

Hi,

 

What you have to remember is that when creating a web service the data is polled in single instances, and therefore your loop was unnecessary. Please see the image below of your modified code and also the URL used to access the data on your web service circled in red. Please let me know if you have any further issues.

 

Webservice.png

Regards

Andrew George @ NI UK
0 Kudos
Message 4 of 4
(2,168 Views)