Jump to content

Compile VI for a specific target


Recommended Posts

Hello,

I wrote a VI ("ChangeScript.vi") to change programmatically the script of a "MathscriptNode" inserted in another VI ("MathScriptNode.vi").

Because this simple example is a part of a wider project, after the change of the script formula I need to recompile the VI ("MathScriptNode.vi").

I found the VI method "Compile" http://zone.ni.com/reference/en-XX/help/371361R-01/lvscript/vi_compile058vi/ to do this action, but this method only compile for Windows target. 

How I can compile programmatically the VI for the target Linux_x64 (cRIO hw)?

The LabVIEW project (LabVIEW 2018) attached contains the example code.

 

Thank you,

Francesco

ChangeScriptVI.PNG

SimpleTest.zip

Link to comment
19 hours ago, Fra_Sabba said:

How I can compile programmatically the VI for the target Linux_x64 (cRIO hw)?

Anything under My Computer is compiled for the platform you are currently on. For your cRIO I think you need to have it as a target in the project first. Then you can deploy your VI to it.

http://zone.ni.com/reference/en-XX/help/371361R-01/lvconcepts/adding_targets_to_project/

 Not that I have ever done this 🤷‍♂️

Link to comment

In a Windows system I would like to open a VI, modify it and finally compile it (only this VI) for a different target, for example Linux x64 (cRIO hw).

This is my desire, but I don't found a right method to reach the goal.

When you a create a Build Apecification under a Target in a Project, LabVIEW on Windows OS compiles all the VIs added to the Build Spec for the specific target. So LabVIEW can cross-compile a VI.

I'm wondering if the cross-compile functionality is provided with some function/method exposed.

Link to comment
22 hours ago, Fra_Sabba said:

In a Windows system I would like to open a VI, modify it and finally compile it (only this VI) for a different target, for example Linux x64 (cRIO hw).

22 hours ago, Fra_Sabba said:

I'm wondering if the cross-compile functionality is provided with some function/method exposed.

Move the VI to a cRIO target in your project (there is probably a way to do that with scripting somehow). The compiler will take care of the rest.

22 hours ago, Fra_Sabba said:

So LabVIEW can cross-compile a VI.

Yes, you can compile VIs for very specific targets like cRIO because it is a well defined environment. However, it is not possible to cross-compile applications between Windows, Linux and MacOS if that is what you want: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P81NSAS

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.