问题
I'm developing a weighbridge software for my client using vb.net 2008. As I don't have a weighbridge device to test, I don't know the output data format which is sent to COM port by the weighbridge device. So please tell me how can I resolve the problem and get the weight value from the COM port.
回答1:
You need two apps, fortunatelly both can be found as a freeware:
- COM Port data emulator http://www.aggsoft.com/com-port-emulator.htm
- Virtual Serial Ports Emulator http://www.eterlogic.com/Products.VSPE.html
First run Virtual Serial Ports Emulator
and create Connector type device, e.g. on COM10. This enables one app send data to virtual serial port which can be then opened and consumed by the second app.
Then run COM Port data emulator
and setup for virtual serial port created previously, e.g. COM10. Setup desired COM port parameters and specify what data and how should be sent to the virtual serial port connector.
Then just connect your app to COM10 and you are done.
If you are looking for some further inspiration, check my open source project NetWiCo.
来源:https://stackoverflow.com/questions/27501875/weighbridge-data-output-format