Adapt the existing Gantry Robot twin project
In order to fulfill the PLC requirements, we need to add some sensors for the referencing process,
two buttons to start and stop the whole process and make some adaptations in the simulation components KinematicTranslationMover
in order to move the axes by positions which are calculated in the PLC.
Add light barriers for referencing process
To reference the x-axis by a sensor, the simulation component LightBarrier
can get added which is located in the category Sensors
.
In the first step, define the Object3D
of your sensor model in the 3D
view by clicking the button on the right hand sight of the Object3D
property of the LightBarrier
component and selecting the regarding 3D object in the 3D view.
Then, define the 'GlobalDirection' property by clicking the z-coordinate of the global coordinate system and define a barrier length of 0.02 meters.
Repeat that step for the y-axis sensor by adding a new simulation component, selecting the 3D object of the sensor, defining the positive x-coordinate as the direction and setting the barrier length. Those two steps can be seen in the following clip:
For the z-axis sensor, there is no corresponding 3D sensor object available. Therefore, the limits of the KinematicTranslationMover
which represents the y-axis could be used.
Another possibility is to select the 3D object on which the sensor will be fixed later on and define the position by the mouse courser as can be seen in the following clip.
If the position is not accurate enough the absolute coordinates of the GlobalOrigin
property can be used.
In order that the light barriers can detect the corresponding axes, the RigidBodyBehavior
of those 3D elements which need to get detected need to get changed to Kinematic
.
If the axes interrupts the barriers, the corresponding LightBarrier
simulation component sets the IsInterrupted
output to true.
How to control the machine
To start and stop the machine, the responsible buttons need to get created.
Therefore, two buttons of type PushButton
can get added within the ManualOutputs
simulation component.
Control the axes by positions
As described in the PLC description chapter, the position of the axes are calculated now on the PLC in the responsible technology objects.
This values can be read periodically from the PLC to move the 3D objects of the axes.
Therefore, the ControllingType
properties of the KinematicTranslationMover
simulation component must get changed.
The calculated positions from the PLC are in mm. Therefore, the Gain
simulation component is used to convert the unit to m for each mover.
Next
In the next chapter we create a PLC instance and load the prepared PLC project on the emulated PLCSim Advanced instance.