简体   繁体   English

Modbus RS485入门

[英]Getting started with Modbus RS485

I am not sure if this is the right place for this, however if it is do let em know will post it there. 我不确定这是否是正确的地方,但是如果确实这样做,请让他们知道将其张贴在这里。 My issue is 我的问题是
I need to read infos from 我需要阅读以下信息

Moxa 5430 RS485 to Ethernet converter (Hardware) Moxa 5430 RS485到以太网转换器(硬件)

Using Modbus RS485 protocol. 使用Modbus RS485协议。 Its a electricity department , as I am new to this protocol I am not sure how to start getting reading from this device , I have googled and downloads few codes but it none satisfies my needs. 它的电力部门,因为我对该协议不熟悉,所以我不确定如何开始从该设备读取数据,我已经在Google上搜索并下载了很少的代码,但都无法满足我的需求。
If there is any tutorials where I can go through specially if its for electric meter reading that would be even great. 如果有什么教程可以让我特别阅读电读表,那将很棒。
They get their reading on notepad so I am guessing they already have some application installed, but due to security reason cannot access that PC. 他们在记事本上阅读,所以我猜他们已经安装了一些应用程序,但由于安全原因无法访问该PC。 So any help would be great I am using C# and SQL 2012 as the platforms. 因此,如果使用C#和SQL 2012作为平台,那么任何帮助都会很棒。

Thanks 谢谢

Ok. 好。 Now Moxa 5430 is a terminal server device capable of translating 4 RS485/422 physical into 4 tcp channels you can use remotely via Ethernet. 现在,Moxa 5430是一种终端服务器设备,能够将4个RS485 / 422物理设备转换为4个TCP通道,您可以通过以太网远程使用这些通道。 The configuration for the device in terms of server/client has to be in the device manual. 就服务器/客户端而言,设备的配置必须在设备手册中。 Essentially, you have to configure the device as a server and allocate a port for each RS485/422 port you have. 本质上,您必须将设备配置为服务器,并为每个RS485 / 422端口分配一个端口。 Modbus is a communication protocol designed to interface with a huge plethora of PLCs and was created in 1979. More information on Wikipedia http://en.wikipedia.org/wiki/Modbus about this protocol. Modbus是一种通信协议,旨在与大量PLC进行接口,并于1979年创建。有关此协议,请访问Wikipedia http://en.wikipedia.org/wiki/Modbus I personally recommend reading a little bit about the modbus protocol before adventuring in using it. 我个人建议您在使用Modbus协议之前先阅读一些有关它的信息。 So with these two out of the way you can use a library like the following https://code.google.com/p/nmodbus/ which can help you communicate with Modbus devices via serial channel or tcp/ip. 因此,通过这两种方式,您可以使用类似于以下https://code.google.com/p/nmodbus/的库,该库可以帮助您通过串行通道或tcp / ip与Modbus设备进行通信。 However you will need the details about the real modbus device you are connecting to (power meter ,PLC, etc) and the supported command set of that device). 但是,您将需要有关要连接的实际Modbus设备(功率计,PLC等)以及该设备支持的命令集的详细信息。 The moxa device is just a convertor from serial to ethernet. Moxa设备只是从串行到以太网的转换器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM