Ecosim Pro adapter - User manual
Table of Contents
- General
- Set-up and Initialization
- Getting Started
- Mode Selection and Control
- Normal Operations
- Normal Termination
- Error Conditions
- Recover Runs
TODO : Work in progress This guide is to explain step by step the process to transfer values or objects from Cameo System Modeler/MagicDraw to COMET.
Before continuing further, please be aware of the limits of the adapter and of the troubleshooting page in the event an error should happen during the process.
General
To start the adapter, just run the executable from the unzipped folder.
Set-up and Initialization
To connect to an OPC UA server, you will need access to a server. If the server you want to connect to is hosted locally, either run “run_deck_win64[your target platform].bat” or run the server script from EcosimPro from a compatible deck. When generating the OPC UA server, the attached experiment needs to contain the following statements, so the OPC UA server does not contain any experiment integration at start up.
BODY IMETHOD = IDAS TIME = 0
IF (deckIsEnabled()) THEN
//empty, the experiment is to be controlled by the adapter
ELSE
CINT = 0.1
TSTOP = 15.
INTEG()
END IF **Figure 1** EcosimPro experiment Body
Getting Started
From the main window connect to a e-TM-10-25 model. Once this is done, you should be able to browse the ElementDefinition tree. You can then now open a connection to an OPC UA Server. After this step you can browse the Variable from the EcosimPro model and run the experiment.
Mode Selection and Control
From the main window of the adapter, it is possible to:
- To switch transfer direction,
- To view messages on the status bar,
- To visualize trees from both models,
- To refresh the E-TM-10-25 session,
- To Connect/Disconnect from data sources,
- To preview the net change,
- To visualize the exchange history,
- To change the stop step (TSTOP) and step size (CINT) of the experiment,
- To run the experiment
Security wise, login to a E-TM-10-25 source can be done with your COMET® login/password which your model administrator can also provide. The connection to a OPC server is usually authentication free, if not you will need to get in touch with the person who created the OPC UA Server deck binaries.
Normal Operations
The EcosimPro adapter allows to specify the experiment sampling stepping (CINT) and the step stop (TSTOP). In order words it lets you determine the up boundary of the experiment time and the number of step where Variable values are retrieved. With these inputs the adapter can run the experiment by the meanings of getting all the Variable values for each step (CINT) until step stop (TSTOP). Changing the CINT and the TSTOP is not allowed until the experiment is reset. It is also possible to pause and to reset the experiment. The EcosimPro adapter lets you transfer values from any E-TM-10-25 Parameter that has at least one value in its ValueSets to an OPC UA Variable that has write access.
- You can map from one scalar actual value to any compatible OPC variable
- You can also map from a SampledFunctionParameterType to an OPC array variable.
- The SampledFunctionParameterType and the array variable must be compatible by their size, or number of values they hold.
- If the previous requirement is fulfilled a dialog lets the user decide which column of the SampledFunctionParameterType to map to which column of the array variable Remark: the way EcosimPro generates OPC UA Decks with array variables is not the way OPC UA intends to serve arrays, so it might evolve in future EcosimPro versions. The EcosimPro adapter also lets you transfer pairs of values/experiment time from any OPC Variables in different manners:
- You can choose to import all the recorded values or a selection for one chosen Variable to an existing or a new E-TM-10-25 Parameter or ParameterOverride of type SampledFunctionParameterType or ScalarParameterType.
- The selection of the recorded values can be made manually or by specifying a time interval to respect between each value. When specifying a time interval, it is possible to select an average value for selected record.
- In the case the target Parameter is not an override, the Element Definition container can also be non-existent in the target model, it will then be added.
- In the case you want to update a Parameter Override, it is possible to choose multiple Element Usages from one Element Definition. Then every override of one Parameter of type of the Parameter Type that you chose will be updated.
- If only one value from a Variable is selected:
- A SampledFunctionParameterType can be picked.
- An existing Parameter of type of the selected SampledFunctionParameterType will be updated.
- Or in the case no Parameter of type of the selected SampledFunctionParameterType exists a new one will be created.
- A ScalarParameterType can be picked. Then if the ParameterType is compatible with the value type of the current variable.
- An existing Parameter of type of the selected ScalarParameterType will be updated.
- In the case no Parameter of type of the selected ScalarParameterType exists a new one will be created.
- A Parameter can be chosen, then its value will get updated.
- A SampledFunctionParameterType can be picked.
Important to note that every SampledFunctionParameterType made available in the adapter have been created before in the connected model. The usable SampledFunctionParameterType types follow the following rule:
- It should have only one IndependentParameterType and only one DependentParameterType
- The IndependentParameterType must be of a type that can hold decimal positive number.
- The DependentParameterType must be of QuantityKind type or TextParameterType.
The previous operations register themselves in a process where once you have defined what value to transfer to what destination, you have the possibility to preview the impact on the target model, but also to filter those impact view based on a selection from the source model. In the different impact views, it is possible to select the mapped things you want to transfer. In the context menu, two actions are available:
- To select all mapped things.
- To deselect all mapped things.
In the Mapping panel, you can observe computed value differences for all parameter of mapped Element Definitions and Usages, when the mapping from the EcosimPro OPC server to the Hub. Then you can transfer your mapped values to their configured destination. When you choose to transfer, the mapped values are then transferred to the configured target model. In the case anything goes wrong at this stage, you can cancel, and it will delete every configured mapping in the state of pending to transfer.
Normal Termination
After all transfer are complete the tree views are refreshed showing Parameters and Variables with their new value. From the main window terminating the program is simple in the way that the OPC UA session and the E-TM-10-25 session are closed by the program automatically.
Error Conditions
In the case one or the other session cease to live, for example if the server is not responding, or the connection dropped, the attempted transfers will fail, and you will see a notification in the status bar.
Recover Runs
If the OPC UA session is unexpectedly closed, no pending transfer to a Variable is lost, and you might want to reconnect the same way you first connect to the OPC UA server. If the E-TM-10-25 server is not responding, you will notice it when attempting transfer in this direction or if you try to refresh the session. You might want to reconnect to the COMET® server the way you connect the first time. If there is any pending transfer to E-TM-10-25, you can attempt them, but you will most likely have to cancel the transfer is any error are raised. In the case where a transfer fails, the defined mapping is lost if the mapped elements have never been transferred. After transferring some mapped elements and if no mapping configuration were loaded or created before. It is still possible to save the mapping by means of creating a new mapping configuration and letting the adapter add the mapped element to the configuration. It also possible to create a new mapping configuration to clear the current mapped elements.