Scripted Element “Simulation” tab

scripted_element

#1

A Scripted Element has 4 main components:
•a Property Editor
•a list of Ports
•a list of Results
•a Simulation Script

The “Simulation” tab contains 4 sub-tabs: Setup, Ready, Go and Wrap-up. This is where the user defines the scripts for the element. The scripts define the properties and functionalities of the scripted element. Please note that:
• The scripts only have access to the scripted element’s own properties (ie. those defined in the Property Editor). It does not have access to workspace variables (ie. those defined in the script prompt or in a script file). In addition, any variables defined in the scripts cannot be obtained from the script prompt or from a script file. If you want to access to the workspace variables, you can duplicate the variables in the Property Editor of the Scripted element.
• The scripts can be debugged by pressing the TEST button. If there are no syntax errors or break commands in the script, you will see the line “script complete” in the script output. If there is a syntax error, the location of the error will be given in the script output. An example of an error message is:
syntax error: prompt line: 38.

SETUP
• The setup script can be used to set the properties of the scripted element. Often, this is done through the setsparameter script command (which sets the s-parameters between the output and input port of the scripted element).
• The setup script is ran once at the initialization stage.

READY
• The ready script defines the criteria necessary to propagate the data.
• It is not necessary to define the ready stage.

GO
• The go script defines what data to send to the output ports.
• It is not necessary to define the go stage.

WRAP-UP
• The wrap-up script can be used to post-process the data at the end of the simulation.
• The wrap-up script is ran once at the wrap-up stage.
• It is not necessary to define the wrap-up stage.

Please check out the New Scripted element in INTERCONNECT 2016a for more information.