DSP Laser Controller - Memories (Shouldn't) Last Forever

One of the main reasons I starting keeping this (b)log was to have a centralized place where I can find the tidbits of information that I don't want to forget about. Sometimes, however, forgetting is the goal, and you just can't. So it was the other day...

...when I went to download a job to my LightObject Commercial DSP Controller from LightObject.com. The job partially downloaded and then the system locked up.

I quit and relaunched the PHCad software and tried again - instant freeze.
I rebooted the computer and tried again - instant freeze.
I uninstalled and reinstalled the software and tried again - instant freeze.
I installed the software on a different computer and tried again - instant freeze.

Are we starting to see a pattern here?

Even using different jobs, even the simplest, smallest of test designs, caused the system to freeze when downloading. To verify that communications between the computer(s) and the controller were working properly, I read/wrote the manufacturer's parameters - worked perfectly. I read and wrote the Settings - again it worked perfectly. It only fails when downloading jobs.

With tests from two computers, it became obvious that the problem was not with the computer or the software; it was with the laser controller. So Then is, of course, not what I wanted to discover 10 days before Christmas when I still had a list of jobs to complete. As great a value as the DSP Professional Laser Controller is, it is still a significant investment, I didn't really want have to buy it again.

I gave up for the night, but took time to send two emails - one to Marco and LightObject.com, and one to Bart over at BuildLog.net. The next morning, I found that both had responded quickly. Bart graciously offed to send me a spare controller he had; it was similar to mine and could be installed and be up and running on PHCad in no time at all. Thanks Bart, for being such a good friend.

Marco had responded as well with a suggestion; reformat the memory on the controller. I was at the office when I saw Marco's suggestion, so I had to wait till I got back to the shop in the evening before I could try that. When I did, it cleared the problem, downloads were successful, and everything was was working correctly.

I went back tried the original job again. Guess what - the job partially downloaded and then froze.
I reformatted the laser controller's memory again and again everything was back to normal. Even though I had tried numerous times to download new, small, simple jobs that should have replaced the current one, the laser controller appears to not be able to just forget about one job and replace it with another. It must be downloading the new one first, and then deleting the old one. That being the case, once memory is full, it is impossible to download more, even trying to replace the current one, until the memory has been cleared.

Investigating further I discovered the root cause of the problem. The job I was trying to download was an image I wanted to engrave. But I had two versions of the image - the one I wanted to use, which was 1.8 MB in size, and the one I actually tried to use - a 46.8 MB version. By the time you encode an image that size, it becomes so large that it overflows the laser controller's memory - causing it to lock up.

Having developed software for over 35 years, I know that I would have built in some error detection and communicated the condition to the user. Unfortunately, not every software developer has that many years of experience to learn from. Heck, lots of today's software developers haven't been alive that long. But, they will learn, over time.

And I continue to learn, too. This time, I learned that, sometimes it is good to forget; or at least to know how to force your laser controller to forget about the jobs it stores in memory.

OK - back to work. Christmas is 7 days away and while I have most the laser jobs done, I still have a dozen or so batches of my famous peanut brittle to make, package, and distribute before then.

Merry Christmas to all my readers and friends. Hope your holidays are joyful and your new year happy, productive, and fun.

No comments:

Post a Comment