Page 1 of 1

Using OLD Laptop - performance Tip?

Posted: Fri Sep 13, 2019 7:43 pm
by Oaklands
Playing around with the LP today...using a 10 year old Laptop running Win8 and nothing else.

I always felt the camera display was a bit sluggish...

So I went to the graphics card control panel and saw that I had nearly everything turned off (Acceleration/3D etc). (Because this particular model suffers from bad BGAs when overheated..so I disabled most of the features of the graphics card years ago and forgot about it)

Once I turned on most of the features of the grapics card, the camera performance improved greatly along with the CPU usage. The camera seems to keep up now with every movement in realtime (no lag as before). Peak CPU usage is under 50% now (vs 80%+ before) when running a job. Laptop CPU is Intel Core2.
No significant impact on Job run time....but a more pleasant GUI experience.

So this might be worth checking if you have a sluggish camera or an older PC/Laptop.

On a related Note I also turned on monitoring of the GPU and found that they are not being used at all.
@Juha : I wonder if it is possible to make use of available GPUs within the application for Vision processing. I believe thare are some utilities available online to make GPU usage 'safe' using Aforge, c# & .Net. Might be worth looking into. (GPUs are not my area of expertise, so ignore if it doesn't make sense)

Re: Using OLD Laptop - performance Tip?

Posted: Sat Sep 14, 2019 9:22 am
by JuKu
Not my area either, but worth of a deep look. Another direction could be using another, faster library. After all, the image processing is just take an image, process it with this function, take the resulting image and process it with this function and so on. There is nothing dictating that all functions need to be Aforge functions.

Re: Using OLD Laptop - performance Tip?

Posted: Sat Sep 14, 2019 9:50 pm
by wormball
It is actually blurring/deblurring operations that take the longest time in all vision pipeline. So i do not use them at all despite having slightly newer and hopefully more powerful machine.

Also you can buy used but more powerful computer for reasonable price. I recently bought i3-2120/16g for $108 and i3-4130/8g/radeon for $116. Also i bought xeon x3470 processor for $20 instead of my i3-530, however it hangs more often with xeon.

It is not my area too, but i have some thoughts on programmatic part for Juha (besides obvious rewriting from scratch or moving to another library):

- When searching for holes, it actually searches in small area about 10 mm in diameter. So it is not needed to process image outside this area. (Maybe it is already implemented, but when i tested it manually, blurring/deblurring took a long time, maybe when actually searching for holes, it does not process the whole image).

- The camera has automatic (and independent from our will) exposure adjustment, so static threshold value gives bad result sometimes, and automatic threshold setting would be useful. For example, you can calculate histogram of the central region and take the least common value between the two main peaks. Or you can take color values of points with maximum absolute gradient value. There is already "histogram" function in the menu, but it works no better than with no "histogram" to me. It is not related to computational speed itself, but i hope it will increase overall job speed.

- I also suggested command queuing, but my post was unanswered. https://liteplacer.com/phpBB/viewtopic.php?f=10&t=6136

Re: Using OLD Laptop - performance Tip?

Posted: Tue Sep 17, 2019 5:41 pm
by JuKu
You can also skip hole recognition altogether by " Use coordinated directly" in tape definition.

Re: Using OLD Laptop - performance Tip?

Posted: Tue Sep 17, 2019 8:43 pm
by Oaklands
Thanks for the tip. I will try it out for sure.

On a similar note....I looked for an explanation in the docs for both Place & Place fast, but was unable to find any details explaining both. (other than Place...but the algorithm was not clear)

From what I have observed, Place fast will work as follows:

If there are x identical components from the same tape on the current Job row, it goes to the next+x position to ID that hole position with vision. Then it goes to the next hole position. Once it has the next & next+x hole coordinates it no longer checks any more holes for that job row.

So it delivers a speed up, if there are 3+ identical components to be placed in the same job row.

Interestingly, when there are 2 components in the job row, it check both holes first...which is funny as there is actually no speed up in this scenario.


So when you say 'use coordinates' it doesn't really mean a lot to me because I cannot see where it is documented. (I know how to set it if course.) Is it valid for both Place & Place fast etc?

So I guess I will find out when I try it.

