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.
Realize a capacitive, inductive or a color-sensor¶
The geometric shapes and the limit-switches have the property section named Advanced settings->Physics properties->Collision settings. In this section the property collision group can be set. With this property a material identification and a color identification can be realized.
First some explanations to a collision group: With the help of the collision group it is possible to define, which objects are colliding. The collision group is adjustable in the range 0 to 20. If an object belongs to collision group 0, it collides with all other objects, regardless of which collision group they belong to. If an object has a collision group other than 0, the object only collides with objects in the same collision group.
Example: In the following example the blue rectangle is set to the collision group 2. Sensor S1 has the collision group 1, sensor S2 the collision group 2. The LEDs above the limit switches light up as soon as the respective sensor has triggered.
It can be seen that the rectangle does not trigger sensor S1, because it has collision group 1. So the rectangle belonging to collision group 2 does not collide with this sensor. This is different with sensor S2, which belongs to collision group 2. Its collision group is identical to that of the rectangle. As soon as the rectangle touches sensor S2, the LED lights up as a sign, that sensor S2 has been triggered.
So the blue rectangle could be made of metal and the sensor S2 could be an inductive sensor.
Example: In the next example color sensors are realized. The S1 sensor detects objects with a red colour, the S2 sensor triggers when green objects are detected. This behavior is achieved by assigning sensor S1 to collision group 1 and the red rectangles also belong to this collision group. The green rectangles belong to collision group 2, as does sensor S2.
This results in the following behaviour:
- If the green rectangle touches the sensor S2, it will be triggered, since the two have the same collision group.
- If the red rectangle touches the sensor S1, it will be triggered, since the two have the same collision group.
Conclusion: With the help of the collision groups, sensors can be realized which only react to certain objects. In this way, inductive, capacitive and colour sensors can be implemented in PLC-Lab.
Further explanations of collision groups can be found in the following section: Using collision groups
Limit switch changes collision group¶
As of version 188.8.131.52, 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
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".