Mechanical ports and constraints

Content

System description

The system includes two assemblies:

  • cabinet: With an electric box, a 3-phase power supply, a 24V DC power supply, buttons, a light, and a reversing motor contactor.
  • door: With a 3-phase motor, an electric door, a photoelectric sensor, and a detection plate.

Let’s download the diagrams and take a look at the configuration of the system.

The reversing motor contactor KM01_02 includes both KM01 and KM02 in the drawings and is used to command the door up and down. The ‘S01’ pushbutton on the panel will be used to activate ‘KM01’ while the second pushbutton ‘S02’ will activate ‘KM02’.

The motor ‘M01’ has a mechanical output port that is connected to the ‘DOOR’, so the rotational speed of the motor will be converted to translational speed on the door component and make it open or close.

Finally, the photoelectric sensor ‘B01’ is placed on the top of the door and the ‘H01’ light is placed on the panel to tell when the door is opened. To achieve this functionality, it is necessary to activate the ‘B01’ sensor when the door opens. For that reason, the door assembly includes a detection plate ‘PLATE’ placed on the bottom left corner.

If you start the emulation at this point, without creating any connection at all, you will see that the ‘PLATE’ falls to the floor because of gravity. If you reset the emulation it will come back to its initial position.

Constraints

Constraints are used to establish physical relationships between components. Simumatik OEP supports multi-link components: components that have one or several movable parts (links) with some limitations between each other (joints). This feature allows users to create everything from a simple button, a pneumatic cylinder, to a 6-axis robot.

In this system, we have an electric door component that has two links: the base link which is called ‘frame’, and another link called ‘door’, which has a degree of freedom in the vertical (Z) axis. You can read about the component by opening its information window.

To create a constraint, select the ‘door’ assembly in the left panel and right-click on it. Then select the ‘Add Constraint’ option on the pop-up menu.

Enter a name for the constraint, and click on ‘OK’.

Now you need to set up the constraint between the two components that need it, in this case, the ‘DOOR’ and the ‘PLATE’. Select the newly created constraint on the left panel, and then set up the constraint’s ‘parent’ and ‘child’ links on the variable panel. Click on the edit icon to modify the values of the variables.

The link selection tool will appear and offer you a list of all components in the actual assembly (and their links). Since we want to attach the ‘PLATE’ to the ‘DOOR’ to make it move up and down together with the door, the ‘parent’ link should be ‘DOOR.door’ (the door’s movable link).

Then edit the child variable and set it to the ‘PLATE.base’ link, the only link of the ‘PLATE’. The result should be equal to the next picture.

The two components are now physically attached.

Make all connections

To continue with the tutorial, create all electrical connections between the components. Do not forget to create also the mechanical connection between the ‘M01’ and the ‘Door’ mechanical ports.