Objects in PLC-Lab

The objects of PLC-Lab are listed in a tree structure within the tools. These are sorted by category. For example, the category "Lamps" contains all lamp-like objects such as indicator lights, LEDs, stack signal lights, etc. You can use all the objects in the list to set up a virtual system in PLC-Lab.

After placing an object on the drawing area, you can change the properties of the object and thus adapt its behavior to your requirements.

If you are not yet familiar with how you draw a system, you can read the most important operating instructions in the following section: Tips and actions for drawing a system

Now we will explain the various object types.

In this section you will find switch objects in different forms. In the existing categories these are partly preconfigured in different colors. The colors and settings are not permanent, they can be adapted in the properties to your own needs. Switches are mostly used to influence a bit operand. These can be designed as push-buttons or switches. You can select this via the property. They can also be configured as either a closer or an opener. All switch types are derived from the same original object. These are preconfigured for special tasks only by the settings. This means that you can change all switch types to another switch type by changing the properties.

Switches are not physics objects by default, so they are not visible to the physics engine. You can change this if necessary. Only the properties "Physical type of object" and "Is physics object" as well as the other physics properties have to be adjusted.

A switch cannot only write the values '0' and '1' into an operand. By specifying a range, for example, the value '100' can be written into a byte operand when it is actuated. To do this, you need only this specification:

0-100 IM.MB10

When the switch is actuated, the value 100 is written to the byte operands MB10 (if it is configured as a closer).

This type of switch is intended as a switch that is not illuminated. They are typically used to set a bit operand to the value '0' or '1'.

This type of switch is illuminated. In addition to the operand to be influenced, an operand can also be specified, which is evaluated for the illumination. For this purpose, the property ">Operand switching fill color" of the respective operand is specified within the property rubric "Appearance -> Colors". However, this specification is not mandatory.

The rotary switch displays a graphic within the switch object that symbolizes a rotary switch. The two graphics for status '0' and '1' are specified in the property sections "Appearance -> Images". If it should be necessary to change the rest position of the switch, then both graphics can be changed.

As the name suggests, a button with the appearance of a Windows button is shown. The settings of this button are limited. For example, no graphics can be set. It is also not possible to specify a hotkey.

The horizontal switch shows a graphic inside the switch object that symbolizes a horizontal switch. The two graphics for status '0' and '1' are specified in the property sections "Appearance -> Images".

If you want to customize a switch object with your graphics for the individual switching states, proceed as follows:

  • In the properties section "Appearance -> Colors", set the fill color and the line color to fully transparent. You can do this by setting the opacity of the color to 0%.
  • Now select an image file for the status '0' and the status '1' in the properties section "Appearance -> Images". If you want to use vector graphics (XAML file), you can specify those in the properties section "Appearance -> Vector graphics".

The first point of the list is only necessary if the "normal" switch object should not be visible anymore. But if you use a PNG-graphic with transparent areas, you may want to keep the normal switch visible.

This is described and an example shown here: Using of graphics in objects

All switch types with the exception of the Windows button can be provided with a hotkey. You can specify a letter a-z or a number 0-9 at the property "Hotkey" within the category "Main settings->Button properties". In the simulation the button can be activated with the mouse or this hotkey.

This also makes it possible to operate several switches simultaneously by selecting a different hotkey for each of them and then pressing them on the keyboard at the same time. This means that two-hand activations can be implemented in the simulation.

In this category you will find lamp objects in different forms. In the existing categories these are partly preconfigured in different colors. The colors and settings are not permanent, they can be adapted in the properties to your own needs. Lamps are typically used to indicate the status of a bit operand. All lamp types are derived from the same original object. These are preconfigured for special tasks only by the settings. This means that you can change all lamp types to another lamp type by changing the properties.

Lamps are not physics objects by default, so they are not visible to the physics engine. You can change this if necessary. Only the properties "Physical type of object" and "Is physics object" as well as the other physics properties have to be adjusted.

A lamp cannot only evaluate the values '0' and '1' of an operand. By specifying a range, it is possible, for example, to specify the threshold value for a byte operand from which the lamp is illuminated.
To do this, you need only this specification:

0-100 IM.MB10

In this way, the lamp is not illuminated until a value >= 100 is present in byte operand MB10.

Lamp objects can additionally be provided with operands which generate a flashing or pulsating appearance. If, for example, the condition is fulfilled for the lamp to be illuminated and also the condition for flashing, then the lamp is flashing. The properties to be assigned have the names "Operand flashing" and "Operand pulsating".

These types of lamps are used as indicator lights on control panels. Different colors can be selected within the category. If necessary, you can adjust the colors.

These lamp objects have a round LED-like appearance. Different colors can be selected within the category. If necessary, you can adjust the colors.

These lamp objects have a rectangular LED-like appearance. Different colors can be selected within the category. If necessary, you can adjust the colors.

You can use these objects to build stack signal lights. In this section the individual parts of a stack signal light are available in different colors. A stack signal light with a single lighting element is also available. If necessary, you can adjust the colors.

It is not possible to customize lamp objects with your own graphics for individual statuses. For this you can use the objects in the geometric shapes.

If, for example, you select an ellipse as a decoration object, you can select an image file for status '0' and status '1' in the properties section "Appearance -> Images". If you want to use vector graphics (XAML file), you can specify those in the properties section "Appearance -> Vector graphics".

This is described and an example shown here: Using of graphics in objects

In this section you can find a rectangular object which is preconfigured as a static physics object. Also, the property "Neutral while collision" is set. This means that the object "notices" the collision with another physical object, but exerts no force on it. In the property section "Limit switch settings" you can find the property "Limit switch operand", where you have to specify the operand to be switched in case of a collision. In this property section you can also select whether the limit switch is to be designed as an opener.

In this context, we would like to point out the possibility of creating collision groups. You can find the settings for this in the properties section "Advanced settings->Physics properties->Collision settings". You can find more information about collision groups in the following section: Using collision groups

As of version 1.5.1.0, a limit switch (or a geometric physics object) can be set so that the collision group of the colliding object is changed in the event of a collision. The two properties "Limit switch changes collision group" and "New collision group on collision" have been added.

The functionality is activated using the "Limit switch changes collision group" property. You have to specify the new collision group to be set in the "New collision-group when collide" property. The entry is made as a constant or variable, e.g. using a word operand (e.g. IM.MW2). When an object collides with the limit switch, the object is assigned to the new collision group. When a body consisting of several objects collides with the limit switch, then all objects of the body are set to the new collision group which belong to the collision group of the object that collides with the limit switch.

Example: A body consists of 4 objects. Two objects belong to collision group 1, the rest to collision group 2. Now an object of collision group 1 collides with a limit switch. Now only the collision groups of the two objects with collision group 1 are changed. The other two objects remain in collision group 2.

You can find more information about collision groups and the change of the collision group in case of a collision with a limit switch in the following section: Using collision groups

Tip: Every geometric physics object can be configured as a limit switch. All you have to do is select or assign the relevant properties in the property section "Limit switch settings".

The objects in this section are the universal elements for drawing a virtual system in PLC-Lab. These objects offer a large number of setting options. There are three different shapes to choose from. These in turn are divided into three categories.

These objects are subject to physics. They are subject to gravity and can be moved by conveying elements. The objects are used to build the moving parts of a system. They also form the individual parts that can be combined to form a solid body. These objects are also used for the moving parts of joints.

