LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add project target programmatically

Hi all,

 

I am trying to add RT (cRIO FPGA) target programmatically to the project in similar manner as in "Add Files to Project.vi" LV in examples.

I've found some posts here dealing with adding folders/files but none of them mentions adding and configuring different targets and devices in project .

 

Any help would be greatly appreciated

 

jma

 

 

0 Kudos
Message 1 of 7
(3,872 Views)

Hi Jmaczak,

 

I am not sure I can give you a straight forward answer.

First, I have two questions:

 

Do you have LabVIEW 2010?

Why do you want to do that?

 

With VI scripting (available in LV 2010), theoritically it should be possible, but I found noone who had done this, yet. The project has to be a member of VI server; meaning, Add Targets and Devices... has to be a method that you can call from VI script.

Can you, please, answer the two questions above? Than we'll continue...

 

Regards,

Matyas

0 Kudos
Message 2 of 7
(3,853 Views)

Hi Matyas,

 

1)  I am using LV2010

2)  I am thinking about Project API rather than VI scripting. As to the purpose I am developing automatic project creation tool for cRIO/FPGA target.

 

Regards,

 

jmaczak

0 Kudos
Message 3 of 7
(3,836 Views)

Hi jmaczak,

 

If we are talking about project API, I'm not sure whether you can do it with it (I have been playing for a while and without sucess). I found information saying:

 

"You can use Project API for:

Create a project

Save and load project from disk

Add or delete file or VI to or from the project

Use or modify Build Specification of the project"

 

This is it. Tough, It could be possible to add target to project in the way that you modify project as any other XML file.

the part you want to add looks similar to this one:

 

<Item Name="Master" Type="RT CompactRIO">

      <Item Name="Chassis" Type="cRIO Chassis">

            <Item Name="FPGA Target" Type="FPGA Target">

            </Item>

     </Item>

</Item>

 

Take it as extremely simplified tist of items and its properties - you can get better idea if you create some project manually and open it in some text editor.

 

I'm not sure whether it will help you to do what you need, but I hope that you don't have to spend hours investigating what you can achieve with project API Smiley Wink

 

 

regards,

Martin Stefik

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 4 of 7
(3,825 Views)

Out of curiosity, are you aware of the FPGA Project Wizard and FPGA Wizard?  If so, what do they not do that you would like it to do?  If not, you can find the FPGA Project Wizard on the Targets pulldown of the LabVIEW getting started dialog. By default, it chains into the FPGA Wizard.  The FPGA Wizard can be launched independently by right clicking on any FPGA target.

 

Thanks for any feedback you may have.

0 Kudos
Message 5 of 7
(3,789 Views)

Any resolution to this?  Would be useful to programmatically add a project target.  This is for a case where you have 3 or 4 of the same targets.

 


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
0 Kudos
Message 6 of 7
(3,291 Views)

Hi

 

There is no easy way to do that but if You are patient enough, You can manipulate the project as a regular XML file.

Below You can find simple example of the VI whitch clone targets in simple projects.

 

Its not perfect because I make it fast but I hope it show You the way 🙂

 

cRIO_clone.png

 

Write a feedback i this is what You was looking for

 

Regards

0 Kudos
Message 7 of 7
(3,247 Views)