Paths in SimTalk

Once different objects are not located within the same Frame, i.e., within a different name space, you have to add a path to the object. Only then the object is identified in a unique manner and you can access it in a Method.

A path consists of a sequence of names separated by a period:

[.]name[.name.name[...]]
Note:

Square brackets designate optional components or parameters, meaning that you can, but do not have to enter them.

The syntax diagram of a path looks like this:

The Syntax of the individual methods might look like this:

<Path>.readFile(FileName:string[, NoDebugger:boolean:=false]) → boolean
  • The expression <Path> designates the path of the object to which the method applies.

  • The signature of the method, consisting of the identifier and the data type of the parameter, is listed in parentheses. The expression (Parameter:string), for example, designates a parameter of data type string. Instead of a constant value, you can also use a variable of the required type or a method that returns the required data type.

    Optional parameters are listed within square brackets. The expression [,Parameter:boolean], for example, means that you can, but do not have to enter the boolean parameter.

    Note:

    Make sure to enter the parentheses for expressions within parentheses (…). Not entering them may lead to unexpected results and open the Debugger.

Plant Simulation distinguishes between two kinds of paths.

  • The Absolute Path lists all names of the folders and Frames located above the Frame containing the object of your choice in the hierarchy in the sequence they appear. The absolute path starts with the Class Library: .Models.MyPlant.Engine_Assembly_Anytown.MyStation

  • The Relative Path starts in the current name space and identifies an object by a combination of built-in methods and names. In most cases the relative path starts with a Frame: MyPlant.Engine_Assembly_Anytown.MyStation

  • In addition you can access a variable of data type Object using an Object Reference.