LabVIEW MathScript RT Module

Showing results for 
Search instead for 
Did you mean: 

Passing a Cluster In and a Structure Out a MathScript Node


A Cluster when being passed into a mathscript node becomes a Structure.

A Structure when being passed out a mathscript node becomes a Cluster.

Here is the script, that you can refer 


Here, I passed a cluster named "Area1". 

Then, I can use "Area1.xxxx" to access to values of this Cluster.


I defined a structure named "Load_Cmds", then I can give values for its elements as "Load_Cmds.xxxx". 

Then, when I pass out that structure, "Load_Cmds" becomes a Cluster.


Bang Nguyen, Clarkson University


0 Kudos
Message 1 of 3

@BangNg wrote:


Here is the script, that you can refer 

No, that's just a picture.


(What you are describing is already covered in the help.)

LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2 of 3

Here is the script:

-----------------------Access to Cluster named "Area1"-------

Pload(1)= Area1.Vtl_CrClg; Pload(2)= Area1.Vtl_CrElt; Pload(3)= Area1.Vtl_MsClg; Pload(4)= Area1.Vtl_MsElt;
Pload(5)= Area1.NVtl_CrClg; Pload(6)= Area1.NVtl_CrElt; Pload(7)= Area1.NVtl_MsClg; Pload(8)= Area1.NVtl_MsElt;
Pload(9)= Area1.MW_load; Pload(10)= Area1.IPNC_load; Pload(11)= Area1.Propulsion; Pload(12)= Area1.HRRL;

--------------------Define a Structure named "Load_Cmds"------

Load_Cmds.MW_cmd=O(9);Load_Cmds.IPNC_cmd=O(10);Load_Cmds.Prop_cmd=O(11);Load_Cmds.HRRL_cmd =O(12);


If you have more questions, please let me know,

0 Kudos
Message 3 of 3