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:
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.
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.
Find tutorials here for getting started with LabView.
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!
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.