LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building a labview class in a real-time application

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!

 

Asa77_0-1709246259681.png

 

0 Kudos
Message 1 of 5
(512 Views)

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.

~ Self-professed LabVIEW wizard ~
Helping pave the path to long-term living and thriving in space.
0 Kudos
Message 2 of 5
(456 Views)

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. 

0 Kudos
Message 3 of 5
(422 Views)

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. 

 

0 Kudos
Message 4 of 5
(417 Views)

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. 

0 Kudos
Message 5 of 5
(373 Views)