LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

connecting to compact RIO with self-made software


@nathand wrote:

You can upload a new application by ftp'ing the new exe to the correct directory (you might need to rename the old one first; you may not be able to delete or overwrite a running application). You can set whether the application runs on startup from the ni-rt.ini file, so you could ftp a new copy of that file as well with the desired settings. Maybe that's easier than pulling apart the Replication and Deployment Tool.

 

Out of curiousity, though, why would you want to install the new application, but not start it running? How will you launch it?


The idea is to reboot the controller without an user application running and then replace all the files that would be used online by that application. Also the guy in charge of the project said it's necessary in case of updating drivers for example. After that you could reboot into normal mode again, right?

 

What's the entry one would have to modify in the ni-rt.ini file?

The current ni-rt.ini looks like this (the part that I identified as of interest, where startup.rtexe is the user application:)

 

[STARTUP]
YouOnlyLiveTwice=FALSE
EarlyStartupLibraries=nirtdm.out;nimdnsResponder.out;nisvcloc.out;tsengine.out;RTWebServer.out;mxssvr.out;niDiscSvc.out;
MainExe=/c/ni-rt/system/lvrt.out
DisplayStartupLibProgress=TRUE

[LVRT]
RTTarget.ApplicationPath=/c/ni-rt/startup/startup.rtexe
RTTarget.OlsonTimeZone=Etc/UTC
server.tcp.access=+*
RTTarget.EnableFileSharing=True
server.tcp.serviceName="Main Application Instance/VI Server"
RTTarget.TimeZone=CUT0GDT
server.tcp.enabled=True
RTTarget.LaunchAppAtBoot=True
cleanupVisa=True
WebServer.Enabled=True
StartupDLLs=nisysrpc.out;nidp_target_end.out;NiViSrvr.out;NiRioRpc.out;taggerrt.out;sysstatepublisher.out;niserial.out;
memoryChecking=False
LABVIEWRTDir=/c/ni-rt/system
PATH=/c/ni-rt/system/;/c/ni-rt/;
CDIntervalTicks=55
RTTarget.VIPath=/c/ni-rt/startup
RTTarget.IPAccess=+*
RTEnetRcvMode=2
RTCPULoadMonitoringEnabled=True

 

 

0 Kudos
Message 11 of 16
(1,072 Views)

@Simorgh wrote:

The idea is to reboot the controller without an user application running and then replace all the files that would be used online by that application. Also the guy in charge of the project said it's necessary in case of updating drivers for example. After that you could reboot into normal mode again, right?


If you're updating the drivers, then you probably need to boot into Safe Mode, and not just with the startup application disabled. If you do want to update the drivers and system software on the cRIO, then the Replication and Deployment Tool will be helpful, but I think you'll need to manually update one cRIO, make an image of it, and then use the tool to install it elsewhere.

 

Yes, you can reboot with the startup application disabled, copy files, reenable the startup app, and reboot again. Depending on how you're using files in your application, you might be able to skip the reboot with the application disabled step, though (in our application, that was fine - we copied a new startup application over while the old one was running, and rebooted).


@Simorgh wrote:

What's the entry one would have to modify in the ni-rt.ini file?

The current ni-rt.ini looks like this (the part that I identified as of interest, where startup.rtexe is the user application:)


[LVRT]
RTTarget.ApplicationPath=/c/ni-rt/startup/startup.rtexe
RTTarget.LaunchAppAtBoot=True


These are the relevant settings. See

http://digital.ni.com/public.nsf/allkb/B37FA04A1CB84B6C862571A30060EF03

http://digital.ni.com/public.nsf/allkb/538A12DB51FD561C86256B57001DB89A

0 Kudos
Message 12 of 16
(1,051 Views)

Simorgh, is there a reason that you need to develop your own application for performing all of these tasks?  From what I've seen so far, NI Measurement and Automation Explorer provides all of the functionality that you are asking for.  If you make your controller software an application component, then you can even deploy it similar to NI software and include driver dependencies.



0 Kudos
Message 13 of 16
(1,037 Views)

@VItan wrote:

Simorgh, is there a reason that you need to develop your own application for performing all of these tasks?  From what I've seen so far, NI Measurement and Automation Explorer provides all of the functionality that you are asking for.  If you make your controller software an application component, then you can even deploy it similar to NI software and include driver dependencies.


Sometimes you cannot install anything on computers at customer's site, so you cannot install also MAX. And you may have connection to the cRIO only in the local network.

 

We send updates for one of our cRIO products to the customer, they copy it to a USB stick and connect it to the cRIO.

The software running on the cRIO monitors the USB port. When it detects a specific directory available on the USB stick, it just copies the required file, specified in the update configuration, and reboots. We check also if the copy of the updated files was successful, etc...

0 Kudos
Message 14 of 16
(1,022 Views)

@chembo wrote:
Sometimes you cannot install anything on computers at customer's site, so you cannot install also MAX. And you may have connection to the cRIO only in the local network.

We send updates for one of our cRIO products to the customer, they copy it to a USB stick and connect it to the cRIO.

The software running on the cRIO monitors the USB port. When it detects a specific directory available on the USB stick, it just copies the required file, specified in the update configuration, and reboots. We check also if the copy of the updated files was successful, etc...


 

There are times and reasons that you have to do something yourself.  I always prefer to have as much control of system configuration performed through my own systems' main user applications as possible (or some other update management like the system you described) rather than having to rely on a third-party program like MAX.

 

However, in the case described so far, MAX actually does seem to me to be a good solution:

  • Desire is for this to be not the main application but a second application just for configuration (assumption on my part - no hint of it being a function in another application yet, and it is going to "run on a remote laptop")
  • Network connectivity to the device (could be local network or internet, if the network is set up for it)
  • Can install user application software
  • Can install drivers and NI software
  • Can monitor and enforce driver dependencies
  • Can reboot controller
  • Can add/remove files (through the use of a simple manual FTP interface)

Drawbacks:

  • CanNOT satisfy the goal of "send a "stop user application x" type command"
  • Cannot automate add/remove files via FTP
  • Cannot include as a piece of functionality in any of your other software
  • Is third-party to you and your customer


0 Kudos
Message 15 of 16
(1,006 Views)

I wonder - would it be possible to use LabVIEW to build a DLL containing the connect and configure VI's on the Real-Time palette and use that?



0 Kudos
Message 16 of 16
(972 Views)