If you want to create an installation from a bird's eye view, you need the dynamic objects without gravity. To do this, deselect the "Depends on gravity" option in the properties of the object in the "Physics properties" section. As a result, the object moves in a zero-gravity space when the simulation starts. However, this also means that the object moves practically unrestricted when a force is applied, unless it is stopped by another object. You can see this below:

In our example, the blue rectangle is pushed and accelerated by the cylinder. It then moves to the right until it collides with the stationary object.

If you do not need this, you can set a damping of the linear and rotational movement as of PLC-Lab version 1.5.0.9. You can find the settings for this in the properties section "Advanced settings->Physics properties->Damping settings". In the following example, a linear and rotational damping with the value 20 was set in the dynamic object:

With the preset damping, the blue rectangle is shifted to the right by the cylinder, but then remains in this position.

In the next example, the blue rectangle is also damped and can therefore be moved back and forth by the cylinders.

These are also physics objects. However, they are not dynamic; they remain at the position where they were drawn. Typical examples are guide rails, static stops, and walls. When dynamic objects collide with static objects, their movement is interrupted abruptly. This is similar to the influence of a billiard table's cushion on the balls.

These objects can also serve as "anchor objects" for the objects moved by joints.

These objects are used as decoration for the virtual system. They can be used, for example, to cover other parts of the system. They are purely visual and have no function. Because these objects are invisible to the physics engine, they do not influence other objects. Typical for this object type are covers or background graphics.

Objects in this category are used for the construction of tube systems. The objects have the property "Operand switching color", which can be used to visualize the flow of a medium. If required, you can change the color used for this in the property section "Appearance -> Colors". Because you can rotate the objects as you wish, the display options are very versatile.

These objects are not physics objects by default; however, you can change this if necessary.

In this category you will find cylinder objects with different characteristics.

This is a single-action cylinder acting with spring. So if the operand has the status '1' for the movement of the cylinder in one direction, the piston rod will be moved in this direction. If the operand has the status '0', the piston rod moves back.

The spring therefore always acts in the direction of movement where no operand is specified. The specification of operands for both movement directions makes no sense for this type of cylinder.

In the following illustration, the operand for moving the cylinder to the maximum was specified. The operand has the status '1' when the push-button is pressed.

This means that the cylinder moves back if the push-button is not pressed.

This type of cylinder supports the specification of operands at both directions of motion. The force of the cylinder in the respective direction of motion is present as long as the operand has the status '1'. If, for example, such a cylinder moves a load upwards during the movement to maximum and the operand for the movement to maximum changes to status '0', then the load pushes the piston rod downwards again. You can see this below:

This type of cylinder supports the specification of operands at both directions of motion. If none of the operands has the status '1', the cylinder remains in its current position. The force of the clamping unit corresponds to the maximum force of the cylinder.

If, for example, such a cylinder moves a load upwards during the movement to maximum and the operand for the movement to maximum changes to status '0', tthen the cylinder retains its position. Only when the load becomes too large, will it push the piston rod down again. You can see this below:

The cylinder types available within the category "Cylinders" all originate from the same cylinder object. These are only preset according to their type. The cylinder type can always be changed. To do this, change the property "Type of the cylinder" in the property section "Cylinder movement settings".

Objects can be attached to the piston rod of a cylinder. Often an unbreakable solid joint is used.

The following video shows how a container is firmly connected to the piston rod of a cylinder.

Example: Attaching an object to the piston rod of a cylinder

In the standard setting, the cylinder body is static, i.e. it cannot be moved. However, you can change this. If, for example, you want to attach a cylinder to the piston rod of a different cylinder, you can adjust the "Physical type of the object" property in the "Cylinder body physics settings" property section accordingly.

The following video shows an example in which an additional cylinder is firmly attached to the piston rod of a cylinder. An unbreakable joint is used for this.

Example: Cylinder 1 is attached firmly to the piston rod of cylinder 2

The cylinders in the cylinder section were created with the help of the joint element "Prismatic joint". If you cannot find a suitable object for your application in the cylinder section, you can assemble a cylinder-like object using the "Prismatic joint". This joint element is described in more detail below together with the other joint elements.

As of version 1.5.2 of PLC-Lab, the position of the piston rod at maximum is also displayed for a cylinder object in draw-mode. This makes it easier to place the cylinder correctly.

The vertical line at the end position is also a measure of the thickness of the piston rod.

This object can be used to create conveyer belts, air currents, etc. A conveying element influences objects that depend on the conveying element as long as they are in the area of the conveying element.

The mode of action of the conveying element is best described with an air current. If an object is in the area of influence of the conveying element, the object is deflected in the direction active in the conveying element. You can see this in the following example. A circular dynamic object falls from above into the sphere of influence of a conveying element. With the help of the switches right and left, the direction of movement of the conveying element can be switched on.

You can see how the circular object is deflected in the respective direction. If no direction of movement is active in the conveying element, the circle remains unaffected.

If you want to use the conveying element to create a belt, a static physical object is placed below the conveying element, which stops a dynamic object so that it remains within the sphere of influence of the conveying element. You can see this below:

Conveying elements can be rotated. This also rotates the direction of movement. As can be seen in the following example. The right conveying element has been rotated by 45°. In the conveying element, the movement to the right was permanently switched on with constant '1'. As a result, each object that is dependent on the conveying element is immediately influenced and deflected upwards or accelerated by 45°.

Dynamic physics objects in which the property "Object will be influenced by a conveying element" is active can be influenced by a conveying element. If this property is not selected, the object does not "feel" a conveying element.

In addition, collision groups can be used to select which objects are influenced by which conveying element. For example, if there are overlapping conveying elements.

In the following example, the blue conveying element only transports objects of collision group 1, while the reddish conveying element only influences objects of collision group 2.

You can find more information about collision groups in the following section: Using collision groups

As of version 1.5.0.9 of PLC-Lab, different types of conveying elements are available. It is always the same object, but settings have been made in the object which makes it ideal for certain applications. Two types are available:

  • Conveyer belt
  • Air current
  • Conveyer belt with guide rail (as of V1.5.2)

This object is preset for the design of conveyer belts. It can be used for belts in top view or side view. If objects are transported by the conveyer belt that are dependent on the conveying element, they are restricted in their own dynamics, which is comparable to the friction of the belt with the objects. The two properties "Damping of the linear movement of the transported objects" and "Damping of the rotation movement of the transported objects" are crucial for this behavior. If you want to increase the effect of these properties, these two values can be increased.

These values also ensure that the transported objects come to a standstill immediately when the conveyer belt motor is switched off.

Below is an example where conveyer belts are used in top view. Two dynamic objects are transported without gravity by belt 1 and then moved by a cylinder to an auxiliary belt.

Tip: When displaying conveying elements in top view, the gravity of the dynamic objects is often switched off. It can be helpful to apply damping to these dynamic objects as well. You can do this as of version 1.5.0.9 of PLC-Lab. More information: Dynamic objects without gravity

Now let's look at an example with a conveyer belt in side view. Here the dynamic objects have retained gravity.

This is a special conveying element that is used to deflect other objects in a certain direction or to accelerate objects. Below you see an example where the airflow is used to accelerate dynamic circle objects.

With this conveying element, the object to be transported is always held in the center of the conveying element. It is similar to a guide rail or a guide groove. This guide rail is symbolized in the center of the conveying element.

