LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting

Happy Holidays

Hi, I have a project for my instrumentation course that I should sort objects based on color;metalic; transparent. I have some questions about the code. In the vi that I attached, what is the difference between the lower and upper code(counter/rpm).?

the vi is an example that I will include at the end of my project vi. It is responsible for sorting the objects into 4 different quadrants.

The sorting motor moves the sorting disk to the desired position, then the belt motor moves the object into the bin, after that the sorting motor rotates until the initial position.

As you can see, the last stage(going back to initial position) wastes alot of time.

Can you guide me in order to do a smoother code like the code for these guys:

http://www.youtube.com/watch?v=_UTXYfrbw6U

the sorting motor doesnt rotate to the initial position

I dont want to complicate things so only a counterclock is satisfactory for the complete sorting.

Thanks

PS I havent included the ports and tasks yet nor the time because the manufacturing isnt complete yet

PPS I haven't taken a control course yet.

Download All
0 Kudos
Message 1 of 3
(922 Views)

Find tutorials here for getting started with LabView.

 

http://zone.ni.com/devzone/cda/tut/p/id/7466

 

Well, we can't design your whole project for you, but if I were you, start watching the videos and researching the archives to learn LabView.  Although it is a graphical "language" it's not something you can pick up overnight.  I don't know your personal experience, but based on your questions and your example VI, you are just starting out; therefore, these videos should be beneficial for you.

 

To try and answer some of your questions, the upper code is using a case structure with an embedded sequence structure inside.  I don't know what use your boolean constants serve on the left of your main loop.  You have perpetual loops inside the sequences, which means they will never stop.  Each loop, if designed properly, is setup to execute in sequence.

The bottom code is more general.  A wait of some sort should be implemented to reduce processor over-load.  I would recommend a different architecture overall.  A producer/consumer loop is very versatile (click File>>New>>Frameworks>>Design Patterns to view the different architectures.  It's basis things like this that you should really learn first to develop best practices instead of bad habits.  Good luck!

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 2 of 3
(919 Views)

Thanks for the tip about producer/consumer template.

After I finish manufacturing the conveyor belt with the different stations, I'll post the final vi and ask for questions.

0 Kudos
Message 3 of 3
(904 Views)