Kenneth Ong from Malaysia  [2 posts]
10 years
May i know how to use statement function.Like how use set statement or if statement to use n set in different color?
If Statement
10 years
Sure! I've attached an example below of how to setup the "if statement" to filter for green objects if the image count is less than 50 and then switch to looking for red objects after the image count is greater than 50. Note that we do not have the "else" case for the if statement so the logic can be a little repetitive. Regardless, it should show you how to do this.

What is your current project about?
How to test 3 color object
10 years
Hi Steven Gentner

This a our current project problem we face.

We are going to test 3 colour object.

a) blue object b) yellow object c) red object

Before we test the object,we have to connect 3 led's to the parellel port

Now we have to set,when the camera detect the blue object,the first led have to on and then when the camera detect yellow object,the second led must on,finally when the red object is detected,the third led must on.

Actually we are join to replace a dc motor with led,but for now we just join to test the led.This out project overall.

The problem we face is,we cannot filter 3 color at the same time and also control the three led.Hope that you can help us on using the is if statement and light on the led in right order.

Thank for someone who are help us in this problem.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index