labview web services
TRANSCRIPT
![Page 1: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/1.jpg)
LabVIEW Web Services
Hans-‐Pe4er Halvorsen, M.Sc.
![Page 2: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/2.jpg)
Problem
2
Clients
Data
How to Share Data between Devices in a Network?
Local Network/Internet
Server(s) Firewalls
Routers/Switches, etc.
Security
![Page 3: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/3.jpg)
Problem
3
Clients Data
How to Share Data between Devices in a Network?
Direct ConnecLon between the Data(base) and the Clients that need the Data is normally not possible, due to security, compaLbility issues, etc. (Firewalls, Hacker A4acks, etc.)
Direct ConnecLon in a Local Network (behind the Firewall) is normally OK – but not over the Internet
![Page 4: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/4.jpg)
SoluLon: Web Service
Web Service Internet
HTTP
Clients
Web Services uses standard web protocols like HTTP, etc. HTTP is supported by all Web Browser, Servers and many Programming Languages. This means you can create and use Web Services in all the popular programming languages.
Data
![Page 5: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/5.jpg)
LabVIEW Web Services
![Page 6: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/6.jpg)
CreaLng the Web Service in LabVIEW
Create an empty LabVIEW Project – or use your exisLng Project
![Page 7: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/7.jpg)
Create a Web Service Method
![Page 8: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/8.jpg)
Create your Block Diagram
![Page 9: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/9.jpg)
Create your Front Panel
![Page 10: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/10.jpg)
TesLng and Debugging
![Page 11: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/11.jpg)
Default Port for Debugging: 8001
![Page 12: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/12.jpg)
It Works!
![Page 13: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/13.jpg)
Manage the Web Service
Here you can change HTTP Port, etc. The Default Port is 8080
or type: h4p://localhost:3582 in your Browser
Default Login: UserName: Admin Password:<empty>
![Page 14: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/14.jpg)
![Page 15: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/15.jpg)
![Page 16: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/16.jpg)
Web Service ProperLes
![Page 17: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/17.jpg)
Publish the Web Service
Default Port for Publishing: 8080
![Page 18: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/18.jpg)
It Works!
Note! IP address “127.0.0.1” is the “localhost” address. You may use your actual IP address instead. Espesially when calling the Web Service form another computer or device, you need to spesify the actual IP address.
![Page 19: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/19.jpg)
How-‐To Find your IP Address
![Page 20: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/20.jpg)
Install Web Service on the Server/Remote Computer/Device without LabVIEW installed
Configure the Web Applica/on Server: h4p://localhost:3582 in theWeb Browser o your Server or h4p://[remote device IP address] . Note! Microsoi Silverlight is required.
![Page 21: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/21.jpg)
Data Dashboard for LabVIEW
iPad, iPhone, Android, Windows 8
![Page 22: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/22.jpg)
iPhone Example
Enter the IP Address for your “Server” (the computer where the LabWIEW Web Service is installed)
![Page 23: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/23.jpg)
iPhone Example
![Page 24: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/24.jpg)
iPhone Example
![Page 25: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/25.jpg)
Windows 8 Example
![Page 26: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/26.jpg)
![Page 27: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/27.jpg)
![Page 28: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/28.jpg)
References
• Tutorial: CreaLng and Accessing a LabVIEW Web Service: h4p://zone.ni.com/reference/en-‐XX/help/371361K-‐01/lvhowto/build_web_service/
![Page 29: LabVIEW Web Services](https://reader033.vdocuments.mx/reader033/viewer/2022061608/5881db4d1a28abea188b5d1f/html5/thumbnails/29.jpg)
Hans-‐Pe7er Halvorsen, M.Sc. Telemark University College Faculty of Technology Department of Electrical Engineering, Informa/on Technology and Cyberne/cs
E-‐mail: [email protected] Blog: h7p://home.hit.no/~hansha/
29