flux_diagram_level_48.gifLogical location

 

Create a logical location tree

Template details

Generate logical software

Error messages during software generation

Example logical location and generating

 

The logical location window can be used to build a logical structure for generating your PLC code. There are 10 levels available to create a structure. After the logical structure is ready, templates can be dragged and dropped on the appropriate levels. After that, project typicals (which are available in detail window 'Project typicals') can be dragged and dropped on the appropriate templates. Detail window 'Template details' shows information about the template you select in the structure. A file viewer is available to show the selected (template) typical.

 

See also:

Logical typical

Logical module

Create a logical location tree


A tree like structure can be created by using ten location types:

 

The logical location tree can be created by drag and drop location types from detail window 'Location types' onto the main window. Every location must have a unique name. Additionally, you can fill in a description. After the tree is ready you can add templates to the locations from detail window 'Library'. Every template must have a template type. Within a location, the templates must have a unique template type. As you can see in the below picture, you cannot add two templates with the same template type to a location. However, it is possible to add a template two times to a location with different template types.

 

If the lock box on a template is selected this template cannot be removed any more. However the typicals inside the template and the location levels can be removed and the template will be removed if the levels above it are deleted.

Also it is not possible to change or add typicals in this template.

 

 

After the templates are linked to the locations, project typicals can be dragged and dropped on the templates from detail window 'Project typicals'. The collection of project typicals are all the logical typicals which are available in the project. The criteria of these typicals are:

 

You can easily select items in your Product Structure window. This can be done manually or automatically with Variants and Options.

 

You can only drop typicals on a template if the template and typical(s) have the same template type.

 

 

Notes:

1. You cannot add a location type to a location which is a lower location type. For an example: a level 5 location cannot be placed on a level 7 location.

 

Automatic divide

It is possible to create a tree like structure and place all the project typicals automatically. Therefor you need to configure a logical location format and select this location format in your project settings. After that, you can use the Divide button to divide all the project typicals. You can choose if you want to divide all the typicals or only the selected typicals. For more information about automatic dividing we refer to organizing automatic divide.

 

 

See also:

Logical template

Logical template type

Project settings

Template details


Depending on which template you select in the logical location tree, this detail window shows the attributes of the selected template. The file viewer will show the template typical of the template.

 

Generate logical software


After the location tree is ready and the typicals are divided on the appropriate templates, you can generate the software by pressing button Generate. A new pop-up window will appear:

 

 

Here you can set some settings before generating. You can choose which plug-in you want to generate for and whether you want to create subfolders during generating. It is also possible to generate a part of the tree. For an example in the above image, we can choose to only generate level 'Sorting 1'. Therefor we need to select level 'Sorting 1' before clicking button Generate. Then only the selected level and levels below this level are generated. If you want to generate a single file, make sure you select check box 'Single file'. You must also specify an output path.

 

Plug-in

Choose which plug-in you generate for, (only one plug-in can be selected)

Output path

Specify a path were the output must be placed. (if single file is selected, no output path can be selected)

Generate what

Choose whether you want to generate the whole logical location tree or only the selected location type (sublocations included).

Single file

Choose whether you want to generate one single file.(when generating to a single file a path + filename + extension can be chosen)

Subfolders

Choose whether you want to generate subfolders (for each level a folder,and folders in folder).

Generate style

Choose in which sequence the tree will be generated. From the top location(s) to the bottom (lowest locations), or from the bottom to the top location(s).

 

After clicking the 'Generate' button, Typical Manager will start generating the templates with their associated typicals. If a location contains more than one template, Typical Manager will use the sequence number of the templates to determine the order of the templates to generate.

 

When generating to different files (Single file not selected) a file will be created for each template.

The filename is determined by a 'template file expression' which can be changed by plug-in.

 

If the expression is left empty a default filename is created: 'Templatetypical name'_'location name'

e.g. template typicals is 'HelpFile' and the template is located on location 'Level_1' the filename will be 'HelpFile_Level_1'

 

wether an expression is used or not, the file extension always the extension of the original template typical file.

e.g. a .txt is imported and used as a template typical, en generated file will also get .txt as its extension.

 

 

