Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting up cRIO with "scripting"

We are building OEM-machines containing cRIOs. To minimize the installation time and reduce errors it would be great to perform some kind of scripting-routine, of the things that should be done in MAX(setting the IP-address). Can this be done?

//Ulf
0 Kudos
Message 1 of 10
(6,092 Views)
Hello Ulf,

It might be possible to achieve a few things by using ‘scripts’. For an example I know it exists scripts on the web that allows you to assign IP-addresses, so they might work on a RT-target as well, and what is good is that most of them also check a few things before you actually do it (if the IP-addresses are already used). Just do a search on Google for an example based on the keywords script, IP-address and you will get several examples. I am not 100% sure if you can use scripts to install software on the system though (on your cRIO-9002/9004). I haven’t found any information that says that it is possible.

Regards,
Jimmie A.
Applications Engineer, National Instruments
Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 2 of 10
(6,073 Views)
Hi Ulf,

"Scripting" cRIO SW deployment can definitely be done. You usually use MAX to set the IP, but the IP address is stored on the controller in a file (ni-rt.ini). And files can be configured on the host PC, then FTP'ed across.

Broad strokes:
1. Setup one cRIO system just like you want it
2. Use FTP to copy all the files back to the PC. Call this the "master" image
3. To deploy, programmatically copy the master image to a deployment image (on PC), then open and change the settings in the .ini file in the deployment image. FTP this all across to cRIO and reboot.

That's the rough idea. We're working to document up the process for both cRIO and FieldPoint, but this should get you started.

Chris
Product Support Engineer
NI CompactRIO
0 Kudos
Message 3 of 10
(6,061 Views)
Thanks for your answer Chris!
When you say "Copy all files" do you meen all files on the RT-disk?

//Ulf
0 Kudos
Message 4 of 10
(6,041 Views)
Yes, copy the whole file structure and all the contents, from the root directory on. That will contain all the files for the operating system, all configuration options, and any startup executable that's been set up already.

If the cRIO systems are all going to be on the same network in the end, it's often useful for your startup executable VI to read some config options from a file, too. Depends on your end application, but sometimes you need some unique settings between devices on the same software and the same network.

Chris
0 Kudos
Message 5 of 10
(6,033 Views)
Chris,

Why is it necessary to copy all the files? Couldn't just the ni-rt.ini file be copied from the cRIO controller, edited, then ftp'ed back to controller?

Allen Weekley
0 Kudos
Message 6 of 10
(5,951 Views)
Hi Allen,

Yes, the ni-rt.ini file is the only one that needs modifying. I recommend imaging the entire drive from the original "master system" so that you maintain exactly the same RT driver versions and startup executable the whole time, and to minimize the number and complexity of the steps in the process.

Chris
0 Kudos
Message 7 of 10
(5,945 Views)
This cRIO setup "scripting" is a good start but is it possible for a host application to perform this for OEMs.  What I mean is to take a brand new cRIO directly out of the box and have the host application configure the IP address and ftp all the files over all without MAX.  Does the cRIO support the Bootstrap protocol (BOOTP)? If not, what protocol does MAX use to setup the initial IP address?
0 Kudos
Message 8 of 10
(5,641 Views)

Chris,

You mentioned NI was working on a document on this.  Was wondering if it was ready...

Thanks,

-Khalid

0 Kudos
Message 9 of 10
(5,158 Views)

Try this link, let us know what comments you have.

http://zone.ni.com/devzone/cda/tut/p/id/3937

 

Preston Johnson
Solutions Manager, Industrial IoT: Condition Monitoring and Predictive Analytics
cbt
512 431 2371
preston.johnson@cbtechinc
0 Kudos
Message 10 of 10
(5,117 Views)