An object to be transported is only transported when its center point touches the guide rail.

The symbol of the guide rail and also the direction arrows can be switched to invisible. The properties which are necessary for this can be found in the "Appearance" section.

Conveying elements with guide rails are ideal for the design of rail-like systems with direction changes. Individual conveying elements can be lined up one after the other. In the following example, individual conveying elements with guide rails were each rotated by 30° and lined up. This resulted in a semicircle.

You can influence the rotation of the transported objects via the two properties "Change rotation of conveyed objects" and "Rotation offset on collision". You can specify operands and constants for both properties.

In the following example, we will again use the conveying elements with guide rails arranged in a semicircle. A circle object is transported with an arrow. The aim is to always have the arrow point in the direction of movement. As already mentioned, the conveying elements are each rotated by 30°. As a result, the constant 1 is indicated at the property "Change rotation of conveyed objects" for each rotated conveying element. You have to enter the constant 30 as the rotation offset for the individual properties "Rotation offset when collide". As a result, the transported object rotates by 30° each time it touches the conveying elements. This means that the arrow of the circle object points in the direction of the movement.

If this property is selected for a conveying element, then an object is transported exclusively by this conveying element. This also applies if the object is in the sphere of influence of another conveying element. If an object touches several exclusive conveying elements, the conveying element that was touched last has the highest priority.

Example 1: Two conveying elements are arranged in the following layout. Both conveying elements are not exclusive.

As you can see, once the transported object comes within the sphere of influence of the vertical conveying element, it is deflected downwards. It is therefore being moved by both conveying elements until it no longer touches the horizontal conveying element.

Example 2: Now we change the design so that the horizontal conveying element is set as the exclusive conveying element.

Now the behavior is a bit different. The object is only influenced by the vertical conveying element when it is outside the sphere of influence of the exclusive horizontal conveying element. This means that the object is never being moved by both conveying elements at the same time.

Example 3: In the third example, the vertical conveying element is set as exclusive. This results in the following behavior:

When the object touches the exclusive conveying element, it is being moved only by it. As a result, the object is transported downwards at the left edge of the conveying element.

Note: If an exclusive conveying element is a conveying element with a guide rail, its exclusive property will only take effect when the object touches the guide rail with its center point. Only then will the object be moved by the conveying element with the guide rail.

Below are some videos with examples where conveying elements are used.

The liquid object is typically used to simulate fill levels. It offers numerous inlets and drains as well as sensors to detect the current fill level.

You can set the maximum fill level in the range of 100-65535 increments.

The liquid object has three inlets and three drains; you can specify an operand or a constant for each of these. Word operands of type UInt16 are expected at the inlets and drains. Because PLC-Lab supports very flexible operand specifications thanks to range specifications, it is also possible to specify bit operands.

Example for the specification of a bit operand in the supply: 0-100 IM.M12.3

This specification means that if the bit operand has the status '0', there is a supply of 0 increments per time unit. Status '1' has a supply of 100 increments.

Example for the specification of a word operand in the supply: IM.MW20

This specification means that the value in MW20 determines the number of increments of the supply per time unit.

The current fill level can be read in increments via the analog fill level sensor.

The following is an example in which the current fill level is written in the IM.MW2 operands and displayed in a text label. The inlet and drain can be controlled via buttons.

Two binary sensors can be set to any fill level. The detection range is specified as a range specification.

Example 1: Binary sensor

The first binary sensor is to be triggered at a fill level of 3000 to 3500 increments.

This means that we need the following specification: 3000-3500 IM.M10.2

Example 2: Binary sensor

The second binary sensor is to be triggered at a fill level of 6000 to 6200 increments.

This means that we need the following specification: 6000-6200 IM.M10.3

In the following layout, the two sensors are represented by LEDs:

Tip: If more than two binary sensors are necessary, additional binary sensors can be implemented by means of a calculator object.

In the following image, the bit operand IM.M10.1 is set to status '1' if the fill level (stored in IM.MW2 with the symbol fill level) is in the range 1000 to 1200. Select "In range" as the function type for the calculator object.

For a detailed description of the calculator object, click the following link: The calculator object

The liquid object cannot only be used to represent liquids and the related features. Other applications are also possible thanks to the wide range of available settings. As a counter, for example.

In the following example, the falling parts are detected by a sensor and the value of the increments of a liquid object is increased. For this purpose, the property " Supply Trigger" was assigned to the operand, which is influenced by the sensor. If a positive edge is present at the operand of the sensor, the sum of the supplies of the liquid object is detected once; this increases the level (i.e. the increments) of the liquid object. The constant "1" was specified at supply 1 so that the value increases by the value 1 with each positive edge.

The operand of the reset button can be specified in the property "Drain Trigger". In addition, a constant is entered at one of the drains which corresponds to the maximum number of increments of the liquid object. As a result, when the reset button is pressed, the sum of the drains is recorded and the value is subtracted from the current fill level of the object. In the example this means that the level is 0 in any case.

Below are some videos with examples where liquids are used.

This section contains joints that can be used to create, for example, linear motions similar to cylinders, rotary movements, wheel connections, etc. Joints always define the relationship between two physics objects. These two objects are the anchor objects of the joint.

Some joints have a master object and a slave object. When you draw a joint, some settings are transferred from the master object to the slave object. The start object, where you start drawing the joint, is always the master object as well.

To attach a joint to two objects, proceed as follows:

  1. Select a joint
  2. Move the mouse to the first anchor point for the joint in the master object, press and hold the left mouse button.
  3. Move the mouse to the second anchor point in the slave object and release the mouse button.

The following example shows a prismatic joint.

The prismatic chiose is used for cylinders, for example.

Below you can see the symbol of the joint:

Examples of this type of joint are:

  • Cylinders
  • Elevators
  • Lifting platforms
  • Sliding doors
  • Feeds for drilling rigs
  • Linear movements of grippers
  • Implementation of a weigh scale

The following image shows two objects which are connected by a "prismatic joint". The left object is the master object. From this object, the second object is moved along the line of the joint symbol.

When you select the second anchor object (slave), an additional symbol appears which symbolizes the stop. When you rotate the object, the stop also rotates, so it always remains on the same side of the object. Depending on how a movement looks like, it may be necessary to rotate the slave object in order to have the stop at the correct position.

There are three ways to adjust the length of the movement.

First option

The first option is to select and move the slave object. When you move the object beyond the current end of the movement, the length of the movement is adjusted.

However, you cannot use this method to shorten the length.

Second option

With the second option, you select the symbol of the joint and then move the mouse to the end. Now click on the thumb and hold down the left mouse button. The appearance of the joint symbol changes and the current length is displayed in pixels. Now you can use the mouse to lengthen or shorten the travel distance. Shortening is only possible as long as the stop side of the slave object is still within the travel path.

Third option

It is also possible to change the length in the properties. To do this, select the joint and then change the "Length linear movement" property.

There are three ways to adjust the gradient of the movement.

First option

The first option is to select and move the slave object. The linear movement is also moved with the slave object. The same applies if the position of the master object is changed.

Second option

With the second option, you double-click the symbol of the joint or the selected symbol. The selection thumbs indicate that the rotation mode is active.

In this mode you can now change the gradient. The position of the slave object is adjusted.

Third option

