In this section you will find some tips for drawing and simulating systems.
Use only operands from the symbol table¶
In PLC-Lab it is possible to specify operands with absolute addresses in the properties for operands within the objects as well as the symbols of operands which were previously defined in the symbol table.
We recommend that you enter an operand in the symbol table and assign a symbol there before using it in an object property.
This offers several advantages:
- By assigning a usage-related symbol, readability is improved when using the operand within a property. For example, it is obvious how an operand with the symbol "Lamp control ON" is used within the system.
- You can drag & drop a symbol directly from the symbol table into the property of an operand. The name of the device is added automatically.
- If the operand is inserted into the property of an operand using Intellisense, the symbol can be selected directly from a list. An absolute operand must always be entered entirely by hand.
- When you insert a new operand, the next free address is always inserted automatically. This prevents that operand areas in the symbol table from overlapping.
- Within the symbol table, individual operands can be specifically assigned to another device, provided that the target device also has this operand range.
- The symbol of an operand can be changed centrally in the symbol table. This means that all places of use of the symbol within the objects are automatically updated.
- If the operand address of a symbol is changed, the new address is automatically updated at all places of use within the objects.
The following link describes how to enter symbols into the properties of objects with as little typing as possible: Using symbols in objects
Construct new system with operands of the Debug-Device first (from version 126.96.36.199)¶
From version 188.8.131.52 the debug device is available in PLC-Lab. This device also allows the control of outputs. The output operands of the debug device can be influenced directly via for example switch or push-button objects. Thus the reaction of the virtual plant can be tested directly without PLC program (or Grafcet).
If the behaviour of the virtual plant is as expected, the debug operands can be replaced by the corresponding device operands (PLC or Grafcet). This is achieved by rewiring within the symbol table: See also: Changing the wiring of symbols
If you want to process data only within the PLC-Lab system, the flag operands of the IM-Device are used.
The following procedure is recommended:
- Create or import the symbols required for the plant and assign the symbols to the debug device.
- Use the symbols within the objects of the virtual plant.
- Influencing the desired debug output operands for example via switch objects to test the reaction of the actuators in the virtual plant.
- After the virtual plant is completed, the operands of the debug device can be rewired to any other device using the rewire function within the symbol table: See also: Changing the wiring of symbols
Construct new system with operands of the Sim-Device first (up to version 184.108.40.206)¶
If a new system is developed and it is a slightly more complex system, then input operands of the Sim device should first be used for the actions in the system and not, for example, output operands of a PLC, which can only be switched over via the PLC program. The input operands of the Sim-Device can be influenced directly via e.g. switch or push-button objects and thus the reaction of the virtual system can be tested directly without a PLC program (or Grafcet).
If the behaviour of the virtual system is as intended, the Sim input operands can be replaced by the respective device operands (PLC or Grafcet). Then the actuators of the system can also be changed to the output operands by changing the input operand in the symbol table to an output operand.
If you only want to process data within the PLC Lab system, use the flag operands of the IM device.
We recommend the following approach:
- Create the symbols for the Sim input operands, which are to replace the output operands in the development phase of the virtual system.
- Use the symbols within the actuators (e.g. cylinders) of the virtual system.
- Influence the Sim input operands via e.g. switch objects in order to test the reaction of the actuators in the virtual system.
- When the virtual system is completed, the respective input operands are changed to the real outputs of the target device in the symbol table. You can also use the "Crossreference of the used operands" to identify the objects with the Sim input operands.
- Now the operands of the Sim device can be rewired to any other device, if necessary, using the rewire function within the symbol table. Rewiring operands to other device
Limit switches: change color depending on status¶
If a limit switch is placed in a system, it is a proven method to also specify the limit switch operand in the property "Operand switching fill color".
In this way, the status of the limit switch operand can be recognized immediately during simulation.
Cylinders: Place lamps for the limit switch operands¶
When using cylinders and their limit switches, you should additionally place two lamp objects where the limit switch operands are specified. During the simulation, you can immediately see whether the cylinder is in a particular end position and whether the associated limit switch is activated.
Analog values: Show them in labels as well¶
If you have used analog sensors or default values in a system, e.g. the position data of a prismatic joint or the spin velocity for rotations, it is usually helpful to display the numerical values of the digital operands in a label.
You can find out how to do this by clicking on the following link. Displaying the value of an operand in a label