LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically run a VI on Controller Startup

Hello all,

I am trying to configure a cDAQ-9137 for unmonitored data capture and logging over a long period of time. The end goal would be to deploy the system in the field without a computer, by simply giving it power then letting it run. I am trying to follow this tutorial about using a source distribution for auto-running of VIs on startup: http://digital.ni.com/public.nsf/allkb/CD3C7A3F58CBBAAA862570F8007D8D06

However, it is not working. I also found this, about source distrubtions vs. executables: http://digital.ni.com/public.nsf/allkb/E2F8C8D4270CCC62862574440054E894?OpenDocument

I cannot create a real time executable in my project tree, however. I've attached a picture to show this.

Here are my questions:

1) Is it possible to create a real time executable on a cDAQ? If so, how?

2) If I do have to use a source distribution, I am a little confused about the steps outlined in the tutorial above. Does it matter where the directory points in step 1.2?

3) In the source distribution tutorial, on step 3, where does the RTTarget.StartupVIs token have to point to? In the tutorial it points to etc/natinst/share/ni-rt.ini/foo.vi, but on my controller the .vi is located at /home/lvuser/natinst/bin.

 

4) On step 1.4 it mentions a Preserve hierarchy option. What does that do and when is it necessary?

Thank you in advance,
AbeG

Edit:

I checked the error log for my cDAQ and each time I tried to auto-run the vi on startup it logged this error:

kernel: [    1.730992] Warning: unable to open an initial console.

0 Kudos
Message 1 of 3
(3,479 Views)

Hi AbeG,

 

Are you developing this using a host machine then pushing your executable to your RT cDAQ? Have you seen the following link?

http://www.ni.com/white-paper/4040/en/

0 Kudos
Message 2 of 3
(3,397 Views)

I'm going to agree with Agamemone -- the easiest way to do what you describe is to develop on your PC, targetting your code to the CompactDAQ configured with a Real-Time Operating System.  The picture that you show of your Project shows that MkIII is deployed on the cDAQ.  My own RT experience is more with the PXI, but there the list of Build options includes "Real-Time Application", which can be deployed to the Target and set to Run as Startup (which is what I think you want to do).

 

Bob Schor

0 Kudos
Message 3 of 3
(3,387 Views)