Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Web Server on cRIO with NI Linux Real-Time

I have a cRIO-9035 which runs NI Linux Real-Time and I created a project using the wizard and it offered to have a web server based UI so I chose that option.  The instructions say to upload the provided html file to the web server root folder, enable the web server, and then browse to it via a web browser.

 

The web server, according to the web-based system configuration, the web server is running on port 80.  However, I'm unable to find any documentation that actually tells me where the root of the webserver is located.  I found out that the only folders that I can write to via WebDAV are:

  • /home/webserv
  • /home/lvuser
  • /tmp

So, I figured "webserv" sounded like a good place to put web server files.  This doesn't appear to do anything.  So, I tried putting a simple text file in there to see if it would properly show any file via the web server.  When I browse to http://<ip>/helloworld.html, I get error 404.

 

So, how do I get the web server working?

 

EDIT:  Using LabVIEW 2014 SP1

0 Kudos
Message 1 of 5
(5,183 Views)

Hi NathanJD,

 

Are you talking about the FPGA Project wizard? I would like to take a look at the documentation that you are reading. 

 

"Root Directory" Typically means the highest level location on the drive (Example: C:\). From your post this sounds like the same level as the folders which you are talking about. 

0 Kudos
Message 2 of 5
(5,147 Views)

Here are the steps that get me my pre-built project:

 

File > New...
Project > Project from Wizard > Real-Time Project
OK
Project type = "Continuous communication architecture"
'deterministic components' is checked
Next
Target Configuration = Two loops
Include user interface is checked and set to Remote Panel
Next
Add my target as a cRIO-9035 (as a new target since it's not currently connected)
Next
Open VI's is checked
Finish

 

 

It creates readme.txt which is where is "explains" how to set up the web stuff.  The "root" to which it refers is not the OS root, it's the web server root (which on Linux with Apache, in my experience is typically a "www" folder).

 

So, the wizard appears like it creates a working project but that is definitely not the case here since the instructions are way to vague to be useful.

 

0 Kudos
Message 3 of 5
(5,144 Views)

Jup, it referes to the appache file root, which is /var/local/natinst/labview/www

 

Nevertheless I don't think it a good idea to use these network panels as a interface to the cRIO.

For several reasons:

  1. Frontpanel elements destroy determinism: You should never use a frontpanel element in a time critical loop. Never.
  2. It creates a lot of unnecessary load on the crio: Pictures have to be transmitted to and from. Entirely not necessary.
  3. It also adds a certain also not proven instability to the system

It is a far better idea to creat a small webpage by youself which calls some methods of an NI webserver. You can use frameworks and java script on that, all you want!

I have no root, I have a superuser!
0 Kudos
Message 4 of 5
(5,073 Views)

So, it turns out that the instructions (in the ReadMe file) are just plain bad.  I had a coworker look into this using a "remote front panel" tutorial/other information and he got it working.

 

We are only using the remote front panel as an intermediate step to test some non-time-sensitive components in our hardware (e.g. for debugging hardware issues).  When we actually do the end-product, we won't use any web services.

0 Kudos
Message 5 of 5
(5,065 Views)