In part I we have built a simple VI that controls a LED, switching it on or off through a virtual pressure button. We will now show step by step how to launch the application in the Internet and control it remotely.
STEP 23 - Before anything else, we need to prepare the VI for multiple viewing. To do so in File menu we choose VI proprieties
A new window will open and in this select in Categories drop down menu Execution
A new widow will open and select Reentrant execution as shown in image
Press OK
STEP 24 - Next we prepare the webserver. In menu Tools choose Options
In Options window, choose Web Server: Configuration
Enable server by clicking in the choice box on the right of the phrase Enable Web Server.
Press OK.
STEP 25 - Choose now Web Server – Visible VIs, and add switched_usb6009.vi as shown, in the field below the phrase Visible VI. Keep all other defaults as they appear
Press OK
STEP 26 - We will next prepare the webpage and launch it. Choose Tools -> Web Publishing Tool
In Web Publishing Tool window choose the VI
Press Next after the VI is selected
STEP 27 - Write the title and HTML content as suggested in the image
Press NEXT
STEP 28 - In the next window change the default name of the html file to index. Press Save to Disk button
A new window will open Document URL, press Connect button and then OK
STEP 29 - The webpage will be published and the browser will open
Now with the right button of the mouse placed onto the published VI choose Request Control of VI
STEP 30 - The grayed buttons of the image will now show up. Press the run continuously button
STEP 31 - Now press the virtual button on the VI
The virtual LED on the switch button will light up
The LED Circuit connected to DAQ device will also light up, having thus achieved remote control of the circuit
STEP 32 - Knowing the IP of the PC (and better fixing the IP) one ought to be open the Labview’s page on the Internet. If the PC is behind a router, one needs to make the adequate changes in the router, in order toall external demands to the local fixed IP.
One last thing
In order to view the LED switiching on and off a webcam setup is required. In order to stream video YAWCAM freeware is advised. Having the requirements mentioned on the YAMCAM website one can easily establish a streaming server. If the PC is behind a router the video streaming server port must be opened on the router.
Conclusions
Having designed a VI we have controlled a real world circuit with a virtual button on the VI. We next have achieved Internet control of the VI using the tools that Labview offers.
0 comments:
Post a Comment