The third option is to change the gradient in the properties. To do this, select the joint and then change the "Rotation" property.

The linear joint has a motor that can be set using the "Motor" property in the property section "Physics properties -> General -> Motor settings". The motor speed (in m/s) can be specified via an operand; the value is read from the operand. In this way, it is also possible to specify a constant if the speed does not have to be variable.

With the property "Speed divisor" you can adapt the speed specification for the simulation by means of an operand without having to change the value of the operand. The speed specified in the operand is divided by the value in "Speed divisor". This may be necessary, for example, if the motion is too fast in reality and therefore cannot be recreated in the simulation.

The movement of the slave object is controlled by operands. Because the value is read from the operand, the constant '1' can also be specified for a permanent movement.

The joint has numerous sensors. This allows the end positions to be evaluated, the position of the slave object as an analog value and much more. With the sensor for the position, it can be useful to specify a scaling range in order to generate values similar to those in the real system. It does not matter whether the length of the movement corresponds to the length of the real system.

Example

A linear movement with a length of 4m is present in a system. The position sensor provides values from 0 to 4000. We want to simulate this in the virtual PLC-Lab system. The following specification is made in the property "Sensor position in pixels": 0-4000 IM.MW2

As a result, the position of the slave object is scaled to the range 0-4000 and then written to the word operand MW2.

Because of the scaling, the length of the linear movement within the simulation is irrelevant. You get the same sensor data as you would in the real system.

As the name of the property suggests, you can make the master object and the slave object collide by activating this property. The property was selected in the following image:

Now the same arrangement, but the two objects do not collide because the property is not selected:

Here the slave object is not stopped by the master object.

If the two anchor objects collide and still the zero point of the linear movement has to be reached, you can often achieve this by rotating the master object. You can see this in the following image. The master object is rotated by 180° so that the starting point of the movement is in the direction of the position of the slave object.

In many cases, an arrangement consisting of two objects linked by a linear motion link needs to be mirror-inverted. An example is the left and right part of a sliding door. In such cases, the two linked objects are combined into a drawing group, copied, and then rotated. This can be seen in the following video:

Example of how to rotate objects with a prismatic joint

Gripper arrangements often consist of a horizontal and vertical movement. In such a case, the slave object of the horizontal movement is also the master object of the vertical movement of the gripper. Below is a video showing the structure of such a gripper arrangement:

Gripper with magnet

If the gripper is not implemented with a magnet, but with gripper arms, then additional connections are attached to the slave object of the vertical movement, e.g. for rotary movements. In this case it is important that the mass of the slave object is increased by increasing its density. Otherwise the structure becomes unstable.

The following video shows the structure of a gripper with a gripper pliers. Note the explicit density setting at 6:07 min. into the video:

Gripper with gripper pliers

The slave object is the dynamic part of the linear movement. The drawing position of this object is also the starting position at the start of the simulation. If you want to change the drawing position of the slave object, the best way to do this is to use the arrow keys on the keyboard. To do this, select the object and use the arrow keys to change its position. When you have reached the starting position of the linear movement and then move beyond it, the direction of the linear movement changes. You should then simply go back one position (i.e. press the arrow key in the opposite direction); you will then have reached the zero point of the linear movement. You can see this below:

The arrow keys can only move an object vertically or horizontally. If the linear movement has a certain gradient, then it is very difficult to move the slave object without changing the gradient of the movement. In such a case, the slave object should be provided with a stencil, which ensures that a displacement is only possible in the set angle of the linear movement. The following steps are necessary to provide objects with such a stencil:

  1. Select all objects that you want to assign to the stencil. To select several objects, press and hold the Shift key. Then click on the individual objects with the mouse. Now select the symbol of the joint.
  2. Now you can release the Shift key. Within the list of actions, select the action "Set stencil".
  3. In the PLC-Lab status field a message appears that the stencil has been set.
  4. Now the objects can only be changed in position alongside a line. This is also true for changes with the mouse and with the arrow keys on the keyboard.

If you want to position the objects freely again, select them and select the action "Reset stencil".

The following video shows how to set and reset a stencil:

Example for the use of the stencil

The prismatic joint has the sensor "force in Newton". You can specify an operand for this sensor. In these operands the current value of the force in Newton is written, which the connection needs to hold the current position or to execute a potential movement. If, for example, the linear connection is arranged vertically and the slave anchor does not move, then the value of the force required to hold this position is written into the sensor. Below is a prismatic joint arranged vertically:

The second anchor object is located approximately in the center of the joint. The sensor "Force in N" was assigned a word operand. This word operand is also specified at a tacho object. The linear connection does not execute any movement, i.e. the constant 0 is specified at the two properties "Operand movement to minimum" and "Operand movement to maximum".

At the start of the simulation you can see the following image:

The tacho object indicates that a force of 2 Newtons is required to hold anchor 2 in position.

The next step is to place rectangles of identical size with different densities (and thus different masses) on the second anchor object.

By placing the rectangles on the second anchor, the linear connection requires a higher force to hold the position. This force is displayed in the tacho object. Depending on the mass of the object, this force is different and thus a measure of its weight.

If the slave object moves and meets the limit of the linear connection, the force increases until the maximum force of the linear connection is reached.

A revolute joint is used, among other things, to implement the following system components:

  • Revolute joints
  • Fan with variable speed
  • Rotary movement with position sensor
  • Tilting devices
  • Revolving doors
  • Variable ramps
  • Barriers

You can freely adjust the pivot point of the joint.

Below you can see the principle symbol of the joint:

The following image shows two objects which are connected by a "revolute joint". The lower object is the master object, which in most cases will be a fixed object. A solid line leads from the master object to the pivot point. This is symbolized by a colored circle with a cross. The connecting lines to the slave object are dotted. The slave object is the object that rotates around the pivot point.

You can freely position the pivot point of the joint. To do this, select the circle symbolizing the pivot point and move it with the mouse. In the following example, the pivot point is placed in the center of the slave object.

Now an example where the pivot point is placed outside the slave object.

The examples show that very different rotary movements can be implemented by freely positioning the pivot point.

The joint has a motor that can be set using the "Motor" property in the property section "Physics properties -> General -> Motor settings". The motor speed (in rpm) can be specified via an operand; the value is read from the operand. In this way, it is also possible to specify a constant if the speed does not have to be variable.

With the property "Speed divisor" you can adapt the speed specification for the simulation by means of an operand without having to change the value of the operand. The speed specified in the operand is divided by the value in "Speed divisor". This may be necessary, for example, if the motion is too fast in reality and therefore cannot be recreated in the simulation.

The right/left rotation of the slave object is controlled via operands. Because the value is read from the operand, the constant '1' can also be specified for a permanent rotation. Please note, however, that only one direction of rotation may be active at any one time. If both directions of rotation are active, there is no rotary movement.

The joint has numerous sensors. In this way, the position of the slave object can be recorded as an analog value or the speed of the rotation can be read out. If the rotary movement is limited, then you can also specify end position sensors.

Within the property section "Physics properties->General->Limit switch" the property "Enable limits" is available. You can use this property if you want to limit the rotary movement to a certain area. Examples are tilting processes, barriers, revolving doors. Before this option can be activated, an upper or lower limit in degrees must be specified.

The allowed values for each limit are:

  • Lower limit: -180° to 0°
  • Upper limit: 0° to 180°

