Jump to content

Deploy RT and PC VI's - PXI Webserver trouble


Waterppk

Recommended Posts

Hello,

Running LabView 8.6

I'm using a PXI system and trying to create a build that will run on the PC and also deploy my project on the PXI system. I can create a build file for the PXI and have that run, however if I try to run the PC VI that monitors the network shared variables from the PXI system, it will just try to run over the PXI deployment resulting in the PXI VI's stopping and the PC VI starting. Seems like I'm missing something. . .

Bonus points if you can tell me why I can't get the webserver up and running. I have the PXI system set up at 192.168.1.200, my PC is also behind the same router at 192.168.1.100, I have enabled the web server on the PXI system and have all of the "filters" set to asteriks, so I shouldn't be blocking myself from accessing the web server. There are the default files (like Index.htm) in the PXI web root (at C:\ni-rt\system\www) and I can ping the PXI system, however when I navigate to 192.168.1.200 in a browser I get nothing, also going directly to 192.168.1.200/Index.htm returns nothing.

Thanks much and let me know if you need more information!

Chris

Link to comment

Are you able to connect to the remote panel? (Operate>Connect to Remote Panel).

What webserver port are you using? Default is 80 which for us is a proxy port so I usually change it to 90.

I forget if VI Server has anything to do with it, but just try enabling VI Server on the Remote Target as well.

Check the ni-rt.ini file at C:\ on the target to make sure all your settings are correct.

N.

Link to comment

QUOTE (Waterppk @ Mar 25 2009, 06:06 PM)

Hello,

Running LabView 8.6

I'm using a PXI system and trying to create a build that will run on the PC and also deploy my project on the PXI system. I can create a build file for the PXI and have that run, however if I try to run the PC VI that monitors the network shared variables from the PXI system, it will just try to run over the PXI deployment resulting in the PXI VI's stopping and the PC VI starting. Seems like I'm missing something. . .

Bonus points if you can tell me why I can't get the webserver up and running. I have the PXI system set up at 192.168.1.200, my PC is also behind the same router at 192.168.1.100, I have enabled the web server on the PXI system and have all of the "filters" set to asteriks, so I shouldn't be blocking myself from accessing the web server. There are the default files (like Index.htm) in the PXI web root (at C:\ni-rt\system\www) and I can ping the PXI system, however when I navigate to 192.168.1.200 in a browser I get nothing, also going directly to 192.168.1.200/Index.htm returns nothing.

Thanks much and let me know if you need more information!

Chris

Looks like I can't ping port 80, which would make it hard to handle an http request, any ideas?

Chris

Link to comment

QUOTE (Neville D @ Mar 25 2009, 07:01 PM)

Read my post above.. chg to port to 90

N.

Thanks for the quick response, I hadn't seen it when I posted previously

I changed the HTTP port to 90 and tried to connect through a browser (192.168.1.200:90) and get nothing, I also tried pinging ports 80 and 90 and again get nothing. I tried connecting to the Remote Panel and get:

Remote panel connection refused by specified server: Make sure LabVIEW Web Server is enabled on specified server

I verified my settings in properties (by right clicking on my chassis), however when I FTP'd to it and checked the settings they were not as set, it had:

WebServer.Enabled= FALSE

I manually edited that line to read:

WebServer.Enabled=True

and recopied it over but it made no difference.

My current ni-rt.ini in the root of the PXI is:

[LVRT]

CDIntervalTicks= 55

EnableCPULoadDisplay= True

LABVIEWRTDir= C:\ni-rt\system

PATH= C:\ni-rt\system\;

RTCPULoadMonitoringEnabled=True

RTEnetRcvMode= 2

RTTarget.ApplicationPath= c:\ni-rt\startup\startup.rtexe

RTTarget.EnableFileSharing= True

RTTarget.TimeZone= CST6CDT

RTTarget.VIPath= C:\ni-rt\startup

server.tcp.access= "+*"

server.tcp.enabled=True

server.tcp.serviceName="Main Application Instance/VI Server"

SocketRecvBufferSize= 65535

SocketSendBufferSize= 65535

StartupDLLs=c:\ni-rt\system\taggerrt.dll;c:\ni-rt\system\mxsemb.dll;c:\ni-rt\system\NcRpcSrv.dll;c:\ni-rt\system\nidevldp.dll; c:\ni-rt\system\taggerrt.dll;NiRioRpc.dll;NiViSrvr.dll;c:\ni-rt\system\nipxism.dll;niorbp.dll;

WebServer.Enabled=True

WebServer.TcpAccess="+*"

webservices.SecurityAPIKey="PqVr/ifkAQh+lVrdPIykXlFvg12GhhQFR8H9cUhphgg=:pTe9HRlQuMfJxAG6QCGq7UvoUpJzAzWGKy5SbZ+roSU="

webservices.ValidTimestampWindow=15

[NVE]

MessageQueueUpperBound=1000000

[sTARTUP]

EarlyStartupLibraries= C:\ni-rt\system\lvuste.dll;C:\ni-rt\system\tsengine.dll;C:\ni-rt\system\nisl_emb.dll;

MainExe= /ni-rt/system/emblview.exe

[sYSTEMSETTINGS]

Comment=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Comment_Format=512

Host_Name=EcoCAR-Chassis1

Protect_Reboot=FALSE

[TCP_STACK_CONFIG]

DNS_Address=0.0.0.0

Gateway=192.168.1.1

IP_Address=192.168.1.200

Subnet_Mask=255.255.255.0

Thanks again for your help!

Link to comment

