开发者

Hardware Emulator / Simulator for Winforms .Net Application

开发者 https://www.devze.com 2022-12-28 17:52 出处:网络
I have a WinFor开发者_开发问答ms .Net HMI software which talks to hardware over USB. I check for communication with the hardware at Load time and if communication is active then run it (The hardware m

I have a WinFor开发者_开发问答ms .Net HMI software which talks to hardware over USB. I check for communication with the hardware at Load time and if communication is active then run it (The hardware manufacturer has provided a communication library to talk over USB).

I want to build an emulator for cases when communication with hardware is not possible (not connected) and want the software to run in simulated mode by providing dummy values for different states of hardware.

Has anyone implemented something similar? Any pointers will be helpful. Are there any design patterns to handle such implementations.

TIA


Yes, I've done this. Used to write controllers for industrial equipment. Important interfaces were a PLC, a 32 axis motion controller, custom operator stations. I wrote simulators for all of them, making the simulator behave as closely as possible to the hardware I didn't have readily available in my office.

It worked out well, the simulators were done before the custom hardware was anywhere near to being ready to run. Which allowed me to write, debug and finish my code up front. Becoming instrumental in debugging the hardware. The simulators were a joy forever, they were always there when I was in a different (and more preferable) place to work on the next project. Operating a steel mill roll grinder in my bath tub.

Recommended. Nail down the protocol early.

0

精彩评论

暂无评论...
验证码 换一张
取 消