Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting Line station cannot distinguish the red and blue workpieces #14

Open
Yxxxhu opened this issue Oct 6, 2022 · 9 comments
Open

Comments

@Yxxxhu
Copy link

Yxxxhu commented Oct 6, 2022

The Smart Factory 4.0 (9V) is already connected to the web-server. All other parts work well.

However, the Sorting Line Station cannot distinguish the red and blue workpieces.

Is there any update of the coding programme?

@CvanLeeuwenFt
Copy link

The published version is able to distinguish red, blue and white workpieces.
I am using it myself.
Is your colour sensor working fine or well connected?
To test this, you can use RoboPro, connect it with the SLS and check the sensor values.
You can also use the RoboPro version for the sorting line station to test it.
Or add some output to the C++ source and recompile it with Eclipse.

@Yxxxhu
Copy link
Author

Yxxxhu commented Oct 6, 2022

Many thanks for your reply! I have tested through the RoboPro, it's working.

However, when plug out the USB. I don't know why the TxtFactorySLD is not working well (Red and Blue).

Should I also input the TxtParkposSSC in SLD station TXT controllor?

@Yxxxhu
Copy link
Author

Yxxxhu commented Oct 6, 2022

I think the colour sensor works well through the RoboPro test (Via USB connect).

However, when plug out the USB connect, both doc TxtFactorySLD or TxtFactorySLD_Debug cannot distinguish the red and blue workpieces.

Is there any other suggestions? Best

@Yxxxhu
Copy link
Author

Yxxxhu commented Oct 6, 2022

Please see the link:
https://youtube.com/shorts/kahlSdi9DaY?feature=share

@CvanLeeuwenFt
Copy link

3 suggestions:
1)
Are you using the most recent version of the C++ software?
Is firmware 4.7.0. installed on the controller?
2)
The light intensity from outside can influence the measured color value.
What sometimes helps is masking the roof of the color sensor with black tape.
3)
Find in the C++ code the place where the color sensor value is evaluated. The limits may not be appropriate.
These can be changed. After that, the C++ code needs to be recompiled

@Yxxxhu
Copy link
Author

Yxxxhu commented Oct 7, 2022

Thanks for the suggestion,

  1. I am not familar with C++ software and do not modify the programme. And Yes the firmware is already been update to 4.7.0.
  2. I think it should not be the color sensor, because it can works well based on the Robopro text.
  3. Is there any updated docment for SLD that you can offer?
    Best

@Yxxxhu
Copy link
Author

Yxxxhu commented Oct 7, 2022

I have found the TxtSortingLineRun.cpp doc.

Should this place be the same or different.

微信图片_20221007022824

@Yxxxhu
Copy link
Author

Yxxxhu commented Oct 7, 2022

图片

@CvanLeeuwenFt
Copy link

If I have understood you correctly, the SLD does make the distinction between white and red/blue.
The limit value between white and red is 940 and between red and blue is 1430.
(RoboPro is using 1390 and 1600 in --Program Files (x86)\ROBOPro\examples\SortingLine.rpp)
The color sensor does work.
It seems that the cutoff between red and blue are not right.
With RoboPro you could see which color values are actually measured by the color sensor.
Suggestion:

Measurement:
In RoboPro, develop a simple program that shows the value of the color sensor.
Manually slide the block under the color sensor.
And then the actual color value can be seen.
Given:
Blue is considered red.
Possible solution:
(when you are not able to change the values in C++)
The color sensor measures the color value at the top of the block. By sticking papers with a slightly different color blue on the block, it is possible to determine experimentally which color does meet the limit value.

Use this color for all blue cubes.

Kind regards,
Carel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants