02-29-2024 04:40 PM
Hi All,
My understanding is that recent labview versions support lvclass objects. However, when I tried to do this, I got following error, restricting me to add any private data e.g. .ctrl file in the class.
The warning states: "This build specification does not support private data controls"
I would really appreciate if someone can give a tip to resolve this.
Thanks in advance!
03-02-2024 10:43 AM
You don't need to add every individual VI to always included in a build spec. As long as LabVIEW can see the code being called, it gets included.
It's also not just recent versions of LV, classes have been around quite some time now. Honestly not sure if this is spam/trolling.
03-04-2024 08:07 AM
Thanks for your reply. I didn't know that just adding the start up VI is sufficient for the build. I tried this and it built successfully.
However, it does not function correctly.
Just to elaborate more:
In my application, I have the Host PC application as the OPC client and the RT application as the OPC server. the OPC reference and other parameters such as NodeIDs are defined in the class properties which is a private control data type.
When I manually run them, they work perfectly. But when I built them into an application, the RT application does not pick up the data from the class properties vi which is a private control data type.
03-04-2024 08:33 AM
Have you some code that set the class data to some default values at startup?
I don't think you can rely on that the values in the private data control that you enter at edit time, is default at runtime for at build application.
03-08-2024 04:24 AM
I tried with a simplified piece of code and managed to get a class based VI built into an app without any error.
So, my conclusion is that class based approach has some limitations in the RT applications. e.g. If I build a class with methods: (1) FPGA Open where it call the FPGA configuration VI and pass the FPGA reference (2) FPGA read method which utilises that reference.
Then use a separate VI that call that FPGA reference which is embedded in the class properties (the .ctl file) and execute FPGA read method - the build seems to fail.
On the whole, I didn't get much benefit in using a class based approach for a RT application.