Only when a limit is active, the limit switches at the minimum or maximum can be used.

Below is an example where the rotary movement is limited to -90° to 0°. The limit switches at the limits have been assigned operands which influence the status of the lamps.

The limits are always relative to the position of the slave object and the pivot point. The counterclockwise rotation is negative, the clockwise rotation is positive. In the above example, the lower limit is therefore -90°. Because the upper limit is defined as 0°, the slave object cannot rotate to the right from the starting point.

Subsequently, the upper limit was changed to 45°.

As a result, the limit switch at the upper limit is not actuated in the initial position. In addition, a clockwise rotation of up to 45° is possible. Then the actuation of the limit switch at the upper limit (45°) is also indicated by the illuminated lamp.

Usually the sensor provides a value from 0 to 360 for the position of the rotary movement. Here it may be useful to specify a scaling range in order to generate values as those in the real system.

Example

In a system, an absolute angle encoder supplies an analog value of 0..10V. The angle encoder is connected to an analog channel of a Siemens S7 analog module. As a result, the analog value is digitized and supplies the digital value 0 to 27648. We will simulate this in the virtual PLC-Lab system.

For this purpose, the following specification is made in the property "Sensor position in angle degrees": 0-27648 IM.MW2

As a result, the position of the rotary motion is scaled to the range 0 to 27648 and then written to the word operand MW2.

Thanks to the scaling, the identical signal can be generated as that in the real system.

As the name of the property suggests, you can make the master object and the slave object collide by activating this property. If the option is not selected, the two objects do not collide with each other. This is essential if the slave object is inside the master object.

Below you will find links to example videos in which a revolute joint was used.

The constant distance joint is used whenever two objects are to be connected by a rod. This type of joint is also often used to hold parent objects at a specific location when they are multiplied by a creator. This connection can also be used to implement a pendulum.

Below you can see the principle symbol of the joint:

The following image shows two objects which are connected by a constant distance joint. The connected anchor objects are equal, i.e. there is no master or slave object for this type of connection. The connection itself is symbolized by a black line.

By simulating this structure, you can easily see the property of this joint.

The anchor point of the joint at the respective anchor object is variable. However, it should be within the respective anchor object. To change an anchor point, first select the line that symbolizes the joint and then click with the mouse on one of the two selection thumbs to move it. Standard anchor points appear at the respective anchor object, at which you can dock the anchor. However, anchor points at other locations within the object are also possible.

Below you can see how a new anchor point is selected:

Theoretically, you can also select an anchor point outside of an anchor object. But then the behavior of the joint is no longer completely clear and the physical simulation may be unstable.

At the beginning we mentioned that a constant distance joint is comparable to a rod connecting two objects. With the two properties "Rigidity" and "Damping" the nature of the joint can be changed slightly.

The "Rigidity" property can take values from 1 to 30. 1 is soft and 30 is rigid. The default value is 29. If the value 1 is selected here, the connecting rod is converted into a connecting chain, but with relatively large chain links.

The property "Damping" can take the values 0.0 to 1.0. The default value is 0.9. This allows the nature of the joint to be varied between metal and hard rubber.

Below you will find links to example videos in which a constance distance joint was used.

A solid joint is used when two objects are to be connected inseparably. This type of joint is also used when one or more objects are to be attached to the piston rod of a cylinder.

There may also be gaps between the two objects connected by the joint. The gaps are permeable for other objects, similar to a sieve.

Below you can see the principle symbol of the joint:

In the following image, two objects are connected by solid joint. The left object is the master object. Drawing of the joint was started with this object. The slave object (circle) is located on the right. You can see that the connection symbol on the side to the master object is represented by a solid line, while the line to the slave object is represented by a dotted line.

When the joint is created, some properties of the master object are adopted by the slave object. For this reason, you should assign the role of the master object to the "more dominant" object and start drawing the joint with it. If, for example, another object is attached to the piston rod of a cylinder, then the piston rod should be the master object.

But in many cases the role distribution has no influence on the function of the joint.

In the PLC-Lab action window you will find the section "Body group". There you will find the action "Create a body". This action creates a body from the currently selected objects. This is symbolized by a body group, which is surrounded by a dashed rectangle. The border is different from a drawing group.

So the action "Create a body" has the same effect as joining to a body. This raises the question of when to use the joint and when to use the action.

To simplify, you can say that if more than two objects are to be combined to a body, the action "Create a body" should be used. If, for example, such a body group is to be firmly connected with another object, then the solid joint should be used

The following video shows this very clearly. A container is built with the help of a body group and then attached to the piston rod of the cylinder with a solid joint.

Attaching a container to the piston rod of a cylinder

In principle, you could also implement the container with the help of several solid joints. This would also work.

The other advantage of the body group, in particular where numerous objects are involved, is that it behaves like a drawing group. This means that you can, for example, zoom in and out while maintaining the relative position of the objects to each other. If an object within the group is copied with the mouse, then the newly created object is also part of the group and thus part of the body.

The disadvantage of the body group is if objects that do not belong to the body are arranged within the group. In this case it is not obvious that these objects do not actually belong to the body. Here a solid joint would be better because the symbols of the joint visually indicate the affiliation.

Body groups are explained in more detail at the following link: Using body groups

We have already mentioned that there can be gaps between objects that are combined to form a body. This further increases the flexibility in the construction of virtual facilities.

Example

The following example shows a layout in which a cam is attached to a rotating circle object which actuates a sensor. The sensor was not placed directly on the circle object.

The simulation of the layout shows the following behavior:

You can see that the cam rotates with the circle object. The gap between the circle object and the cam has no influence on the joint.

Example

In the second example, a rocker was built from individual rectangles. The rectangles were combined into one body with the help of a body group. The bottom of the rocker resembles a sieve, which means it has gaps. On the rocker you will find a circle objects, which by their size fall through the gaps of the sieve. The rocker can be moved using buttons.

You can see that the circle objects fall through the gaps. Despite the gaps, the rectangles form a body.

Conclusion

Objects that are combined to one body can also be spatially separate from each other. Despite this separation, they react as if a joint exists. This "virtual" joint does not influence other objects.

A weld joint is used when two objects are to be connected to each other. In contrast to the "solid joint", however, this joint can be removed again.

For this purpose, a force or strength can be specified for a weld joint. If a greater force acts on the joint, then the joint "breaks" and no longer exists.

Below you can see the principle symbol of the joint:

In the following image, two objects are connected by a weld joint. In the case of a weld joint, there is no master or slave object. The joint is symbolized by a solid line with a circle in the center.

The ends of the weld joint are the fixing points on the respective anchor object. When the simulation is started, the force of the weld joint acts at these fixing points. For the above image, this means that the two objects are joined at these points. The following image shows this.

If you want to change the fixing points of the anchor objects, proceed as follows:

  1. Select the weld joint.
  2. Move the thumb of the anchor object that you want to change with the mouse.

You can see this below.

As soon as you "touch" the thumb with the mouse, the standard points of the respective anchor object become visible for docking. However, you don't have to use these. You can choose the placing freely. If you switch on the simulation after the above selection of the fixation point, the following behavior is indicated:

The corner point at the bottom right is now the point at which the force of the weld joint acts.

Example

In the example, the weld joint is placed as follows:

The setting was made so that the two anchor objects don't collide. When the simulation is switched on, the following behavior is indicated:

