Posted Tue, 30 Jul 2013 16:18:14 GMT by Fani Sourla
I would like to change a variable and turn it into a manipulated variable. I tried to do it through the Model Editor but I don't really know which file to open and every time I try to open the file: name.cpp.msl the program does not respond. What do I have to do?
Posted Tue, 30 Jul 2013 22:07:24 GMT by Enrico Remigi WEST Product Owner
Do you mean: "change a [b]parameter[/b] into a manipulated variable"? This essentially allows for changing the value of a 'model parameter' dynamically (e.g. via a controller or an input). A variable is computed (~ output) thus changing it into a manipulated variable (~ input) may require considerable changes to the model.
What you need to do is:
1) change the OBJ definition to interface variable, use the annotation 'manip=1' and set the causality to 'CIN'
2) replace all the occurrences of 'parameters.<OBJName>' by 'interface.<OBJName>'
Which files you need to work on depends on the 'level' at which the parameter is defined:
a) if at a submodel's level, you may need to only work on one file
b) if it is one of the category-specific parameters, you will need to work on many of the matrix-related mal files: *interface.msl, *parameters.msl, ..
The cpp.msl file are of no relevance in this context.
Posted Wed, 31 Jul 2013 07:21:57 GMT by Fani Sourla
Thank you! Well, the thing I am trying to do is to set a Dewatering Unit and I would like to give as an input the dry solids and not the Q_concentrate!  I tried to do it through a controller which I connected with a sensor after the Dewatering Unit but the program gave me this message: "Building the model encountered errors. See logging for details."
So, the question is if it is possible to set the variable DS(Dry Solids) as an input to a Dewatering Unit!!
Posted Wed, 31 Jul 2013 10:09:36 GMT by Enrico Remigi WEST Product Owner
I guess the error has to do with an algebraic loop. But you can actually check this by looking at the Logging, as the error message suggests - you may need to scroll up in the Logging pane to spot the line that issued the message.
To answer your question: if you want to have DS as an input (interface var) as opposed to as an output (state var), you need to rewrite the model in a suitable way, e.g. compute Q_Concentrate based on DS instead of the other way round.

You must be signed in to post in this forum.