2020.1.1500.2 Logic Simulator
Overview
The Logic Simulator manages all child components connection to the gateway adapters.
A Logic Simulator enables Prespective to connect to external logic controllers like PLCs. A Simulator object is a container that manages the connection to an adapter (create link to adapters) and a collection of Logic Components (create link to logic component).
The configuration result is saved as a XML policy file.
In this article you find information on how to setup this manager to establish a connection. Specific adapter configurations can be found here (create link to adapters)
Where to find
The Logic Simulator can be found under Logic.
This will create a PreLogicSimulator in the Hierarchy.
Feature overview
Gateway Settings are adapter-specific, please see the Adapter page (create link) for more information about specific adapters.
Configuration Settings are Twincat ADS specific. If using other external gateways, ignore this section
Simulation Settings |
|
---|---|
Simulator Name | Name used for to identify the simulator. |
Start in Playmode | Automatically start the simulator when entering playmode. |
Stream Connection | Shows the current state of the connection to the external source. |
Content Lifecycle State | Returns the current status of the lifecyle management if supported by the selected adapter. |
Stream Client State | Returns the state of the client. |
Content life cycle management is not (yet) supported for most adapters
Logic Components |
|
---|---|
Logic Component (0) | Shows a list of all child components of this simulator |
Signal Naming Rule Overrides | The naming rule override field can be used to apply the set rules to all connected child components. Increment the size generates a new rule. |
---|---|
Signal Naming rules (#1) |
|
Size | Amount of signal naming rules |
Rule: $ALL |
|
Target | $ALL : this rule applies to all signals within this instance, overruled by all below options $INPUT : this rule applies to all PLC Input signals within this instance, overruled only by a custom rule $OUTPUT : this rule applies to all PLC Output signals within this instance, overruled only by a custom rule $VARIABLE : this rule applies to all PLC Variable signals within this instance, overruled only by a custom rule [CUSTOM] : applies only to the signal with the name [CUSTOM], overrides all other rules |
Sim Name Formatting | Naming used within Prespective to identify the IO Variables that can be used to here: {{SIM_ROOTPATH}} : unity path to the active simulator root object {{SIM_NAME}} : name of the simulator used in unity {{COMP_SIMPATH}} : Unity path to the prelogic component {{COMP_NAME}} : name of the prelogic component {{IO_NAME}} : Name of the IO defined in the signal definition {{INST_NAME}} : variable that can be modified by the instance naming rule |
PLC Address Formatting | Naming used within on the PLC to identify the IO The same variables can be used as in the sim name |
Sim Path Separator | Separator character used in the the Sim Name Formatting “_” by default |
PLC Path Separator | Sepearator character used in the the PLC Address Formatting “.” by default |
Apply Signal Naming Rule Overrides | Overrides the sginal naming rules on all connected child components |
Instance Naming Rule Overrides | One can set the implicit naming rule override in this field per simulation component type. |
---|---|
Instance Naming rule (#0) |
|
Add new rule | Adds a new rule field |
X | Remove this rule |
Delete All | Removes all rules |
Target Component | The component script file on which the naming rule applies
|
Naming Rule | The actual implicit naming rule that should be applied |
Apply Instance Naming Rule Overrides | Applies the set rule to all connected child components with attached TargetScript. |
Update screenshot
A policy file has all the necessary information to connect to the external source. The dataset consist of two parts:
Active Controller Definition and Type Definitions
Active controller definition consist of two parts. The adapter specific connection parameters and the IO definition.
<Server settings example >
< Input definition export example >
< Type Definition export example>
Policy Settings |
|
---|---|
Policy Directory | Path relative to the assets folder for storing the policy file |
Policy Filename | Name for the saved XML file |
Policy Export Settings |
|
Export Type Policy | Exports the type definition for the specific adapter. On by default. |
Legacy Commenting | When on it does not export a Description element. Off by default. |
Comment to Split Signals By Component | Split the IO definition in inputs, output and variable blocks. On by default |
Name And Address On Single Line | Puts the name and address element on a single line,. On by default |
Allow Initial Value | Adds the initValue field in the export. On by default |
Allow Priority | Adds the priority element on the export. On by default |
Export Policy to XML | Exports the file to the given XMLPath provided by the Adapter settings. |
Open Policy File | Opens the exported file with the default xml program defined in windows if the file exists. |
Prespective Documentation