串口通信中的dlt645协议! [英] dlt645 protocol in serial port communication!

查看:850
本文介绍了串口通信中的dlt645协议!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用DLT645协议的设备,以便与PC通信。我想了解这个协议是如何工作的。然后我可以重建可以与我的设备通信并修改它的gui。



最难的部分是我不知道如何使用这个协议才能使用PC和设备之间的串行通信。



我应该从哪里开始?根据以下文档(自动报告模式---第17页),只要RS232端口连接到设备,数据就可以传输到GUi。但是我如何发送以及您建议我使用哪种语言才能在PC和设备之间轻松通信?



http://www.ti .com / lit / ug / tidu247 / tidu247.pdf

I have a device that utilizes DLT645 protocol in order to use communicate with the PC. I would like to understand how this protocol works. Then I can rebuild the gui that can talk to my device and modify it.

The hardest part is I have no idea that how I can use this protocol in order to use a serial communication between PC and the device.

Where should I start from? According to the following document ( Auto-Reporting Mode---page 17), as soon as a RS232 port is connected to the device, data can be transferred to the GUi. But how I can I send and what language do you recommend me to use in order to have a easy communication between PC and device?

http://www.ti.com/lit/ug/tidu247/tidu247.pdf

推荐答案

请参阅我对该问题的评论。



对于.NET,就是这样: http://msdn.microsoft.com/en-us/library/system.io.ports.serialport%28v=vs.110%29.aspx [ ^ ]。



如果用C ++表示不是C ++ / CLI for .NET,答案取决于平台,您的偏好等。 ;你需要使用一些开源的第三方库。这不是问题;例如:

https://github.com/wjwwood/serial [ ^ ],

http://www.codeguru.com/cpp/in/network/ serialcommunications / article.php / c2503 / CSerial - AC-Class-for-Serial-Communications.htm [ ^ ]。



-SA
Please see my comment to the question.

For .NET, this is it: http://msdn.microsoft.com/en-us/library/system.io.ports.serialport%28v=vs.110%29.aspx[^].

If by C++ you mean not C++/CLI for .NET, the answer depends on platform, your preferences, etc.; you would need to use some open-source 3rd-party library. This is not a problem; for example:
https://github.com/wjwwood/serial[^],
http://www.codeguru.com/cpp/i-n/network/serialcommunications/article.php/c2503/CSerial--A-C-Class-for-Serial-Communications.htm[^].

—SA


如果你有一些串口经验,协议看起来很简单(尽管会有更多的文档可以欢迎)编程然后你几乎可以用任何编程语言轻松实现它。另一方面,如果您不熟悉串行端口编程,那么您可以从C#开始,使您的生活更简单,只需提供 SerialPort [ ^ ] class。
The protocol looks pretty simple (albeit a bit more documentation would be welcome), if you have some experience of serial port programming then you can easily implement it in almost any programming language. On the other hand, if you are not familiar with serial port programming then you could start with C# that makes your life simpler providing the SerialPort[^] class.


有一种通用的处理方法例如,使用此类和Arduino等串行设备。设备提供串行通信,因为有这样一种标准的处理方式。



1.设置所有硬件将其连接到计算机并使用TI软件让它工作。确认一切正常。你将从中学到很多东西。



2.下载putty等串行控制台: http://en.wikipedia.org/wiki/PuTTY [ ^ ]



3.用putty替换TI软件,并熟悉从设备发送和接收数据。这是您了解设备说明的地方。



4.阅读本文或其他类似文章,了解如何使用自己的软件代替腻子。 http://csharp.simpleserial.com/ [ ^ ]



TI论坛提供了大量支持。



更多链接: http:// www。 dreamincode.net/forums/topic/35775-serial-port-communication-in-c%23/ [ ^ ]
There is a generic approach to dealing with serial devices such as this and Arduino for example. Devices provide serial comms because there is such a standard way of dealing with it.

1. Set up all your hardware connect it to the computer and use the TI software to get it working. Confirm it all works. You will learn tons from this.

2. Download serial console such as putty: http://en.wikipedia.org/wiki/PuTTY[^]

3. Replace the TI software with putty and become comfortable with sending and receiving data from the device. This is where you learn the instructions for your device.

4. Read this article or others like it learn how to use your own software in place of putty. http://csharp.simpleserial.com/[^]

TI forums provide a wealth of support.

More links: http://www.dreamincode.net/forums/topic/35775-serial-port-communication-in-c%23/[^]


这篇关于串口通信中的dlt645协议!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