The force of the weld joint acts at the respective center of the anchor objects and pushes them together. Again, this behavior is only possible if the anchor objects do not collide.

Example In the next example, the fixing points are located outside the anchor objects.

This creates a gap between the two at the start of the simulation.

However, the anchor objects are still connected to each other via the weld joint.

A weld joint can be "destroyed" or "broken" if it is subjected to a force that is greater than the maximum force set for the joint. The following properties must be set in order to make the weld connection removable: 1) Select the property "Joint is breakable" in the section "Physics properties -> General". 2) Adjust the maximum force in the property "Max. force before the joint is breaking" in the section "Physics physics properties -> General".

Example

In the example shown below, we have set the weld joint to break at a maximum force of 10N. The connected anchor objects fall from above onto a pointed object. The resulting force causes the weld joint to break. As a result, the two anchor objects are separated from each other.

Above we have shown that a weld joint can be set to break. The force acting on the joint must be greater than or equal to the set maximum force.

For geometric objects (rectangle, ellipse, triangle), the "Weld joint" section is available. There are two properties in this section.

This property expects a bit operand or an operand with a range specification (see also Specification of a range in addition to the operand). Because the value is read from the operand, the constant '1' can also be specified. In this way, the function of the property is always active.

If the property of a physics object is active and this object collides with two other physics objects, then these are welded at the point of collision.

Example

In the following example, two dynamic rectangles are to be welded using a cylinder. For this purpose, a dynamic rectangle is attached to the cylinder rod of the cylinder (with an unbreakable joint) in which the property "Operand create weld joint" has been assigned the constant '1'. As a result, the property is permanently active.

The cylinder can be moved downwards by means of a push-button. In the lower end position of the cylinder, the welding object touches the two rectangles to be welded. Below you can see the effect.

Initially, the two rectangles are still independent of each other. The two rectangles are only connected after the cylinder has reached its lower end position and the object on the cylinder rod has carried out the welding process.

This property expects a bit operand or an operand with a range specification (see also Specification of a range in addition to the operand). Because the value is read from the operand, the constant '1' can also be specified. In this way, the function of the property is always active.

If the property of a physics object is active and this object collides with two other physics objects, which were joined together by means of the property "Operand remove weld joint", then they are separated again.

Example

In the following example, a similar arrangement is used as with the example for the property "Operand create weld joint". In this example, the object on the piston rod of the cylinder is adjusted so that the welding and removing of a joint can be switched over.

You can see how the two rectangles are first welded together. Then the function of the object on the piston rod is switched from "weld" to "remove". After the cylinder has moved downwards, the two rectangles have been separated again. The weld joint has thus been eliminated.

Note: It is not possible to remove weld joints which have been defined graphically using a weld joint. Only the joints created using the property "Operand create weld joint" can be removed using "Operand remove weld joint".

Below is a link to a video illustrating the use of the two properties to create and remove a weld joint.

As the name suggests, this joint is mainly used when a wheel joint with a shock absorber is required. The pivot point of the joint can be changed within the limits of the joint symbol.

Below you can see the principle symbol of the joint:

When you create the joint, you have to start with the object that represents the fixed part of the wheel joint. The second anchor object is the rotating slave object.

The following image shows two objects which are connected by a "wheel joint". The lower object is the master object, which in many cases will be a fixed object. From the master object, a slightly wider solid line leads to the center of the joint symbol. Also from the center of the joint symbol, a slightly thinner line leads to the slave object. The circle indicates the pivot point. The slave object is the object that rotates around this pivot point.

You can change the pivot point of the joint. To do this, select the symbol of the joint and move the circle or its thumb with the mouse. In the following example, the pivot point is placed in the center of the slave object.

Now an example where the pivot point is placed outside the slave object.

The examples show that very different rotary movements can be implemented by shifting the pivot point.

The joint has a motor that can be set using the "Motor" property in the property section "Physics properties -> General -> Motor settings". The motor speed (in rpm) can be specified via an operand; the value is read from the operand. In this way, it is also possible to specify a constant if the speed does not have to be variable.

With the property "Speed divisor" you can adapt the speed specification for the simulation by means of an operand without having to change the value of the operand. The speed specified in the operand is divided by the value in "Speed divisor". This may be necessary, for example, if the motion is too fast in reality and therefore cannot be recreated in the simulation.

The right/left rotation of the slave object is controlled via operands. Because the value is read from the operand, the constant '1' can also be specified for a permanent rotation. Please note, however, that only one direction of rotation may be active at any one time. If both directions of rotation are active, there is no rotary movement.

The joint has numerous sensors. A separate sensor detects the amplitude of the joint's shock absorber. The standard values are -100% (completely extended) to 100% (completely compressed). By specifying a range, it is possible to scale these values to other values. This sensor is often used to detect the unbalance of a rotation. The "rigidity" and "damping" can be varied by the properties of the same name.

The following video shows an example for this type of use:

As the name of the property suggests, you can make the master object and the slave object collide by activating this property. If the option is not selected, the two objects do not collide with each other. This is essential if the slave object is inside the master object.

The anchor point of the joint at the respective anchor object is variable. However, it should be within the respective anchor object. To change an anchor point, first select the symbol the joint and then click with the mouse on one of the two selection thumbs to move it. Standard anchor points appear at the respective anchor object, at which you can dock the anchor. However, anchor points at other locations within the object are also possible.

Below you can see how a new anchor point is selected:

In this section you will find the creator object of the same name. Creator objects control the creation of child objects of a certain ID. If the condition for creating a new generation of child objects is fulfilled, then these are created as copies of your parent objects at the position of their parent objects.

With the creator objects, you can create object sources in a system, e.g. to supply conveying elements with parts.

The following steps are necessary to create a dynamic object from a creator:

  1. Create the dynamic object (e.g. a dynamic ellipse).
  2. In the section "Main settings -> Creator/destroyer settings", enter a ID that is unique in the project in the property "Object is a parent object with the ID". This ID must be between 1 and 30.

  3. Fix the parent object at the position where the child objects are to be created. A fixed object is often used for this purpose, to which the parent object is connected via a constant distance joint.
  4. Create a creator object on the drawing board and enter the ID set on the parent object at the property "Creator has the ID".
  5. Specify an operand (or a constant) at the property "Create trigger", which controls the creation of the parent objects as trigger.
  6. The property "Trigger type" must be used to specify when the creation is to take place. For example, with a positive edge of the operand specified to "Create trigger". If the constant '1' is specified for "Create trigger", then "If status 1 with pause" must be selected as the type. In this case, a "trigger pause time" must also be specified.

Optionally, the maximum number of create cycles (i.e. the maximum number of existing generations) can be specified in the property "Max. create cycles". If this maximum number is reached, no more new child objects are created, even if the condition for it is fulfilled. Only if the number of existing generations falls below the maximum number because of the destruction of generations with the help of destroy objects, new child objects can be created again.

Example

The following image shows a layout with the creator.

The parent object to be created by the creator is a circle. The parent object has the ID = 1, i.e. the property "Object is a parent-object with the id" is set to the value "1". The circle is attached to a fixed object via a constant distance joint. In this way, the parent object always remains at the same position and the child objects are inserted into the layout from there. The creator is symbolized by a blue rectangle. The property "Creator has the ID" is set to "1", so the Creator is "responsible" for this ID. The bit operand IM.M0.0 was specified as the "Create trigger operand"; this should trigger the creation at a positive edge. This means that the "Trigger type" must be selected as "Positive edge". The switching of the trigger operand IM.M0.0 is carried out via a push-button to which this operand has been assigned.

