fischertechnik / txt_training_factory

Training Factory Industry 4.0 (9V)
36 stars 25 forks source link

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

Open Yxxxhu opened 1 year ago

Yxxxhu commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

CvanLeeuwenFt commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

I have found the TxtSortingLineRun.cpp doc.

Should this place be the same or different.

微信图片_20221007022824

Yxxxhu commented 1 year ago

图片

CvanLeeuwenFt commented 1 year ago

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