Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Logic Simulator manages all child components connection connections 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 /wiki/spaces/TEST/pages/2883710 and a collection of Logic Components.

The configuration result is saved as a an 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 under each adapter.

...

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 lifecycle management if supported by the selected adapter.

Stream Client State

Returns the state of the client.

Note

Content life cycle management is not (yet) supported for most adapters

...

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 unity path to the prelogic component

{{COMP_NAME}} : name of the prelogic component

{{IO_NAME}} : 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 signal 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)

Size

0 = default. When entering 1, following fields appear.

Target Script

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.

Info

{{INST_NAME}} needs to be used in the signal naming rule to apply an implicit naming rule

...

Active controller definition consist consists of two parts. The , the adapter specific connection parameters and the IO definition.

...

Policy Settings

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 into 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 XMLprogram defined in windows if the file exists.

...