The generated child objects are collected in a container located below the parent object and assembled using fixed rectangles.

This describes all parts of the layout and the simulation can be started.

The first thing to notice is that the creator object is no longer visible in the simulation; this is because it has no function as an object. When you press the push-button, a child object is created and falls into the container. All child objects are collected there. In this way you can supply a layout with objects, which can then be used later.

In the above example, child objects were created and then left in the layout. In most cases, child objects are processed in a system operation and removed at another point. This makes sense to keep the number of objects in a simulation as low as possible. After all, each physical object "loads" the physics engine and thus costs computing time.

In order to eliminate child objects, destroyers are used. Each geometric object can be configured as a destroyer. For this purpose, you have to set the properties "Object is a destroyer" and "Object destroys child objects with ID" in the section "Main settings -> Creator/destroyer settings" accordingly.

Example

The above example is expanded with a destroyer. The following image shows the changed layout.

The lateral boundary on the right side of the container was replaced by a rectangle which is attached to the piston rod of a cylinder. A solid joint was used as a joint. As a result, the rectangle moves to the left as soon as the cylinder extends. IDWith the red rectangle the property "Object is a destroyer" was selected and in "Object destroys child objects with ID" the number "1" was entered. This is because the destroyer should only remove the child objects with this ID. If the number "0" is specified here, the destroyer destroys all child objects regardless of their ID.

So the layout shows the following behavior in the simulation:

After some child objects have been created, the cylinder is extended by means of a push-button. Now the destroyer with the piston rod moves to the left. Any child object touched by the destroyer will be removed.

In the previous explanations, the term generation was used in connection with child objects. This expression suggests that it is not only possible to create individual objects. If you want to create several objects in one process, which then belong to one generation, you assign the same ID to all parent objects. It is irrelevant whether these parent objects have a relation to each other or not. Also, the parent objects do not have to be at the same place; they can be spread over the entire layout.

The parent objects can also form a (body) unit or be related to each other via other joints.

Example

Our example has been changed again. The circle object has been replaced by a more complex form.

The new body consists of a total of 6 dynamic geometric shapes, which were joined together to form a body by means of a body group. All objects are configured as parent objects with the same ID (in the example the ID = 1). This way their child objects are created in a creator cycle, forming a generation of child objects. If one of these child objects touches a destroyer, then the entire generation is eliminated and not just the child object that touches the destroyer.

When the destroyer touches a child object of the body, the entire body is removed. Any additional body is not affected at first because it belongs to another generation.

With the creator and destroyer objects, you can implement the sources and sinks of a layout. The ID combines the objects into one generation. This ID is also used to create the affiliation to the creator.

Each geometric shape can be configured as a destroyer if it is a physics object (dynamic or static). If a certain ID is specified, then only child objects with this ID will be removed. If all child objects are to be removed regardless of their ID, then "0" must be specified as ID at the destroyer. Please note that a destroyer always destroys the entire generation of child objects even if only one child object touches it.

Several destroyers can be set to the same ID, because it is entirely possible that child objects have to be removed at different locations in the layout.

However, setting several creators to the same ID makes no sense.

This section contains objects that can be used to display values or text in a layout. Some of these objects can also be used for visual effects to draw attention to special situations in a layout.

Labels are used when it is possible to label parts of the system. A second application is displaying values within a text.

Example

In the above image, both rows of the label were filled with text. If you delete the text in "Text second line", only the text for the heading would be displayed. This text then appears in the center (vertically).

In the section "Main settings -> Operand", you can specify an operand in the property "Operand", the value of which is to be displayed within the label. In the most basic case, the placeholder "{0}" is specified in the text.

Example In the label, the value of the byte operand IM.MB2 is to be displayed as a decimal numerical value.

For this purpose, you specify "IM.MB2" as the operand. In the text, the placeholder "{0}" must be entered at the preferred position with the value of the operand.

In the simulation, the following behavior is evident while the operand is changed using a slider.

Formatting instructions can also be given at the placeholder for the value of the operand. The statements are supported in the following way: "{0[:formatString]}".

You can find the syntax by clicking on the following link:

Syntax for formatting

Here are some examples:

  • Output of the value in hex: {0:X}
  • Output of the value in hex with at least two digits: {0:X2}
  • Output of the value in decimal notation with at least two digits: {0:D2}
  • Output of the value as a decimal number with one decimal: {0:f1}
  • Output of the value in exponential form: {0:e}

To display the label without a frame, set the coverage of the fill color to 0%.

The fill color of the label can be changed depending on the operand. You can also choose flashing or pulsing. To do this, enter the preferred operands in the "Main settings -> Operand" section of the properties (e.g. "Operand switching fill color"). You can select the color to be displayed for status '1' in the section "Main settings -> Appearance -> Colors" in the property "Fill color while status 1 of the operand".

You can change the label type in the section "Main settings -> Appearance". When you select the type "Label with arrow", a label with an arrow is displayed in which the heading text can be seen.

The tacho is used to display numerical values.

In the section "Main settings -> Appearance ->Display and scale" you will find the following basic properties:

Property Description
Actual value Here you have to specify the operand with the value to be displayed in the tacho. Operands starting with a length of 8 bits are recommended, i.e. byte, word and double word operands
Maximum value of the display The highest value displayed in the tacho.
Minimum value of the display The smallest value displayed in the tacho.
Physical value of the scale The physical value between the scale divisions of the tacho. This value should be increased if there are too many scale divisions in the tacho or if they are too densely arranged.
Physical value of the labeled scale The physical value between the labeled scale divisions of the tacho. This value should be increased if too many scale divisions in the tacho are labeled or if the labels overlap.

Example

The value of the operand IM.MW2 is to be displayed in a tacho. The tacho should display values in the range 0 to 500. The scale divisions should appear every 50 units. The tacho should be labeled every 100 units. So you have to make the following setting:

The tacho display can be divided into max. 4 color ranges. This makes it possible, for example, to indicate in which value ranges a value is too low, normal, or too high.

Example We want to add three colored scale areas to the tacho from the previous example.

  • Color range 1: value is too low, values range from 0 to 150, color: blue
  • Color range 2: value is within normal range, values range from 150 to 400, color: green
  • Color range 3: value is too high, values range from 400 to 500, color: red

For this example, the settings should be made as follows:

The digital gauge is used to display numerical values as BCD, HEX or decimal values. Byte, word, or double word operands with the data formats byte, UInt16, and UInt32 are recommended as operands.

If BCD has been selected as the display mode and the number present in the operand does not correspond to a BCD number, the "-" character is displayed in the respective digit.

In the section "Main settings -> Operands", you can also specify the operands for switching the fill color and for a flashing display.

The following properties can be found in the section "Main settings->Appearance":

Property Description
Segment type Here you can influence the appearance of the digital gauge. Depending on the selection, the digits of the gauge are displayed in different ways. For example, they can be displayed as a 7-segment display, as a matrix with 5/7 points or as a matrix with 5/7 rectangles.
Number format used This property can be used to select how the contents of the operand are to be interpreted. You can choose between the formats BCD, HEX or decimal
Number of digits You can set the number of digits to be displayed here. If a number of digits is specified that cannot be completely filled by the operand, the upper digits are filled with zeros. If too few digits are set to display the contents of an operand, the available digits are used to display the least significant digits.
Height of the digits Here you can set the height of the digits in pixels. The width is then calculated automatically.

