LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

webserver on compactrio problem

Solved!
Go to solution

i'm trying to program a remote front panel / website to control a vi running on the RT of a singleboard RIO

the vi is just a control and led in a while loop (for testing)

i've tried:

http://digital.ni.com/public.nsf/allkb/7FEE6BCFD264175C8625723E000D928E

and

http://forums.ni.com/ni/board/message?board.id=170&message.id=275186&requireLogin=False

clear steps, but it doesn't work

 

i can make a remote frontpanel for a vi running on my pc, but not on the sbRIO.

the page wil load, but the vi doesn't show.

 

Can i get an example somewhere of how it is done?

 

also why do you need to make an executable?

are there any settings i should check?

 

thanks

0 Kudos
Message 1 of 8
(5,701 Views)

 maybe this is the problem... 

 

do i need webservices to serve the front panel in a webbrowser? i'm using an evaluationversion.

If so: Is there a way to do it without webservices?

 

thanks

0 Kudos
Message 2 of 8
(5,679 Views)

Jan

 

Make sure that you don't forget to deploy the build application by right clicking the build specifications and clicking 'deploy'. Also make sure you set it as a setup. Make sure that when you reboot the cRIO, the VI is running automatically. Also make sure your windows firewall is disabled. If you follow the guide you referred to step by step, everything should be fine and you should be able to connect. My guess is that your VI is not set to running automatically in the build specifications. Make sure that when you create the build specifications, while not only specifying 'set as startup', to also specify the startup VI in the source files item of its properties.

Best Regards

Michiel
Applications Engineer
NI Belgium
http://www.ni.com/ask
0 Kudos
Message 3 of 8
(5,659 Views)

Is there anything strange about these steps?

 

- create a new project: webpanel in my case
- add the RT-target: sbRIO in my case
- create a VI that´s gonna be the VI with the Frontpanel displayed in the Website later: named webpanel.vi
 

- test that VI by simply running it and therefore connecting to the target

 


- enable webserver on the target (rightclick the target in the LV-Project-Window)
- reboot the target
- build a website from the VI with the Web-Publishing Tool in LabVIEW/Tools
- copy that website down to the target via ftp

- create a new RT-Startup-Application under Build-Specifications in the Project Window
  and build that app
- deploy all to the target from the Project Window (Rightclick the Project.lvproj) -> i clicked the sbRIO target
- Reboot the target -> target disconnects after reboot, is that ok?
- type IP-Adress of target and hit ENTER to check if the webserver is started (default site must be loaded)
- finally type IP-Adress/Website.html to load the website

 

 

I can't connect to any website on the sbRIO, but can still ftp them, however ftp'ing and opening the webpanel.html i get this error:

 

 

 

 

thanks!

 

 

0 Kudos
Message 4 of 8
(5,620 Views)

Hi,

You can check the functioning in various ways.

 

1. Have you included your webserver.vi , as the start up VI in the Build specification ?

2. Once you build it, right click and set it as start up app and then run as start up app. It will reboot and the target will disconnect.

3. Now check whether the startup app is running  by right clicking on the target and then trying to connect, it should give a conflict saying a startup app is running.

 

For a webser to work, the startup app must be running while you try to connect to it. if you can post your  VI, I can be of more help

 

-Mallya

" Appreciate and motivate those who help"
0 Kudos
Message 5 of 8
(5,607 Views)

thanks for your reply Mallya: 

 

1. Have you included your webserver.vi , as the start up VI in the Build specification ?

 

 

2. Once you build it, right click and set it as start up app and then run as start up app. It will reboot and the target will disconnect.

i've set it as startup and rebooted manually. target disconnects.

3. Now check whether the startup app is running  by right clicking on the target and then trying to connect, it should give a conflict saying a startup app is running.

yes, this is ok, so the app must be running

 

maybe:

- the evaluationversion (does this work, can't check the 'webservices box')

- it's an sbRIO

 

 

also

- it seems like the webserver is down after rebooting, since i can't acces other pages either (only via ftp) but the box is still checked

- vi is just a button and a led in a whileloop (with a stop button) for testing

 

i will try to make a vi that flashes some leds on the sbRIO so i can see if it is really running...

 

suggestions?

0 Kudos
Message 6 of 8
(5,601 Views)

my niwebserver.conf file looks like this:

does it look ok? any other config or ini files to check? 

 

 

# Web server configuration file.
# Generated by LabVIEW 8.6
# 13/05/2009 9:33:42

#
# Global Directives
#
ServerRoot "."
ErrorLog "./logs/error.log"
LogLevel 3
CustomLog "" "%h %l %u %t \"%r\" %>s %b"
TypesConfig mime.types
ThreadLimit 10
LoadModulePath "./modules" "./LVModules" "./.."
LoadModule LVAuth lvauthmodule
LoadModule LVSnapshot lvsnapshotmodule
LoadModule LVRFP lvrfpmodule
LoadModule dir libdirModule
LoadModule copy libcopyModule
LoadModule esp libespModule
Listen 80

#
# Directives that apply to the default server
#
ServerName LabVIEW
DocumentRoot "/Users/Jan Costermans/desktop"  ==> is this correct?
Timeout 60
AddHandler LVAuthHandler
AddHandler LVSnapshotHandler .snap
AddHandler LVRFPHandler
AddHandler dirHandler
AddHandler espHandler .esp
AddHandler copyHandler
DirectoryIndex index.html
KeepAlive on
KeepAliveTimeout 60

0 Kudos
Message 7 of 8
(5,597 Views)
Solution
Accepted by topic author jan86

solved!

 

http://digital.ni.com/public.nsf/allkb/7F95D43D3F50FCAC8625710E000068E1?OpenDocument

 

# Directives that apply to the default server
#
ServerName LabVIEW
DocumentRoot "C:/ni-rt/system/www"          <<<<====  !!CHANGE THIS!!
Timeout 60
AddHandler LVAuthHandler
AddHandler LVSnapshotHandler .snap
AddHandler LVRFPHandler
AddHandler dirHandler
AddHandler espHandler .esp
AddHandler copyHandler
DirectoryIndex index.html
KeepAlive on
KeepAliveTimeout 60

 

thank for the help

0 Kudos
Message 8 of 8
(5,589 Views)