Print with 3D printer needed components
Print primitive shapes used for testing the oi-line
We need to print the basic shapes which will be used to do selections on the real machine. The default PLC program is configured to remove from line ONLY cylinders and leave triangles and rectangles. Thus it is required to print these shapes from respective models
Print line parts
We need to print 4 parts which later needs to be mounted on the conveyor as follows
Recommended 3D printer settings:
- Material: PLA (preferred)
- Nozzle: 0.4 mm
- Infill Density: minimum 50%
- Support : Yes
- Shell thickness: 0.8 - 1.0 mm
Assemble components of the machine
Step 1.1: Cut v-rail
Please cut two v-rails with a length of 400 mm each.

Step 1.2: Attach the 4 legs to the v-rails
Please connect the first leg to the v-rail using two t-nuts and two M5x10mm bolts and screw the M8 leg inside as visible on the picture below. Do again for the other leg. Each leg should be 20 mm from end of the rail.

At the end you should have following v-rail. Please do make repeat the process one more time.

Step 1.3: Drill the mount holes of the conveyor belt
Please drill two mounting holes ("Hole 1" and "Hole 2") for each side of the conveyor belt with 5 mm drill. The 4 holes will be used for mounting the v-rails to.

Step 1.4: Connect the v-rails to the conveyor belt
Connect left and side v-rail to conveyor belt using already drilled holes in previous step using a t-nut and M5x10mm bolt. You should see this after it is done.

Step 1.5: Mount front aligner left to v-rail (left one)
Please connect with t-nut and M5x10mm bolt the front left aligner to the left v-rail (50 mm from the start of the v-rail) as shown below.

Step 1.6: Mount front aligner right to v-rail (right one)
Please connect with t-nut and M5x10mm bolt the front right aligner to the right v-rail (50 mm from the start of the v-rail) as shown below.

Step 1.7: Mount the proximity sensor stand and proximity sensor to v-rail (right one)
Please mount first the proximity sensor stand to the v-rail (right) using t-nut and M5x10mm bolt. And only after that connect using the supplied rings to proximity sensor to its stand. The final setup can be seen below:

The detailed setup picture of proximity sensor stand and proximity sensor can be seen on the following image:

Step 1.8: Connect solenoid stand with spring and solenoid lever together
Place the solenoid and tighten it with its nut in the solenoid stand. Then let its cable go through the designated hole just above it. Following image shows it:

Attach with two bolts the lever and place the spring inside as show in the following picture. After proper testing you can apply a thread locker glue on top of the bolts so that they do not unscrew.

Step 1.9: Mount already bundled together solenoid stand to v-rail (right one)
Using t-nuts and two M5x12mm bolts attach to the v-rail (right) the already assembled solenoid stand as shown below.

A more detailed view from above can be seen below:

Step 1.10: Drill hole for the camera stand
Please drill with 6mm drill a whole in the USB camera holder. In the middle of the metal plate.
Step 1.11: Connect camera to its stand
Please connect the camera to the stand using the stand's own bolt into the previously drilled hole. Finally attach the alluminium block which will be used for mounting to the v-rail.

Step 1.12: Attach camera and its stand to the right v-rail.
Finally the whole assembly should look like this.

Step 1.13: Attach the two collect boxes
Attach the two collect boxes to the left side v-rail using t-shape nuts.
Step 1.14: Attach the back aligner
Attach the back aligner using t-shape nuts.
Step 1.15: Level the oi-line machine using legs' blocking nuts
Please place the machine into a leveled and flat surface. Then using a 13mm wrench adjust the heights of the 4 legs so the conveyor belt is horizontal.
Prepare plastic box
Step 2.1: Cut v-rails
Please cut the 20 x 20 mm v-rail with to length of 250 mm. We need two pieces.
Step 2.2: Drill holes in the plastic box and attach v-rails to the plastic box
Please drill two holes with 6 mm drill at back of the plastic box. Using M5x10mm attach the v-rails to the plastic box how can be seen from following images:
Front

And back

Step 2.3: Drill holes for incoming power cable and outgoing cables
Please drill 4 holes for mounting holes as visible with dimensions on the following image:

Then attach accordingly cable connectors like so:

Step 2.4: Attach DIN rails to back (inside) plastic box
Please attach as follows the two DIN rails (each 180 mm long)

Connect electrical components inside the plastic box
Step 3.1: Attach main surge protection (2A)
NOTE: Always work with main power cable detached from power grid!!!
Please insert the main power cable through the bottom hole (12mm) and make sure it is properly secured through the mounting holes. Then unstrip the power cable which should have 3 sub cables. These three sub cables should be attached as follow (can be seen on picture below):
- Blue (Ground earth) should be attached to the first DIN rail
- Blue (Neutral) should go as IN for the automatic surge protection relay (2A)
- Brown (L1) should come as IN for the DIN rail electrical mount

Step 3.3: Attach 220VAC -> 24VDC and 220VAC -> 12VDC converters and power it from main line
NOTE: Always work with main power cable detached from power grid!!!
Place the 220VAC -> 24VDC and 220VAC -> 12VDC converters onto the second DIN rail and power them from automatic DIN rail surge protection and DIN rail power line stand as shown in following picture.
As it is easier from cable management point of view you can power the 12VDC converted directly from the 24VDC converted using so called bridge cables.

Step 3.4: Attach 24VDC -> 5VDC. Prepare 5VDC & 12VDC power cables and barrels for powering of rPLC coupler
Please connect OUT of 24VDC to IN of 5VDC keeping in mind polarity as shown below.
Keeping in mind polarity please prepare two cables. One connected to 5VDC power in of rPLC and the one connected to 12VDC power in.

Step 3.5: Place rPLC coupler and power it
Please the box for rPLC coupler on the DIN rail bus as shown below.

Connect plastic box with conveyor belt, solenoid, proximity sensor, camera and network connectivity
Step 4.1: Connect camera
Please connect the external USB camera to one of the 2 USB ports of the rPLC coupler. You can use one of the already drilled holes.
Step 4.2: Connect network
Please connect the LAN (RJ 45) cable to the rPLC coupler. You can use one of the already drilled holes.
Step 4.3: Connect conveyor belt
Please create a electrical circuit which starts from OUT of 24VDC, goes through REL1 (relay of MOD-IO) and powers up the conveyor belt.

Step 4.4: Connect solenoid
Please create a electrical circuit which starts from OUT of 12VDC, goes through REL2 (relay of MOD-IO) and powers up the solenoid.

Step 4.5: Connect proximity sensor
Please insert cable for proximity sensor using the already drilled holes in previous steps. Please power the proximity sensor's Gnd (ground) and Vcc (voltage_ directly from the 5VDC power converter. Please insert Gnd from your 5VDC into IN1 (analog input 1, left on picture below) of MOD-IO and the Signal cable from proximity sensor into IN1 (analog input 1, right on picture below).

Following video might help connecting the proximity sensor.
Step 4.6: Close the plastic box
Please put the plastic cover of the box using designated screws.

Success
At the end you should have built successfully an oi-line.