Notes:

1. You only can choose 'Subfolders' if option 'Single file' is not selected.

2. If empty attribute fields are generated, it is possible that the attribute itself is not selected in the Tag configuration.

 

See also:

Logical template

Logical template type

Error messages during software generation


In case software generation fails, a message dialog' Error generating files!' will appear. There can by multiple causes why software generation fails. The most common are:

 

Message

Possible cause

Solution

Could not find a part of the path '...'

One or more location types contain a '\'or '/'in their names.

Remove any '\' or '/' from logical location names.

One or more location types have a name that is reserved by the Windows operating system.

Reserved names are:

AUX, COM1..9, CON, LPT1..LPT9, NUL, PRN.

Rename any logical location that uses a reserved name.

Illegal characters in path.

One or more location types contain characters that can not be used in filenames in the Windows operations system.

These characters are: / \ : * ? < > |.

Rename any location type that uses any of these characters:  / \ : * ? < > |

The device is not ready

The output is directed to a drive that can not write the data. e.g. a CD-RW drive that does not contain a writable CD.

Insert writable media to the device or change the output path.

Example logical location and generating


Our logical location tree looks like this:

 

 

We have one ‘Level 1’ location called ‘Production line 1’, which contains two ‘Level 2’ locations and a template called 'PLC Code':

- Area 1

- Area 2

- PLC Code

 

The template contains six typicals.

 

Location ‘Area 1’ contains a ‘Level 3’ location called ‘Process cell 1’. This Process cell 1’ location contains a template which contains four typicals.

Location ‘Area 2’ contains a template called 'Dummy', which contains two typicals. This dummy template does not contain a template typical.

 

Now we are going to generate the logical location tree. Remember we have a dummy template on 'Area 2' without a template typical.

 

 

Plug-in

Our plug-in is ‘Logical_Siemens_S7’.

Output path

The files will be generated to ‘C:\’....\Desktop\TMExport\Generated

Generate what

We want to generate the whole logical location tree,

Single file

We don’t want to generate the PLC code in one file, but in separate files.

Subfolders

We do want a folder for each location.

Generate style

Begin generating on the lowest layer of the logical location tree.

 

While generating the tree, the typicals connected to the templates will be placed in the template typical and the variables will be filled with data. The typicals of location ‘Production line 1’will be collected by template 'PLC Code' of this location. The typicals of location ‘Process cell 1’ will be collected by template 'PLC Code' of this location.

 

Warnings

But location ‘Area 2’ also contains typicals and this location contains the 'Dummy' template, which does not have a template typical to place the typicals. In this situation, the typicals of this location will not be generated. After generating is finished, a pop-up window will appear like in the picture below. As you can see, in the generation info you can find the warnings. It tells you that 'No valid section' is found for the typicals. A section is a place in a template typical were the template can collect typicals (e.g. <!CM_VARIABLE!>).

 

 

In case our 'Dummy' template would contain a template typical which cannot place the typicals of 'Area 2', we also would get 2 warnings. In case our 'Dummy' template would contain a template typical which can place the typicals of 'Area 2', the typicals should be collected by this template.

 

See also:

Logical typical

Logical template

 

Output

The output is placed in the following structure (subfolders). No map is created for location ‘Area 2’ because nothing is generated in that location. Download the output files here.

 

 

Production line 1

The typicals of the following tags in the following order are collected on this location:

- S1-M01

- S1-M02

- S1-M03

 

A file called ‘10_TEM_FB_CM_MOD_Production line 1.awl’ is generated. This is a part of the output of location ‘Production line 1’:

 

 

Process cell 1

The typicals of the following tags are collected on this location:

- S2-M01

- S2-M02

 

A file called ‘10_TEM_FB_CM_MOD_Process cell 1.awl’ is generated. This is a part of the output of location 'Process cell 1':

 

 

 

If we generate without subfolders we get the following structure.

 

 

If we generate to one single file, we get the following structure. One file is created called ‘SwGenYellax Help File.txt’. If you choose to generate to a single file, the option of subfolders will be disabled. With 'Generate Style' you can choose which locations should be generated first to this file.