MATRIXx

cancel
Showing results for 
Search instead for 
Did you mean: 

Can XmathGet() be called from User Code Blocks?

From inside a User Code Block (UCB) I would like to access some large arrays that reside as variables in the xmath work space. A simple test shows that calling XmathGet() from inside my UCB can indeed access an xmath variable. However, XmathGet() is documented as available only to LNX and UCI files, so I may be using an undocumented feature. Would calling XmathGet() from a UCB be a reliable method, and would it be likely to work in future versions of MATRIXx? It looks like an alternative might be to use SIMAPI RVE, but do I understand correctly that this would require, for example, that I add some do-nothing ReadFrom blocks to my block diagram so the variables I want to access will show up in the list of RVE variables? (I
would rather not have to do that). Thanks.
0 Kudos
Message 1 of 2
(6,755 Views)
Using XmathGet in a UCB is a valid method for accessing the variables in the Xmath data space. LNX and UCI functionality is a way to access the Xmath dataspace from your own program. A UCB is just a special form of your own program.
0 Kudos
Message 2 of 2
(6,755 Views)