If you are using LV 8.6, check to see you have webserver.conf in the root, and it shows the correct port "Liston 90".

Every time you change a setting on the RT in your project it is not immediately apparent whether that setting was actually changed on the target.

I think when you "deploy" your code it deploys the settings, but I just always manually check.

Your file should look like this:

# Web server configuration file.# Generated by LabVIEW 8.6# 10/30/2008 2:30:35 PM## Global Directives#ServerRoot "."LogLevel 2TypesConfig $SERVER_ROOT/mime.typesThreadLimit 10LoadModulePath "./modules" "./LVModules" "./.."LoadModule LVAuth lvauthmoduleLoadModule LVRFP lvrfpmoduleLoadModule dir libdirModuleLoadModule copy libcopyModuleLoadModule esp libespModuleListen 90## Directives that apply to the default server#ServerName LabVIEWDocumentRoot "/ni-rt/system/www"Timeout 60AddHandler LVAuthHandlerAddHandler LVRFPHandlerAddHandler dirHandlerAddHandler espHandler .espAddHandler copyHandlerDirectoryIndex index.htmKeepAlive onKeepAliveTimeout 60

PS moving the Webserver Port value to the separate webserver.conf file has been a recent change in LV 8.6. Previously you just added WebServerPort=90 into your ni-rt.ini and everything worked out OK.

N.

Link to comment

I do have the niwebserver.conf in the root, I suspected having to deploy to get the settings to change so I was doing that, but it's nice to know where the files are ending up so I can check, here's my niwebserver.conf:

# Web server configuration file.

# Generated by LabVIEW 8.6

# 3/25/2009 1:05:01 PM

#

# Global Directives

#

ServerRoot "."

LogLevel 2

TypesConfig $SERVER_ROOT/mime.types

ThreadLimit 10

LoadModulePath "./modules" "./LVModules" "./.."

LoadModule LVAuth lvauthmodule

LoadModule LVRFP lvrfpmodule

LoadModule dir libdirModule

LoadModule copy libcopyModule

LoadModule esp libespModule

LoadModule LvExec ws_runtime

Listen 90

#

# Directives that apply to the default server

#

ServerName UW HIL

DocumentRoot "/ni-rt/system/www"

Timeout 60

AddHandler LVAuthHandler

AddHandler LVRFPHandler

AddHandler dirHandler

AddHandler espHandler .esp

AddHandler LvExec

AddHandler copyHandler

DirectoryIndex index.htm

KeepAlive on

KeepAliveTimeout 60

Good news, I figured out the problem - the NI webserver wasn't an installed component! I went into MAX and checked the installed software and I was wanting to install that component.

Bad news - the only reason I was in MAX was because I nuked the ni-rt.ini and redeployed without rebooting. This created a new ni-rt.ini file and so then I rebooted the PXI system (having a 'fresh' ni-rt.ini file), now when it boots it says: "System state: No software installed", so I would imagine in their infinite wisdom some NI programmer felt that LabView should write all the configuration data to the ni-rt.ini, so my system isn't aware that it's configured and ready to go. The good news is that it's still recognized in MAX, but I can't FTP to it to fix the ni-rt.ini

Any ideas on how to proceed from here? Format the disk and start over or?

Thanks

Link to comment

Got it back, just set everything in MAX to reinstall and it rewrote the configuration file (I would imagine).

The webserver now works properly, I switched the port back to 80 so the browser wouldn't have any issues and it still works fine. Still don't know how to get a 'full' deploy where I can run a VI on my PC and also have VI's on the RT system running concurrently without issues, the ONLY reason I'm wanting to do this is so the VI's properly deploy everything, like my HTML pages (which I can set to be copied over to the www folder with a deployment, but if I just run the VI on the RT it doesn't copy over).

Link to comment

I'm not sure what you mean by "full deploy".. You have to build an executable of your RT code and then download it to the target and set it to run on startup. Reboot the RT and it should run your code.

Then you run whatever you want on the host side to get at the published data. I'm no expert with shared variables, preferring to use lower-level TCP communication which is much more flexible but needs more code development.

N.

Link to comment

QUOTE (Waterppk @ Mar 25 2009, 02:44 PM)

Got it back, just set everything in MAX to reinstall and it rewrote the configuration file (I would imagine).

The webserver now works properly, I switched the port back to 80 so the browser wouldn't have any issues and it still works fine. Still don't know how to get a 'full' deploy where I can run a VI on my PC and also have VI's on the RT system running concurrently without issues, the ONLY reason I'm wanting to do this is so the VI's properly deploy everything, like my HTML pages (which I can set to be copied over to the www folder with a deployment, but if I just run the VI on the RT it doesn't copy over).

You shouldn't have problems running VIs simultaneously on your RT system and your PC. Do you have all your VIs set up properly as separate targets in your project? All the VIs that run on your PC should be under "My Computer". What happens when you run the RT VIs, then start the PC VIs? If it attemps to download and deploy to the RT system, you're running your PC VIs on the wrong target. You might also try starting the RT VIs, then right-click on the RT target in the project explorer and choose "Disconnect." Your VIs will continue running on the RT system but LabVIEW will disconnect from it.

Link to comment

I spoke with someone from LabView who does the actual RT programming (on the LabView side) at a conference today in Milwaukee. He said that my PC vi (it's running on the correct target) would attempt to redeploy the variables if it didn't think they were deployed, he said the same thing you did, that the easiest thing is to create a build for the RT and run that, then to disconnect from the target and run the local files, otherwise of course I could try tracking down the dependencies and figure out what the actual problem is.

Thank you both for all of your help!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.