In the symbol table, you can assign descriptive names to the operands used in the system project. As a rule, defining the symbols and assigning them to the operands of the respective device should be the first step when you start a new system project. For this, you should use appropriate and descriptive names. Even if the symbols might be longer as a result. This is because usually you do not have to type the symbols again manually when you use them in the object properties. You can insert them via drag & drop or Intellisense, without any additional typing.
We will show you how to do this in this section.
A symbol entry consists of 5 parts. We will explain these in more detail below.
The operand, for which the symbol name is defined, belongs to the device. The device can be changed, provided that the new device has the same operand. Also, no symbol may be assigned to this operand in the new device. The rewiring to another device can be done manually or via the function "Change the device of operands".
All devices that are available in the project can be selected in the list of devices. You can add new devices to the project using the function "Create a new device".
This is the symbol name for the operand. This should be as clear as possible. You can use the characters a-z, A-Z, öäü, _ and 0-9. The maximum number of characters is 80. The symbol must start with a letter.
When you have defined a symbol for an operand, you can specify this symbol instead of the operand in the properties of the objects. Symbols must be unique within a device; this means that a symbol already used in a device cannot be used again. Please note that there is no distinction made between upper and lower case letters.
This is the operand for which the symbol is defined. The set device determines the available operands.
When you specify an operand, the program creates a list of the data types available for this operand. You can then select the data type. The data type is determined by their use in the virtual system, in particular for digital operands (byte, word, or double word operands). If a word operand, e.g. bipolar, is required, then "Int16" must be set as the data type and not "UInt16". This setting is essential when you consider that PLC-Lab may scale values from system sensors to the value range of the set data type.
When working with analog values in the S7 environment, the data type "S7Analog" should be used in this case. This data type has the value range -27648 to +27648, which corresponds to the analog range of a Siemens S7.
Here you can enter a comment for the symbol. The length is not limited.
The following image shows a symbol table.
Below you can find a description of the individual control elements.
Here you can specify a filter for the elements in the table. Only elements are displayed for which the filter was found in the device name, symbol, or operand name. In the example, "Cyl" was specified as the filter. As a result, only symbols with this component are displayed in the symbol.
When you click on this button, a new symbol is inserted below the currently selected line in the table. The device set in (6) is used. The operand in the currently selected line with an address increased by one is used as the operand. This means that with a bit operand the bit address is increased by one, with byte operands the byte address is increased by one. For word and double word operands, the next word or double word address is set. Provided that this operand does not exist yet. If the new address already exists, the address is incremented until a free operand is found.
If the set device does not correspond to the device of the active line, then the standard operand type of the active device with the lowest address not yet used is used.
The operands can be entered in the German or English syntax. The first active input of an operand sets the syntax language. This means that if, for example, you change the operand "I0.0" to "E0.0", German syntax will be used from now on.
The selected rows in the table are deleted.
The selected rows in the table are moved up or down in position.
The symbols are sorted by their operands and their addresses in ascending order. The sorting always takes place in the respective device. This process cannot be undone.
This list contains all devices available in this project. The symbols and operands inserted in the table are assigned to the selected device. The device operations to the right of the list also refer to the selected device, with the exception of changing the wiring.
When the currently active device has different setting options, you can open the dialog by clicking on this button.
When you move the mouse over this area, a tool tip appears with information about the active device. This includes a short description and the operands that are available in the device.
You can use this button to create a new device, provided that this is supported by the editon of PLC-Lab. The dialog that appears is shown below:
The device type can be selected on this screen. Different types are available depending on the edition.
Once you have selected the type and entered a name, you can confirm the dialog by clicking OK.
After that a dialog appears. Its appearance depends on the selected device type. Below are the links to the description of the parameters to be set:
After confirming the configuration dialog, the name of the new device is inserted in the list and has also been preselected as the active device.
Note: It is not possible to create simulation devices. Depending on the edition of PLC-Lab, these devices are available in the project by default.
When you click on this button, the currently active device with all available symbols is deleted. First a query is made. If it is confirmed, the process is executed. This process cannot be undone.
Note: The simulation devices (Sim, PLCSim, PLCSim300) and the internal memory (IM) cannot be deleted.
We mentioned at the beginning that defined symbols no longer have to be typed in manually when they are used. This is shown below.
In the symbol table the symbol "TasterStEin" was defined for the I0.0 of the device "PLCSim".
Now this symbol is to be used in a switch object that has been configured as a push-button. To do this, place the switch object and specify the device in the property "Operand", followed by a dot. Then press the key combination [CTRL] + [Space]. Now a list with the symbols of the device appears. You can narrow down the list by specifying the first letter. Select the symbol you want to use with the cursor keys (up or down) and confirm with the return key. The selected symbol is then entered as an operand.
These steps are described below:
Another way to add the symbol to a property is by drag & drop.
The starting point is the column to the right of the comment, which is marked with hatching. Click on this cell with the mouse and then start the drag & drop action.
The target is the descriptive text of the property.
As of V1.5.2, the symbol for switch and lamp objects is entered as the object label text in addition to the operand.
For some objects it is possible to drop the symbol directly onto the object using drag & drop. This is the case, for example, with switch objects. When a symbol is dragged & dropped over a switch in draw mode, the operand is used as the switch operand and the symbol is specified in the text field of the switch. You can see this below:
The symbol is selected in the symbol table and the drag & drop action is started via the hatched area. The target in the example is the upper switch object. When the action is complete, the switch has the symbol as its label and the operand is entered as the switch operand. The action is then performed with the "Stop" symbol and the lower switch object.
Once such an action has been executed, a message appears at the bottom edge of the PLC-Lab window for a short time indicating the property in which the operand was entered. For a switch this message reads as follows:
The following icons can be used as targets:
If you have created a system project for a certain device, e.g. an S7-300, and now want to use it for an S7-1500, then proceed as follows:
1) Save the system project under a different name. This is only necessary if you want to continue using the previous system with the old device. 2) Execute the function "Change the wiring of operands to another device" in the symbol table. 3=) A dialog appears. In the upper list "The wiring of the operands from the device:" select the previous device and in the lower list "will changed to the device:" select the new device. 4) Click OK to change the wiring.
After this action, all operands of the old device have been rewired to the new device, if this was possible. If only one operand is not present in the new device, then the action is not executed and an error is displayed. The action can be undone by executing the action again and specifying the two devices with swapped positions.
Note: The rewiring is not only carried out for the operands within the symbol table, but also for the absolute addressed operands of the objects.
If you want to change the wiring of individual symbols in the symbol table to another device, proceed as follows:
1) Select the rows in the symbol table which are to be rewired to another device. 2) Select the new device for one of the selected symbols.
The wiring is only changed if all selected symbols (or their operands) can be rewired to the new device. If not, an error is displayed. Rewiring is only performed with the selected symbols or their operands. Other symbols or operands of the device remain unaffected.
In the following example, the selected symbols are to be rewired from the device "PLCSim" to the device "PLCSim300".
If you only want to change the wiring of certain symbols to another device, you can do this manually in the symbol file.
If you want to change the wiring of all operands and symbols of one device to another device, use the function "Change the wiring of operands to another device". In this case, the operands not present in the symbol file, which are absolutely specified in the properties of the objects, are also included in the rewiring.
The variable table of the TIA Portal can be exported to an XML file. The symbols in this XML file can then be imported into PLC-Lab. The following steps are necessary:
The imported symbols were inserted in the symbol table and assigned to the previously set device.
The Siemens TIA Portal can import symbols or variables from an XML file. To export the symbols from PLC-Lab to an XML file, proceed as follows:
The import/export of PLC variables in the TIA portal can be used with all PLC families S7-300/400 and S7-1200/1500.
The Simatic Manager symbol table can be exported to an ASC file. The symbols in this ASC file can then be imported into PLC-Lab. The following steps are necessary:
The Siemens Simatic Manager can import symbols from an ASC file. To export the symbols from PLC-Lab to an ASC file, proceed as follows:
In the Simatic Manager, the length of the symbols is limited to 24 characters. A maximum of 80 characters is allowed for comments. When symbols are exported from PLC-Lab to an ASC file, symbols and comments are cut according to their maximum lengths.
The WinSPS-S7 symbol table can be exported to an ASC file. The symbols in this ASC file can then be imported into PLC-Lab. The following steps are necessary:
WinSPS-S7 V6 can import symbols from an ASC file. To export the symbols from PLC-Lab to an ASC file, proceed as follows:
In the WinSPS-S7, the length of the symbols is limited to 24 characters. A maximum of 80 characters is allowed for comments. When symbols are exported from PLC-Lab to an ASC file, symbols and comments are cut according to their maximum lengths.