11-27-2013
03:33 AM
- last edited on
04-05-2024
11:01 AM
by
Content Cleaner
Hello,
Is there a way to programatically manipulate .lvproj/.lvlib files? I found the Project:Open invoke node, but that only lets me query the project, not change it. There's also LabVIEW VI Scripting, but that seems to only support modifying VIs.
I'm asking because I want to write a tool to automate the creation, binding, updating and verification of Shared Variables. My team had to rename and remap variables for a large pilot plant controller (due to a change in cRIO chasses and modules), and it was... tedious. The Multiple Variable Editor and direct XML manipulation helped slightly, but the process could still be better.
Thanks!
11-27-2013 07:24 AM - edited 11-27-2013 07:24 AM
Scripting allows you to programatically modify and query a project. However, the items will not be visible if you have not enabled scripting in your Tools»Options menu. Select the VI Server tab and ensure the VI scripting items are checked. This will open up the Project properties of App. Then the fun begins... Post issues as you run into them.
11-27-2013 07:26 AM
Have you looked at the DSC Module?
You can create Shared Variables programmatically through this, rather than just accessing programmatically through the Data Communications palette.
11-27-2013 08:44 PM
@DFGray wrote:
Then the fun begins... Post issues as you run into them.
That's great foresight 😄 Thanks for the gem; I'll start playing with VI scripting.
@thoult wrote:
Have you looked at the DSC Module?
You can create Shared Variables programmatically through this
We're using the DSC module for data logging, which is why we need to bind PC variables to CompactRIO variables. However, the DSC module's Shared Variable VIs only work on the PC; we need to query and manipulate variables on RT targets too.