MATRIXx

cancel
Showing results for 
Search instead for 
Did you mean: 

SystemBuild Read From / Write To Variable Block

Hi
I am using MATRIXx 7.0 on Windows NT platform.
I wanted to access and manipulate the same variable defined in Xmath, in SustemBuild model in different superblocks indepedently at different timings.
I used read from and write to variable blocks with same variable name in 2 different superblocks, but instead i end up with having pdm of that variavble name.
So is there any other way to do this ?
 
Thanks
 
Regards
 
Ishant Dave
0 Kudos
Message 1 of 2
(6,816 Views)
There shouldn't be any problem doing this. It sounds as if you do it correct. However I don't understand how you get the pdm. Have you declared the output variable to have the same name as your variable used for read/write? The variable name must be unique and must have the same size as you have decleared in the block, e.g. if you have a scalar the number of outputs of the readvaraible block must be 1 on the number of inputs to the writevariable block must be 1. If you have a 3x1 vector the number of inputs/outputs must be 3.
 
We have a model with nearly 3000 variables which we update with this approach. The nice thing is that you can initiate the variable to any value and start your simulation, if you use the flag vars=2 then the variable will keep its final value after simulation (otherwise it will have its initial value).
 
Hope this helps!
 
/Torbjörn
0 Kudos
Message 2 of 2
(6,809 Views)