/
Advanced Tutorial - Conveyor Belt

Advanced Tutorial - Conveyor Belt



To get started, first download the Tutorial Project

This is what you will learn to make in this tutorial


Project goal

The goal of this advanced tutorial is to rig a Conveyor Belt with a kinematic setup and control it using an external Twincat PLC.

  1. Create a Kinematic Controller.

  2. Add a Belt System to the Belt.

  3. Generate a belt circumference Spline with a Belt Renderer.

  4. Create a belt surface Spline.

  5. Generate a Loft Mesh with the Belt System.

  6. Add a DC Motor to the DriverRoll and assign its Wheel Joint to the Belt System.

  7. Create a Logic Simulator.

  8. Create a DC Motor Logic component and assign it to the Logic Simulator.

  9. Connect the Logic Simulator to the Twincat project and have Twincat control the DC motor.

 


Project overview

The project consists of a predesigned model that has been optimized and correctly put into the Hierarchy. Textual reference has been added to each of the steps, please find these under the Conveyor Belt Tutorial. The textual reference is displayed in the Inspector.

You can find the correct scene in the Tutorial Project under
Assets > 2 - Advanced Tutorials > 2 - Conveyor Belt Tutorial > 1 - Exercise - Conveyor Belt Tutorial

3d-model of the conveyor belt (included with the tutorial)

Hierarchy setup

For reference, the finished setup has also been provided. Open the scene: 2 - Finished - Conveyor Belt Tutorial under Assets > 2 - Advanced Tutorials > 2 - Conveyor Belt Tutorial.


Step 1. Create a Kinematic Controller

If you want to use Kinematics, you will firstly need a V2020.1.56.3_ Kinematics Controller .This component controls all Kinematic Transforms in the scene.

To create a Kinematics Controller, go to Mechanics > Add Kinematics

The Kinematics Controller will be automatically assigned to the selected GameObject, or when there is no GameObject selected, a new one will be automatically created.

For now, deselect everything and add a Kinematics Controller.

Make sure to place the Kinematic Controller above the parts you want to control, in this case the Conveyor Belt. Drag the Conveyor Belt onto the NEW_KINEMATICSCONTROLLER.


Step 2. Add a Belt System to the Belt.

To create a V2020.1.56.3_ Belt System and assign it to a GameObject, select the GameObject and go to Standard Components > Belt System > Add Physical Component.

The Belt System requires a circumference Spline, a surface Spline and a Wheel Joint. The splines will be used to generate a Loft Mesh. The Wheel Joint will be used to determine the velocity with which objects will be moving over de Loft Mesh surface.


Step 3. Generate a belt circumference Spline with a Belt Renderer.

A Loft Mesh needs a circumference Spline and a surface Spline. We recommend you generating a circumference Spline for the Belt System using the V2020.1.56.3_ Belt Renderer .

First add the Belt Renderer to the Belt. To add the Belt Render, go to Standard Components > Belt System > Belt Renderer.

The Belt Renderer requires Belt Rolls to generate a Spline. For this Belt System setup, we need two Belt Rolls. We can use the Driver Roll and the Passive Roll as Belt Rolls. Add a https://unit040.atlassian.net/wiki/pages/createpage.action?spaceKey=PUD&title=Belt%20Roll&linkCreation=true&fromPageId=280987658 to both of these GameObjects.

When you create a Belt Roll it will try to find a V2020.1.56.3_ Wheel Joint on the same GameObject. If it cannot find one, it will automatically create one.
Set the axis direction for both Wheel Joints, on the Driver Roll and the Passive Roll, to Left. This way the Wheel Joints are orientated in the proper direction.

Next, set the radius of the both Wheel Joints so that they match the thickness of the Belt. In this case, we set the radius to 0.06 for both.

We can now assign the Belt Rolls to the Belt Renderer. If all Belt Rolls share the same Axis Direction and their Wheel Joints share the same plane, the Belt Render will automatically generate a Spline.
Drag the Driver Roll and the Passive Roll in the Belt Rolls list in the Belt Renderer.

A spline “GeneratedSpline” should now have automatically been generated. This spline will be the circumference spline for the Belt System. Rename it to “CircumferenceSpline” for clarity.


Step 4. Create a belt surface Spline.

To describe the surface of the Loft Mesh, we need to create a surface spline. To add a