From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating program for EV3 for sorting and ordering Lego bricks

Hello NI Community

 

This is my very first post here, so hoping I am doing this correct.

 

We are a group of  students at university level, last year in Bachelor in Mechatronics. This semester we have a course in Product development and doing a project where we have to build a sorting and ordering system of Legos and program the system to do those tasks. The system will be controlled by EV3 and several motors and sensors.

 

We are using LabView 2014 for Lego Mindstorms and none of us has ever used this application before. I have tried reading and watching several tutorials on how to use the application but still do not know how to get things started. The lecturers are not much of help unfortunately.

 

We would appreciate much if someone out there could help us getting started.

 

The operation is a bit complicated but will try to explain best I can.

 

First we will get random number of Lego Duplo bricks, between 8-12. The bricks are either big sized or small, and variant of 4 colors. That gives us 8 combinations. The given random bricks are put in a feeding slot.

 

Then the bricks are feeded one at a time to an elevator (moving vertically) and we have a Color sensor to determine what size and color the brick are.

 

Depending on size and color, the elevator-motor raises the elevator to the right height and a small motor tilts the platform for delivery. The delivery platform consists of 3 floors. Then the elevator returns to its original position to pick up the next brick. This is a looped operation for all the given bricks.

 

Next part, a new operation, is to order a certain brick from the delivery platform and another small motor opens the right port.

 

Have attached a drawing showing our concept.

 

From what I learned and understand so far, the program should be build within a While Loop and using Case Structure. The lecturer also suggested using arrays for the brick types.

 

The main idea for programming is

 

1a) Color sensor checks if are brick on elevator or not. For each check, the feeding motor is ran half rotation.

1b) If no brick, it means Large brick incoming.

1c) If brick, it means Small brick on elevator.

2) The brick combinations are put in a matrix/array and assigned to a specific floor.

3) Large motor moves the elevator to correct floor

4) Small motor tilts elevator platform

5) Large motor moves elevator back to original position.

 

If someone could helps get us started with the coding, it would help us much on being able to finish the project in due time.

 

Please let know if additional information or explanation is needed.

 

Looking forward to your replies.

 

0 Kudos
Message 1 of 2
(2,220 Views)

Hi

I helped last years guys but first you have to try yourself.

I can help but won't make your start. Just begin programming and play with LabVIEW.

If you have a problem, just ask but don't ask a solution for everything.

Also don't send jpg files but vi's.

Maybe start with how to control a motor, than the other motor.

Then how to stop.

Next how to recognize color, next how t recognize size. And so on.

 

Try to break down your problem in smaller problems first.

greetings from the Netherlands
0 Kudos
Message 2 of 2
(2,169 Views)