软件Bug导致 自动测试系统 失败,问题还会发生在别处吗?有时候值得听取任何意见——甚至是来自于一名中学生。
当我还是个年轻工程师的时候,老板让我设计机械/水力仪器的离散逻辑控制器。用CMOS逻辑和功率电阻设计几周以后,我重新分析了设计方案,每个地方似乎都正确。然后,我定做了PCB板,制板期间,我又拿到了足够器件做样品。我使用开关和光来模拟仪器。一切又正常。当我把控制器连到第一个仪器上时,一切还运行得很正常。甚至工程师们用控制器仔细测试后,仍没有大问题。
涉及到机械/水力仪器设计的团队讨论怎样操作产品。因为控制器工作很好的完成,我主动设计整个系统。虽然我尽力掩饰设计第一个 微处理器 系统的期望,但当老板给我工作并给予足够投入的时候,我兴高采烈。
方案的部分变得比原来的控制器设计更复杂,包括硬件设计和汇编语言的软件编程。测试系统能够为整体仪器供能。监控水力螺线管和接线来保证没有短路或断路,模仿和控制仪器控制器相同的输出,通过这个方式循环。最后,需要在微处理器芯片上运行软件编程控制来完成所有这些任务。
系统是新研制的,会存在bug。虽然我最终使它运行,但我拖延了进度。 完成系统硬件设计以后,我一直忙于学习新型微处理器语言。我记得我的导师说所有的微处理器都有汇编语言。我认为与我在学校学过的很相似。大错误!指令与我学过的截然不同。我开始担心不能按时完成了。
编程和调试都不那么顺利。此外,硬件上也有问题。我现在每天工作12个小时,但当情况开始好转的时候,厄运即将到来了。
检查表明系统问题是软件编程上出现了错误。我找到并修改了一些bug,但是问题仍然存在。所以我花了很长时间调试系统。尽管我每天工作14个小时,时间仍再次变得紧迫。三或四天的时间,我没有取得任何进展。我始终把焦点放在这里,没有注意别的地方。
随后,我真的很幸运,一个为我工作的学生建议我看看PCB板。虽然我不赞成他的建议,但我决定试试看。
测试了一些电路后,我发现Schmitt触发器IC有问题。替换了这个器件,系统就按照设想的方式工作了。
回顾我的事业,我通过解决问题提高声誉的方法,达到一些测试的成功。这个项目的教训深深地影响了我,成为成功的基础。我绝不拒绝任何人的建议,不管他的工作、背景或教育水平。我也绝不将眼光放窄,而错过可能存在问题源头的大画面。
英文原文:
Answers CAN be anywhere: Unlikely culprit takes down test system
Is a SOFtware bug to blame for a failing automated-test system, or could the problem lie elsewhere? Sometimes it pays to listen to any suggestion—even one from a student.
By Clark Robbins, GS Engineering -- EDN, 4/26/2007
When I was a young engineer, my boss asked me to design a discrete-logic controller for a mechanical/hydraulic apparatus. After weeks of work using CMOS logic and power transistors, I reanalyzed the design, and everything seemed correct. I then commissioned prototype PCBs (printed-circuit boards), and, by the time they were ready, I had enough parts to build some samples. I used switches and lights to simulate the apparatus. Again, everything worked OK. When I connected my controller to the first apparatus, everything still worked fine. Even after the engineers had tested everything using my controller, there were no major problEMS.
The team involved with the mechanical/hydraulic-apparatus design discussed how it would handle production. Because my work with the controller was essentially done, I volunteered to design an automated-test system. Although I tried to hide the anticipation of designing my first microcontroller system, I was elated when my boss gave me the task and got management to sufficiently fund it.
www.55dianzi.com
This part of the project turned out to be signifiCANtly more complICated than the original controller design, involving hardware design and SOFtware programming in assembly language. The test system would have to be able to power the complete apparatus. It would also have to cycle through all the modes, monitor the hydraulic solenoids and wiring to make sure that there were no shorts or opens, and simulate and control the same outputs as the apparatus controller would. Finally, it would need to aCComplish all of these tasks under the control of a software program running the microcontroller Chip.
This system was new and had bugs and idiosyncrasies. And though I eventually got it running, I was now behind schedule. After completing the automated-test-system-hardware design, I was working hard at learning the language for this new microcontroller. I don't remember my professor's saying that not all microcontrollers have the same assembly language. I figured that they would all be similar to the one I had learned about in class. Big mistake. The instructions were significantly different from what I had learned. I was beginning to worry that I wouldn't make the schedule.
The programming and debugging were not going well. In addition, I was having hardware problEMS. I was now working 12 hours a day, but, just when things were starting to improve, the black clouds came overhead.
Reconnaissance suggested to me that my system problem could be an error in the software program. I found and fixed some bugs, but the problem was still there. So, I spent hours debugging the system. Things were again looking bad for the schedule, despite the fact that I was now working 14 hours a day. For three or four days, I worked on nothing else yet made zero progress. I was so focused on one area that I was not looking anywhere else.
Then, I got really lucky; a student working for me suggested that I look at one of the PCBs. Though I dISAgreed with his suggestion, I decided to pursue it. (I did not want to discourage him from sharing future ideas.)
After probing some of the circuits, I found a problem with a Schmitt-trigger IC. Once I replaced the IC, the automated-test system worked the way it was supposed to.
Throughout my career, I have achieved some measure of success by develoPINg a reputation for being able to solve problems. The lessons I learned during this project became ingrained in me and became the cornerstones of this success. I try never to dismiss a suggestion from anyone, regardless of the person's job, background, or education. And I try never to focus so narrowly that I miss the big picture, where a problem's source might reside.
英文原文地址: http://www.edn.com/article/CA6434376.html
本文关键字:暂无联系方式DSP/FPGA技术,单片机-工控设备 - DSP/FPGA技术