Below you can see three digital gauges with different segment types:

Frames can be used as decorative objects, e.g. to optically contrast switches and lamps. These are typically added to the layout at the end. Frame objects in this case are in a lower drawing layer so that they do not cover other objects. For this reason, you often have to assign a lower (maybe even negative) value to the property "Z-Order" in the section "Main Settings -> Appearance". This is shown below.

As mentioned before, frame objects can be used as decoration objects in a layout, for example to highlight switching elements. A second use is the highlighting of elements by flashing or pulsing.

Example

In a layout, a blinking frame object is used to draw attention to a push-button. To do so, the circular frame is placed behind the push-button.

If one would like to draw attention to certain elements in a layout, then you have three 'escalation levels' to choose from: you can change the color of a frame, make it flash, or make it appear pulsing.

This can also be used to provide operator guidance by having the next operating element to be activated indicated by flashing.

This section contains sliders that can be used to change numerical values in operands. You can choose between horizontal and vertical versions for the layout.

In the section "Main settings -> Appearance ->Display and scale" you will find the following basic properties:

Property Description
Actual value Here you have to specify the operand whose value is to be changed. You can use all operands, including bit, byte, word, and double word operands.
Maximum value of the display The highest adjustable value.
Minimum value of the display The smallest adjustable value.
Physical value of the scale The physical value between the scale divisions. This value should be increased if there are too many scale divisions or if they are too densely arranged.
Physical value of the labeled scale The physical value between the labeled scale divisions. This value should be increased if too many scale divisions are labeled or if the labels overlap.

Example

A slider is to change the value of the operand IM.MW2. Possible values are in the range from 0 to 2000. The scale divisions should appear every 250 units. The slider should be labeled every 500 units. So you have to make the following setting:

The slider scale can be divided into max. 4 color ranges. This makes it possible, for example, to indicate in which value ranges a value is too low, normal, or too high.

Example We want to add two colored scale areas to the slider from the previous example.

  • Color range 1: value is too low, values range from 0 to 500, color: blue
  • Color range 2: value is within normal range, values range from 500 to 2000, color: green

For this example, the settings should be made as follows:

With the digital gauge with pushwheel switch, operands can be written with numbers as BCD, HEX or decimal. Byte, word, or double word operands with the data formats byte, UInt16, and UInt32 are recommended as operands.

In simulation mode (RUN), each digit's value can be changed separately. Click on the upper or lower area of a digit with the mouse to increase or decrease its value. If the highest value of a digit is reached and another increase is triggered, the digit is set to the lowest value (e.g. from 9 to 0 for decimals). If the digit has the lowest value and is decreased again, then the highest value is set (e.g. from 0 to 9 for decimals).

In the section "Main settings -> Operands", you can also specify the operands for switching the fill color and for a flashing display.

The following properties can be found in the section "Main settings->Appearance":

Property Description
Segment type Here you can influence the appearance of the digital gauge with pushwheel switch. Depending on the selection, the digits are displayed in different ways. For example, they can be displayed as a 7-segment display, as a matrix with 5/7 points or as a matrix with 5/7 rectangles.
Number format used This property can be used to select the format in which the content of the digital gauge with pushwheel switch is to be written in the operands. You can choose between the formats BCD, HEX or decimal
Number of digits You can set the number of digits to be displayed here. The digits are written right-aligned in the operands.
Height of the digits Here you can set the height of the digits in pixels. The width is then calculated automatically.

Here is an example of a BCD digital gauge with pushwheel switch with digital displays in BCD and decimal format.

You can see that you can change the value of each digit of the actuator with the mouse.

You can use the computer object to perform arithmetic operations with operands or to link operands. The following functions are possible:

  • AND, OR, and Exclusive OR combinations with bit operands
  • Addition
  • Multiplication
  • Modulo
  • Decimal-to-BCD for byte operands
  • BCD-to-decimal for byte operands
  • Comparisons: Greater than, Greater than or equal to, Less than, Less than or equal to, Equal to
  • Areas: In area, Outside area

A maximum of 4 operands can be specified for the function. The result of the function is written into an operand. If the operand with the result is a bit operand, it can be inverted.

All 4 input operands can be assigned. If fewer operands are specified, the unused input operands must be assigned the constants '1' or '0'. This depends on which constant is neutral for the operation.

A bit operand must be specified on the operand for the function result. This can be inverted via the property "Invert result".

All 4 input operands can be assigned. If fewer operands are specified, the unused input operands must be assigned constants. This depends on which constant is neutral for the operation.

You have to specify an operand at the function result which is able to receive the value of the result. Otherwise there will be no write operation in the operands.

Only the first two input operands are used for this operation. The function result is determined from: Operand 1 [Modulo] Operand 2

You have to specify an operand at the function result which is able to receive the value of the result. Otherwise there will be no write operation in the operands.

Only the first input operand is used for this operation. Only the lowest-value byte of the operand is evaluated. The calculated value is then converted to BCD and the result is written to the operands of the function result.

Only the first input operand is used for this operation. Only the lowest-value byte of the operand is evaluated. The calculated value is then converted from BCD to decimal and the result is written to the operands of the function result.

Only input operands 1 and 2 are used in the comparison operations. The operands can have different widths, i.e. the contents of a byte operand can be compared with the contents of a word operand.

The operations are executed as follows:

  • Greater than: Value operand 1 > Value operand 2
  • Greater than or equal to: Value operand 1 >= Value operand 2
  • Smaller than: Value operand 1 < Value operand 2
  • Less than or equal to: Value operand 1 <= Value operand 2
  • Equal: Value operand 1 == Value operand 2

The function result is usually to be written into a bit operand. If a byte, word, or double word operand is specified, then the values '0' or '1' are written.

Only input operands 1, 2, and 3 are used in the area operations. The operands can have different widths, i.e. the contents of a byte operand can be compared with the contents of a word operand.

The operand whose value is checked must be specified at input operand 2. The minimum value of the area must be specified at input operand 1. This can be either an operand or a constant. The maximum value of the area must be specified at input operand 3. This can be either an operand or a constant.

The evaluation is as follows:

  • In area: Value input operand 1 <= Value input operand 2 <= Value input operand 3
  • Outside area: Value input operand 1 > Value input operand 2 or Value input operand 2 > Value input operand 3

The function result is usually to be written into a bit operand. If a byte, word, or double word operand is specified, then the values '0' or '1' are written.

You can use the calculator object in many different ways.

You can use it, for example, to equip a liquid object with an additional fill level sensor. To do this, you would use the "In area" function. If, for example, you want to set the operand IM.M10.1 to '1' as soon as the liquid object's fill level is between 800 and 1000 increments, set the computer object as follows. Here we assume that the current fill level is stored in the word operand IM.MW2.

The "In area" function can also be used if the position of linear or rotary movements needs to be detected by sensors. Here the calculator object is used in a similar way as shown in the above example with the fill level.

An additional possible use is the triggering of events in the virtual system in order to imitate the behavior of the real system. This is often achieved by linking operands of the internal memory area of PLC-Lab (IM).