05-07-2021 02:14 PM
Is there a way to copy or create FPGA registers using scripting in a project. I am looking at needing a few registers for each IO (128) so if I could run a script to make and name them that would be really really nice.
I can create one, and get a reference to it in the project, but I can't use the GObject move, because I can't cast the ProjectItem ref to be a Gobject. I also looked and don't see a project level "Copy", which would be the easiest.
My end goal is a FPGA target with the hundreds of registers defined.
Solved! Go to Solution.
05-07-2021 04:31 PM
I found this VI that seems to do the trick: [LabVIEW 20xx]\vi.lib\FlexRIO\ProjectCreator\ProjectCreatorClass\Create Register.vi
Pass in the reference of the ProjectItem you want to own the Register, and it has a configuration cluster for setting the name, data type, etc. When I ran this code a Register was successfully created in the project.
FYI this approach (and more generally, any attempt to call undocumented internal VIs) is not officially supported by NI.
05-11-2021 09:47 AM
Awesome. I was able to use that, normal scripting and then \vi.lib\rvi\ClientSDK\Core\Script\Memory\XNode\Public\nirviXnMemory_Open.vi and those VIs to change the register read\write nodes and I think I got it all working. Thanks again