Community Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling LabVIEW Web Services

This example is intended to show you how to call a web service, built in LabVIEW in the Web UI builder. This example assumes that you are familiar with building your own Web Service. For more information about building a Web Service in LabVIEW, please see Tutorial: Building and Accessing a LabVIEW Web Service Application (Windows, ETS, VxWorks).

 

You will deploy a pre-built web service to be imported into the Web UI builder. This example allows you to choose which type of waveform you would like to display and set a series of parameters. This Web Service will return a set number of points and will be called continuously until the user says to stop.

 

Note: You will need LabVIEW 2009 or 2010 to deploy the pre-built web service.

WebUI.png

 

Download Details:

Extract Call LV Web Services.zip which contains the project with pre-built web service

Download WebUI Call LV Web Service.zip

 

Implementation Details:

 

1.  Open LV WebService.lvproj in LabVIEW

2.  Explore the DisplayData.vi to see what your Web UI Builder will be calling and what inputs and outputs you will be expecting.

3.  Open the DisplayData web service and ensure the path to place the webservice in the C:\Program Files\National Instruments\LabVIEW 2010\www \DisplayData is a valid path.

4.  Build the web service

5.  Right-click and select Deploy

6.  Open the Web UI Builder

7.  From the toolbar select Open Project»LabVIEW Zip Project»This Computer and navigate towards where you saved the Web UI Call LV Web Service.zip

8.  Open Call LV Web Service.vix

9.  Navigate to the Block Diagram

10. From the Toolbar Tab click on Project»Import Web Service

11. In the server URL type localhost (LV 2009) or localhost:8080 (LV 2010) then click Connect

12. Select Call_LV_Web_Service

13. Under the Project Tab, expand Call_LV_Web_Service and drap DisplayData.vix into block diagram

14. Wire up necessary inputs and outputs

15. Run and explore code!

Download All
Comments
daniel.riedelbauch
Member
Member
on

Hey everyone,

I don't know, if it is only me, but it seems that the DisplayData.vi which is essential to create the Web Service is missing within the "Call LV WebService.zip"...

Could you please add the missing piece?

Thanks in advance

Daniel

StephanieA
NI Employee (retired)
on

I uploaded a new project with the file included. Let me know if you have any additional questions.

Stephanie A.
Americas Marketing Manager
National Instruments
Daniel Stoilkov
Member
Member
on

I can't see the wave on the graph i can see only single line not sine wave?

Roger1
Member
Member
on

Daniel: Try setting the Frequency to 0.008

BordoSlo
Member
Member
on

Hello,

I can build and deploy webservice and i can import webservice in UI WebBuilder.

When i run the .vi continuously and run the UI WebBuilder application I dont get any replay or I cant control the .vi....

If i run both applications on a singel computer I can import webservice in WebBuilder, but if I run the WebBuilder application on another computer and search for webservices on htpp://ip:8080 no webservices are found...

What would be the problem ? Server settings on both computers are set to 8080.

Regards,

Marko

ColeTrain
NI Employee (retired)
on

FYI for anyone else who opens this.  "Call LV Web Service.zip" will not work.  Use the one with the 2009 tag.  Here's the error you get with the other one.

ScreenShot00047.png

ColeR
Field Engineer
StephanieA
NI Employee (retired)
on

I've gone ahead and remove the corrupt file. If there any other problems, let me know.

Stephanie A.
Americas Marketing Manager
National Instruments
ssanny
Member
Member
on

unfortunately I am not show the sine in UI WebBuilder

3.jpg1.jpg1.jpg