Similarly the difference between Place & Place fast is unclear. (unless it takes the first hole position and last hole position as defined in the tape data - assumes the tape is in a straight line and just assumes the components will be in a straight line between the first and last holes (using the component offset of course). If this is correct, it would suggest that place is faster than place fast ???. So I guess it is clear that I am 100% confused as to the algorithms & their optimum use cases.

Apologies if both of these are already documented (I just couldn't find it before). If they are - just point me towards it.

Forum Search
On a related topic: Initially I tried searching the forum for tips on things I was coming across with LP and quickly gave up. However, I then realized, that PHPBB3 is flagging every relevant keyword for PnP as too common and rejects the search request. So, could you have a look at the PHPBB3 search settings to see could you override this for all/most PnP & LP related keywords.

I would rather get 100s of search results than zero.

examples
The following words in your search query were ignored because they are too common words: vacuum.

The following words in your search query were ignored because they are too common words: stepper.

The following words in your search query were ignored because they are too common words: openpnp.
Go to General->Server Configuration->Search Settings
You can adjust increase the % value or turn it off with 0%. As this forum is relatively mall/low traffic, you could probably set it as high as 50%.
If you change the setting you have to rebuild the search index.
You then have to go to maintenance & delete then create the active search index again.

Re: Using OLD Laptop - performance Tip?

Posted: Tue Sep 17, 2019 10:01 pm
by wormball
"Use coordinates directly" checkbox omits the hole recognition. Instead, the software uses the given locations directly. https://www.liteplacer.com/edit-tape-parameters-dialog/

However it requires extreme tape positioning precision (or stationery tape holders which consume working space). Even when i do not check this mark, while using "place fast" on 30+ parts, the middle parts are placed with significant offset due to tape curvature.
Oaklands wrote:So it delivers a speed up, if there are 3+ identical components to be placed in the same job row.
I guess you are placing one board at a time. If so (and if your board is not very large), try placing several boards at a time (ideally by ordering panelized pcb), it will drastically increase overall placing speed and reduce human labor.
Oaklands wrote:Interestingly, when there are 2 components in the job row, it check both holes first...which is funny as there is actually no speed up in this scenario.
Actually there is some speedup cos it has to go through camera-nozzle distance only once.
Oaklands wrote:I would rather get 100s of search results than zero.
Me too. However you can always search any site with google, e. g. search "vacuum site:liteplacer.com/phpBB".

Re: Using OLD Laptop - performance Tip?

Posted: Tue Sep 17, 2019 10:25 pm
by Oaklands
cool...thanks..I will try all your suggestions.

I guess you are placing one board at a time. > I am using 1 large single PCB & everything else is on a Panel (just waiting on panelised stencils to be deilvered for all my PCBs to get started)

I guess searching via google, helps you more with rankings :)
I believe there is a google search extension for PHPBB3 available, which would replace the built in search.

So I did a google search for fast place as suggested & still not covered/documented
My point on this was really that newer users might benefit if the docs were a bit more complete on this particular topic. (no need to respnd..just FYI)

Re: Using OLD Laptop - performance Tip?

Posted: Sun Oct 20, 2019 7:47 pm
by Oaklands
wormball wrote:Also you can buy used but more powerful computer for reasonable price
Finally, managed to upgrade the Laptop to an i5-4570 mini-Tower (=lots of USB ports). 12GB RAM vs 4GB before.

Overall, usage seems a lot lot more responsive with fewer 'pauses' than before. (when running a job)

The overall CPU usage has now dropped to 6-7% above idle (probably equates to <25% of 1 core). This suggests that LP may have been somewhat CPU bound on my older PC, but not now.

There seem to be less pauses (not noticeable now vs before) during image processing.

However, my initial manual measurements still suggest a rate of ~250CPH using Place fast on a single PCB, with no nozzle change. No Doubt this will improve a bit with a Panel - getting more benefits from the place fast approach.
(vs nominal rate of 500-800 CPH ref: viewtopic.php?f=12&t=6116)

Conclusion:
- More modern PC improves user experience etc, but not neccessarily the CPH (for my situation).
- Camera recognition/switching seems much better on this newer Win10 PC (could also be related to the fact there are many more USB ports available)
- No noticeable lag in camera display when moving in X / Y
- Overall, upgrade to more modern PC, was worthwhile. (Also use it for 3D printer & CNC as well)