Jump to content

Tip on how to copy RT build specs to new type of target


Mads Toppe

Recommended Posts

Just thought I should share this little trick I have successfully used for a number of multi-target projects now. LabVIEW does not allow you to copy build specs to another target, or change the target hardware for an existing one, and our build specs are often quite elaborate with a lot of different destination folders/llbs. Having to recreate them manually is a lot of tedious and error prone work. 🤢

So, until NI decides to support an automatic conversion (which based on the method below should be easy even if they need to take some extra considerations across the spectrum of targets...), I have found another way:

Open the lvproj file in a text editor, preferably one that has some XLM-support (I use NotePad+).

1. Copy the/one of the existing target item sections to a temporary file.

2. edit/replace the target header to define the right target type and hardware, an example is highlighted in the image below:

image.png.5923704f678c83972eb963cf57328195.png

(If you do not know the correct DeviceCode (7740 in the case of 9063) and CCSymbol-values for the new target you can always figure it out by adding an empty target of that type to the project first...the device codes are also listed in your firmware folder and on the web.)

3. Then replace all instances of the reference to that target name with the new one in the rest of the spec, here the cRIO-9063 part would be replaced with cRIO-9030 if that is the name of the new target we need:

image.png.bb6b4eb85b64596d44ab1aa3aba4ad58.png

4. Now add the new item to the original project file and save.

A possible next step would be to write a little VI that does this automatically for you, you could make it recreate the build spec of a given target for a whole bunch of targets automatically....I have not done that yet. So far I am happy saving lots of time this way already 😀

I have not discovered any pitfalls yet, but perhaps there are(?) The applications build and run fine on each target... 

In my case all the target build specs are/can be identical (in some cases I might need to change a conditional disable symbol here and there though), but if yours are not then you can still use this shortcut to do parts of the job.

Link to comment

I've done some of this in the past (when SCC decided to "merge" my lvproj file), and it seemed straightforward enough. I think I recall the primary reason it is unsupported is because they can change the xml structure at will. Currently I have use for this because I have one cRIO on my desk to test with and another in a system to deploy to. If only we had a way to virtualize targets, but that's a different can of worms!

Link to comment
2 hours ago, Jordan Kuehn said:

I think I recall the primary reason it is unsupported is because they can change the xml structure at will.

That would make sense if the question was whether they would support that a third party created a tool based on this type of manipulation.

I do not understand why they do not support it within the project explorer though. When they control both the file format and the editor, supporting this type of target copying would just be a matter of updating it to their new format. They already convert the project file to new versions so that part would be taken care of.

Link to comment
10 minutes ago, Mads said:

That would make sense if the question was whether they would support that a third party created a tool based on this type of manipulation.

I do not understand why they do not support it within the project explorer though. When they control both the file format and the editor, supporting this type of target copying would just be a matter of updating it to their new format. They already convert the project file to new versions so that part would be taken care of.

Agreed 100%.

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
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.