鸣志ModbusRTU用户手册

合集下载

Modbus RTU智能测控装置数据采集终端操作说明书解读

Modbus RTU智能测控装置数据采集终端操作说明书解读

Modbus RTU智能测控装置数据采集终端操作说明书目 录1. 绪论 (2)1.1 前言 (2)2. 产品介绍 (3)2.1 智能测控装置产品简介......................................................................................................32.2 型号说明(具体可参考公司网站选型表或联系我们)..................................................32.3 技术特点 (4)3 电气安装与接线 (6)3.1 产品外观说明......................................................................................................................63.2 设备接线说明......................................................................................................................93.3 安装及结构说明. (10)3.3.1 安装说明 (10)3.3.2 产品尺寸 (11)4. 软件配置参数及调试工具操作说明 (12)5. 通信协议使用说明 (13)5.1 智能测控装置 (13)5.1.1 Modbus命令格式 (13)5.1.2 寄存器地址表 (15)5.1.3 寄存器读写命令说明(拨码为100) (17)6. 注意事项 (18)7. 常见故障分析与排除 (19)1. 绪论1.1 前言尊敬的客户,感谢您使用深圳市信立科技有限公司的产品,衷心希望我们的产品能够为您创造出更多的价值。

本手册详细地介绍了设备的性能特点和技术指标、安装使用方法以及设备的诊断和维护等内容,文中包含许多与产品相关的重要信息,为确保设备的正常、高效使用,请您务必在设备使用之前仔细阅读本手册。

三相有功功率电表(MODBUS-RTU)说明书(行业材料)

三相有功功率电表(MODBUS-RTU)说明书(行业材料)

通讯本电能表能通过其RS485接口实现远距离抄录表内电能等数据。

并能通过其红外通讯接口用掌上电脑实现近距离抄录表内电能数据。

编码格式、校验(偶校验)和数据传输方式(八个数据位,一个停止位)符合MODBUS-RTU标准要求。

通讯波特率默认为1200bps、2400bps、4800bps、9600bps(默认)可选。

MOBUS通讯协议描述:1、数据格式:地址 + 功能码 + 数据 + CRC校验码2、读取电表参数举例:比如需要读表地址为01,数据起始地址为00当前A 相电压的数据,需要输入如下数据:(1)下发数据:01 04 00 00 00 02 71 CB数据详细说明01 仪表地址04 功能码,读仪表内部寄存器数据00 00 从仪表内部的00 00寄存器地址开始读取数据00 02 读取数据长度,为2个字4个字节的数据71 CB 为前面数据的CRC校验,其中高位在前,低位在后数据详细说明01 仪表地址04 返回功能码04 返回的数据长度为4个字节的数据长度43 6B58 0E返回的数据,为4个字节的数据25 D8 返回的CRC校验(3)数据格式说明:读取的电表内部的数据符合IEEE-754标准浮点数,数据格式为32位4字节的单精度浮点数数据格式。

3、修改表地址:修改表地址的命令:比如将表地址修改为02,则发如下命令:01 10 00 08 00 02 04 40 00 00 00 E7 C9数据详细说明01 仪表地址10 功能码,写仪表内部寄存器数据00 08 从仪表内部的00 08寄存器地址开始写数据00 02 写数据长度,为2个字,4个字节的数据04 写数据长度,为,4个字节的数据40 00 00 00 写入的表的表地址,4个字节的数据,浮点型数据E7 C9 CRC校验返回数据:01 10 00 08 00 02 C0 0A4、修改表通讯速率:修改电表通讯速率的命令:比如将表的通讯速率改为:1200bps,则发如下命令:01 10 00 00 00 02 04 44 96 00 00 07 73数据详细说明01 仪表地址10 功能码,写仪表内部寄存器数据00 00 从仪表内部的00 00寄存器地址开始写数据00 02 写数据长度,为2个字,4个字节的数据04 写数据长度,为,4个字节的数据44 96 00 00 写入的表的通讯速率,4个字节的数据,浮点型数据25 7B CRC校验在MODBUS协议中,使用功能码0x04可读取表计数据,地址(Hex)寄存器参数说明HI LO 描述单位格式模式01 00 总有功电量千瓦时浮点只读使用功能码0x03可读取表计参数,或者使用功能码0x10可修改参数,寄存器地址如下:地址(Hex)保存寄存器参数HI LO长度(字节)格式描述单位模式00 00 4 浮点波特率(1200 24004800 9600)bps读/写00 02 4 浮点校验位(0:偶校验; 1:奇校验; 2:无校验 )读/写00 08 4 浮点通讯地址(表号1-247)无读/写。

ModBus_RTU红外电表抄表器产品说明书

ModBus_RTU红外电表抄表器产品说明书

【上海数采物联网科技有限公司】数采物联ModBus_RTU红外电表抄表器产品说明书版本:V5.0目录1产品概述 (1)2服务理念 (1)3执行标准 (2)4产品特性参数 (2)4.1采集特性 (2)4.2电气特性 (2)4.3工作环境 (2)5通信协议 (2)5.1模块配置说明 (2)5.2M ODBUS默认读取点表 (3)1产品概述DAQ-GP-IRMODBUSRTU红外抄表终端是上海数采物联网科技有限公司推出的一款可以将DLT645/698等国网电表转为ModBus通讯协议的设备,可采集国网电表的电能数据、电压、电流、功率因数等电参数数据。

红外抄表原理简介:红外光电探头通过红外光口定时读取智能电表的参数信息并上传。

红外抄表器具有红外信号调制与解调的功能,将二进制数字信号调制成38KHz频率的脉冲序列,并驱动红外发射二极管以红外光脉冲的形式发送出去;收发器将接收到的光脉转换成电信号,再经过放大、滤波等处理后送给解调电路进行解调,还原为二进制数字信号,经过报文解析后,转为ModBus协议,可通过其它上位机软件进行读取。

本终端支持各种具备红外通信接口的电表、燃气表等仪表的抄表场景,适用于电能表数据采集、智慧城市数据采集、电力监控数据采集、节能减排数据监控系统数据采集、能耗监控系统数据采集、光伏系统数据采集、智能监控数据采集、机器人数据采集、智慧安防系统数据采集、云平台系统数据采集;电能表校验检验测试台;特别适合光伏发电系统电能抄表和供电局国网电表总表铅封完全封闭状态,不可开启任何封印的情况的抄表。

2服务理念我司郑重承诺:您购买的不仅仅是产品,还有细致、周到的技术支持服务(=^_^=)本产品,现场只需普通工人接电安装即可!无需调试!我们免费提供远程指导,远程配置调试服务,将数据发送至用户指定的云平台。

免费提供物联网方案咨询服务!3执行标准《Q/GDW1365—2013智能电能表信息交换安全认证技术规范》国网标准《多功能电能表通信协议DLT645-2007》国网标准《三相智能电能表型式规范Q/GDW1356-2013》国网标准4产品特性参数4.1采集特性●红外载波频率:38kHz●通信波特率:1200~115200bps,根据电能表通信参数自适应●红外通信距离:≤10米●通信角度:≤15度红外通信协议:符合IEC62056-21(IEC1107)和DL/T-6451997和2007标准,支持modbus 协议。

modbus-RTU

modbus-RTU

3.6.2 Modbus RTU通讯配置步骤
3.6.2.1 添加通讯端口接口类型为Serial
串口通讯参数中最重要的4个参数需要根据PLC或IO模块等硬件设备参数来设定。

分别为: 波特率、数据位、停止位、奇偶校验;
3.6.2.2 添加设备
单元号: Device ID,串口通讯中的地址站号,如RS485总线中多个设备的地址编号;
设备类型:Modicon,所有Modbus协议通讯设备均选择Modicon驱动,无论串口还是以太通讯;
下面4个参数都用默认值即可。

Use ASCII Protocol: 0或1,0代表Modbus RTU通讯格式,1代表Modbus ASCII通讯格式;
Packet Delay(ms): 驱动程序根据规划的IO点地址顺序及数量进行自动拆分请求数据的
数据包大小,此时间为每相邻两个数据包之间的发送等待时间;
Digital block size: IO点中数字量点在同一数据包中的数量,默认为512;如规划的数字量点数超出该数字,将自动拆分成多个数据包进行发送;
Analog block size: IO点中模拟量点在同一数据包中的数量,默认为64;如规划的模拟
量点数超出该数字,将自动拆分成多个数据包进行发送;
添加IO点:(地址一栏与设备实际modbus点地址对应)。

【VIP专享】Modbus通讯组态与调试手册

【VIP专享】Modbus通讯组态与调试手册

Modbus通讯调试手册1、FTA与SI电源模块接线(现场接线已连接好,只作检查)注意一个SI卡可带两个FTA接线端子板(即FTA A,FTA B 如下图),由单独电源模块供电,每个FTA接线端子板通过屏蔽双绞通讯线与第三方设备连接。

图12、与第三方通讯设备的接线需要注意各通讯设备以总线方式接入(即相互串连起来最后接入FTA端子上),当通讯距离超过100米或干扰很强时两端均应加上120欧姆电阻,连接第三方通讯设备到FTA端子的最大接线长度不应超过300米,如超过300米应采用信号中继器或放大器,每个FTA接线端子板最多可接入的设备为15个。

图23、Control Builder的组态(1)每个SI卡有32个软通道(Channel),其中0~15通道与连接在FTA “A”板上的第三方设备的进行通讯,而16~31通道与通道与连接在FTA“B”板上的第三方设备的进行通讯。

当只有1个FTA板时,那么这块FTA板必须配置成FTA“A”使用(即按1图将FTA接到Power Adapter的“ChannelA”上),且只能使用0~15通道!(2)Control Builder中SI通讯功能块(软通道类型)有三种:Numeric (SINUMARRCH):接收/发送数值型量,包括整数、浮点数;Flag (SIFLAGARRCH):接收/发送布尔量,即标志位;Text (SITEXTARRCH):接收/发送字符型量。

对于一个“SINUMARRCH”功能块(即一个软通道),可接收/发送最多16个32位浮点数或32个16位整型数。

(3)组态右侧图3为Control Builder中的相应功能块,具体组态见图4。

Serial Link Device Address:为设备地址,即Modbus ID;Starting Element Index:为接收/发送数据的起始地址,此为第三方厂家提供的,是modbus通讯寄存器首地址,1个寄存器地址存储一个16位二进制数;Number of Numeric Value:接收/发送的数据的个数。

Modbus RTU通信指令说明

Modbus RTU通信指令说明

一主站初始化EN:使能位,必须用SM0.0一直接通Mode:为1=Modbus,0=PPI(stop Modbus),用SM0.0一直接通Baud:波特率(1200、2400、4800、9600、19200、38400、57600或115200)一般为9600Parity:效验方式,0=无效验,1=奇效验,2=偶效验Port:0=CPU集成的端口,1=通过扩展SB信号板的端口Timeout:从站响应时间,超时时间,单位:ms毫秒Done:完成标志位Error:错误代码二读或写从站数据指令EN:使能位,必须用SM0.0一直接通First:读写请求,必须使用脉冲触发,加沿指令Slave:从站地址(0-247)RW:读写命令,1=写,0=读Addr:从站通信数据起始地址,要写Modbus地址(0001,10001,30001,40001)Count:通信数据区地址的数量,单位取决于Addr处Modbus 地址对应的PLC类型DataPtr:主站通信数据区地址(指针格式)Done:完成标志位Error:错误代码一初始化从站Mode:1=启用Modbus,0=禁用ModbusAddr:从站地址(1-247)Baud:波特率Parity:效验方式,0=无效验,1=奇效验,2=偶效验Port:通讯端口,0=CPU集成的端口,1=通过扩展SB信号板的端口Delay:通讯超时时间(默认为0)MaxIQ:从站允许主战读写的最大I/Q点数MaxAI:从站允许主战读写的最大AI点数MaxHold:从站允许主战读写的最大V区字数HoldStart:保持寄存器起始地址,(指针)Done:完成标志Error:错误信息存储区(BYTE)二MBUS_SLAVE指令用于处理来自Modbus主站的请求,并且必须在每次扫描时执行,以便检查和响应Modbus请求。

Done:完成标志Error:错误信息存储区(BYTE)。

Anybus Modbus-TCP RTU 网关用户手册说明书

Anybus Modbus-TCP RTU 网关用户手册说明书

Anybus®Modbus-TCP/RTU GatewayUSER MANUALHMSI-168-77 3.0ENGLISHImportant User InformationLiabilityEvery care has been taken in the preparation of this document.Please inform HMS Industrial Networks AB of any inaccuracies or omissions.The data and illustrations found in this document are not binding.We,HMS Industrial Networks AB,reserve the right to modify our products in line with our policy of continuous product development. The information in this document is subject to change without notice and should not be considered as a commit-ment by HMS Industrial Networks AB.HMS Industrial Networks AB assumes no responsibility for any errors that may appear in this document.There are many applications of this product.Those responsible for the use of this device must ensure that all the necessary steps have been taken to verify that the applications meet all performance and safety requirements in-cluding any applicable laws,regulations,codes,and standards.HMS Industrial Networks AB will under no circumstances assume liability or responsibility for any problems that may arise as a result from the use of undocumented features,timing,or functional side effects found outside the documented scope of this product.The effects caused by any direct or indirect use of such aspects of the product are undefined,and may include patibility issues and stability issues.The examples and illustrations in this document are included solely for illustrative purposes.Because of the many variables and requirements associated with any particular implementation,HMS Industrial Networks AB cannot as-sume responsibility for actual use based on these examples and illustrations.Intellectual Property RightsHMS Industrial Networks AB has intellectual property rights relating to technology embodied in the product de-scribed in this document.These intellectual property rights may include patents and pending patent applications in the USA and other countries.Trademark AcknowledgementsAnybus®is a registered trademark of HMS Industrial Networks AB.All other trademarks are the property of their re-spective holders.Copyright©2016HMS Industrial Networks AB.All rights reserved.Anybus®Modbus-TCP/RTU Gateway User ManualHMSI-168-773.0Table of Contents Page1Preface (3)1.1About This Document (3)1.2Document history (3)1.3Conventions (4)1.4Terminology (4)2Introduction (5)3Installation (6)3.1Mounting on DIN Rail (6)3.2MAC ID and Default IP Address (6)3.3Connections (7)3.4LED Indicators (8)4Configuration (9)4.1IP Configuration (9)4.2Web Configuration Interface (12)A Internal Registers (15)B Technical Data (17)C Regulatory Compliance (18)This page intentionally left blank1Preface1.1About This DocumentThis manual describes how to install and configure Anybus Modbus-TCP/RTU Gateway.For additional related documentation and file downloads,please visit the Anybus support web-site at /support.1.2Document historySummary of recent changesRevision list1.3ConventionsUnordered(bulleted)lists are used for:•Itemized information•Instructions that can be carried out in any orderOrdered(numbered or alphabetized)lists are used for instructions that must be carried out insequence:1.First do this,2.Then open this dialog,anda.set this option...b....and then this one.Bold typeface indicates interactive parts such as connectors and switches on the hardware,ormenus and buttons in a graphical user interface.Monospaced text is used to indicate program code and otherkinds of data input/output such as configuration scripts.This is a cross-reference within this document:Conventions,p.4This is an external link(URL):This is additional information which may facilitate installation and/or operation.1.4TerminologyIn this document the TIA-232/485serial communication standards are referred to asRS-232/485when describing hardware,and as EIA-232/485in the software interface.Introduction5(20) 2IntroductionFig.1OverviewThe Anybus Modbus-TCP/RTU Gateway allows Modbus RTU devices be connected to aModbus TCP network.The gateway functions as a Modbus TCP server and performs a trans-parent conversion between the two protocols.All Modbus accesses that are not addressed tothe virtual slave of the Anybus Modbus-TCP/RTU Gateway will be forwarded to the ModbusRTU network.The maximum frame length(number of registers)that can be used is limited only by the Modbusspecification and the functionality of the connected Modbus RTU devices.All Modbus functioncodes are supported.Configuration is carried out using the built-in web interface.The IP address of the gateway canbe set using the Anybus IPconfig utility.3Installation3.1Mounting on DIN RailMounting Fig.2Mounting on DIN rail1.Hook the unit onto the upper lip of the rail.2.Press the unit towards the rail until it snaps into place.Removing Fig.3Removing from DIN rail1.Insert a flat-head screwdriver into the slotted tab on the bottom of the unit and pull the tab gently downwards.2.Pull the bottom end of the unit free of the rail and lift the unit from the rail.3.2MAC ID and Default IP AddressThe default IP address of a Anybus Modbus-TCP/RTU Gateway is 10.200.1.n ,where n corre-sponds to the last number in the MAC ID,which is printed on the label on the side of the unit.The MAC ID is in hexadecimal format.If the MAC ID is 00:30:11:FA:00:1F ,the IP address will be 10.200.1.31,since the hexadecimal value 1F =31.MAC IDFig.4Label with MAC ID3.3ConnectionsIn this document the TIA-232/485serial communication standards are referred to as RS-232/485when describing hardware,and as EIA-232/485in the software interface.3.3.1Terminal BlockFig.5Terminal blockTerminal block connectionsDescriptionPower 9–24V DC/AC groundDigital Input 2+(10–24VDC)Digital Input 1+(10–24VDC)Digital Input Common -used usedRS-232Receive RS-232TransmitSerial common (signal ground)RS-485Line A RS-485Line B3.3.2D-sub ConnectorThe 9-pin male D-sub connector provides an RS-232interface.The Anybus Modbus-TCP/RTU Gateway is configured as a DTE device.Fig.6D-sub connectorD-sub connector pin layout3.3.3Ethernet ConnectorThe RJ-45socket provides a 10/100Mbps Ethernet networkconnection.Fig.7Ethernet connectorEthernet connector pin layout3.4LED IndicatorsFig.8LED Indicators4Configuration4.1IP Configuration4.1.1Installing the IPconfig UtilityIPconfig is a Windows-based tool used for TCP/IP network configuration of a HMS devices.Thetool will detect all connected devices and allow configuration of their IP address,netmask,de-fault gateway,DNS and hostname.1.Download IPconfig from /support.2.Extract the contents of the zip archive in a folder on your computer and double-click theexecutable file to run the installer.4.1.2Scanning for Connected DevicesMake sure that the devices to be configured are connected on the same Ethernet subnet as thecomputer running e standard Ethernet cables.When IPconfig utility started it will scan the available local networks.All detected devices will bepresented in a list in the main window.To refresh the list,click on Scan.4.1.3Ethernet ConfigurationTo change the TCP/IP settings for a device,either double-click on the entry or right-click on itand select Configuration.Fig.10Ethernet configurationNotes•Do not enable DHCP if there is no DHCP server available on the network.See also IPconfig Settings,p.11•You can add a name for the device in the Hostname field.Only characters a-z,A-Z, 0–9and_(underscore)are allowed.•The default password for authentication of the new settings is admin.To change the password,check the Change password box and enter the current password in thePassword field and the new password in the New password field.Click Set to save the new settings.The device will be automatically restarted.The new settingscan be tested by opening a web browser and entering the IP address assigned to the device.4.1.4IPconfig SettingsAdditional settings for IPconfig can be accessed by clicking on Settings.settingsCheck this option to select a specific network interface to usedevices on a computer with multiple interfaces.Server If a device has been set to use DHCP but there is no DHCPnetwork,the device may no longer be detected in a scan.Toan internal DHCP server in IPconfig can be activated.Click the checkbox to enable the option,then click OK to closeIPconfig will automatically refresh,and the missing device shoulddetected.Select the device and change its configuration to useaddressing instead of DHCP.Disable the internal DHCP server after the device has been4.2Web Configuration InterfaceRight-click on the entry for the gateway in IPconfig and select Open Web Interface to open itslocal web server in your default browser.You can also type the IP address directly into the webbrowser address field.The default login user name is admin and the default password is admin.Fig.12Logging in to the web interface4.2.1NetworkFig.13Network settingsThe Network settings page allows viewing and changing the TCP/IP settings.These are thesame settings as those entered in IPconfig.When DHCP is enabled the unit will automatically receive the settings for IP address,subnetmask,default gateway,and DNS.Contact your network administrator if in doubt.Click on Save Settings to save the new configuration.4.2.2ModbusFig.14Modbus settings4.2.3StatusFig.15Status page4.2.4AdminFig.16Admin pageThis page allows you to change the default password for the gateway.The user name cannotbe changed.A Internal RegistersAppendix B:Technical Data17(20)B Technical DataTechnical SpecificationsAppendix C:Regulatory Compliance18(20) C Regulatory ComplianceThis product is in compliance with the EMC directive2014/30/EC through conformance with thefollowing standards:EN61000-6-4(2007)Emission standard for industrial environment•EN55016-2-3,Class A(2010)•EN55022,Class A(2011)EN61000-6-2(2005)Immunity for industrial environment•EN61000-4-2(2009)•EN61000-4-3(2006)•EN61000-4-4(2012)•EN61000-4-5(2014)•EN61000-4-6(2014)E214107Field wiring terminals shall be connected with minimum wire size24AWG.This page intentionally left blankHMSI-168-77 3.0./UTC©2016HMS Industrial Networks AB。

modbussdk用户手册

modbussdk用户手册

M O D B U S S D K用户手册-CAL-FENGHAI-(2020YEAR-YICAI)_JINGBIANZModbusSdk配置函数库使用手册V1.001 函数库说明 (4)1.1 简介: (4)1.2 提供的函数接口 (4)1.2.1 以太网链路连接 (4)1.2.2 串口链路连接 (5)1.2.3 以太网与串口链路断开连接 (7)1.2.4 以太网与串口链路的数据采集(读写) (7)2 错误代码 (16)1函数库说明1.1 简介:ZModbusSdk函数库为标准的MODBUS(主机)协议提供函数接口。

开发人员可以使用此函数库方便开发出遵循MODBUS协议的程序。

如果需要开发MODBUS从机程序,开发人员需要使用其他的函数库或方法。

函数库在连接时使用对不同的链路层提供不同的函数接口如:以太网的为:ZMB_TCPConnectMDBServer,串口的为:ZMB_SerConnectMDBServer。

其他的函数接口都相同,不区分连接链路。

(本文档中使用的术语服务器对应MODBUS协议里的从机模块,客户机对应MODBUS协议里的主机模块)1.2 提供的函数接口ZModbusSdk提供了连接到从机(服务器)和读写线圈与寄存器的函数接口。

1.2.1以太网链路连接➢ZMB_TCPConnectMDBServer描述调用此函数连接到从机模块(或服务器)。

HANDLE ZMB_TCPConnectMDBServer( char * szIp,int nDstPort,int nConnTimeout);参数szIp指定要进行连接的从机(服务器)的IP地址。

nDstPort指定从机的端口号。

nConnTimeout指定连接超时。

返回值返回“非NULL”表示成功,否则为错误。

1.2.2串口链路连接➢ZMB_SerConnectMDBServer(串口主机使用)描述调用此函数连接到从机模块(或服务器)。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

I/O Point
Condition
×
×
×
Feed to Position
FP 0x67
×
Follow Encoder
FE 0xCC
I/O Point
Condition
×
×
×
Feed to Length
FL 0x66
×
×
×
×
×
Feed to Sensor with Mask Distance
FM
0x6A
I/O Point
Condition
×
×
×
Feed and Set Output
FO 0x68
6.1 操作码
Modbus/RTU寄存器表中寄存器40125被定义为Command Opcode(操作码),对40125寄存器写入相应 的操作码,即执行相应操作码的动作,可写入的操作码,下图可见:
SCL Command Encoding Table
Function
SCL Opcode Parameter 1 Parameter 2 Parameter 3 Parameter 4 Parameter 5
版本:1.0
2
12/16/2015
Modbus/RTU 用户手册
1 Modbus/RTU定义
Modbus协议,由MODICON公司设计,是一种允许主站和一个或多个从站共享数据的总线协议,数据 由16位的寄存器构成。主站可以读写单个寄存器或者多个寄存器。 Modicon控制器上的标准Modbus端口是使用一个RS-232兼容的串行接口,定义了连接器,接线电缆, 信号等级,传输波特率和奇偶校验。控制器通讯使用主从技术,即主机能起动数据传输,称查询。而其 它设备(从机)返回对查询作出的响应,或处理查询所要求的动作。主机设备应包括主处理器,编程器和 PLC。从机包括可编程控制器,伺服驱动器和步进驱动器。其主从查询-反馈机制如下所示:
4.1 主站通讯参数的设置
1. 波特率:与从站一致; 2. 数据位:8位数据位; 3. 停止位:1位停止位; 4. 校验位:没有校验位。
4.2 从站MOONS’驱动器通讯参数的配置
1. 从站地址:同一个网络中,每一个从站都有唯一的地址。同样,也可以通过MOONS’ SCL语言 指令进行设定,SCL中地址指令为DA.
地址域
功能码
数据
CRC校验码(2个字节)
3 Modbus/RTU接线
Modbus/RTU与标准的RS-232或RS-485有共同的物理层,可以配置1~32个从站地址;以拓扑结构构 建RS-422/485网络,通常在最后的从站设备并联120欧姆的终端电阻。Modbus/RTU支持全双工和半 双工的接线方式,通常我们建议以全双工接线方式构建RTU通讯网络。 四线制全双工接线方式如图所示:
Modbus/RTU
用户手册
上海安浦鸣志自动化设备有限公司
版本:1.0 12/16/2015
Modbus/RTU 用户手册
目录
1 Modbus/RTU定义 ......................................................................................... 3 2 Modbus/RTU报文格式.................................................................................. 4 3 Modbus/RTU接线 ......................................................................................... 4 4 Modbus/RTU配置 ......................................................................................... 5
to Host GND to Host Rxto Host Rx+ to Host Tx-
120
to Host Tx+
+Rx- +Tx- GND
Drive 1
+Rx- +Tx- GND
Drive 2
+Rx- +Tx- GND
Drive n
两线制半双工接线方式如图所示:
to Host GND
to Host Tx- (A)
7.3.1 MOONS’驱动器内部Q程序例程 ........................................ 11 7.3.2 Q程序变量对照表................................................................. 11 7.3.3 MOONS’ 兼容Modbus/RTU驱动器设置 ............................ 11 7.3.4 Modbus 主站报文写入操作 .................................................. 12 附录1 功能码报文格式 ................................................................................... 14 附录2 Modbus/RTU不正常的响应及代码 ...................................................... 16 附录3 CRC校验 ............................................................................................. 17 附录4 Modbus/RTU16位CRC校验例程 ......................................................... 19 附录5 Modbus/RTU寄存器表......................................................................... 22 ST&STAC&STM&SWM系列 ................................................................... 22 STB系列 .................................................................................................. 25 SS/RS/SSM/TSM/TXM系列 .................................................................... 29 M2 系列.................................................................................................... 34 附录6 支持Modbus/RTU协议MOONS’驱动器型号 ..................................... 41 联系 MOONS’ .............................................................................................. 42
to Host Tx+ (B)
120
+Rx- +Rx- +Tx- GND
Drive 2
+Rx- +Tx- GND
Drive n
版本:1.0
4
12/16/2015
Modbus/RTU 用户手册
4 Modbus/RTU配置
通过MOONS’网站()下载相应产品的调试软件,通过软件配置Modbus/RTU通讯 的参数如下:
Alarm Reset
AX 0xBA
×
×
×
×
×
Start Jogging
CJ 0x96
×
×
×
×
×
Stop Jogging
SJ 0xD8
×
×
×
×
×
Encoder Function
EF 0xD6
0,1,2 or 6
×
×
×
×
Encoder Position
EP 0x98
Position
×
×
×
×
Feed to Double Sensor FD 0x69 I/O Point 1 Condition 1 I/O Point 2 Condition 2
主机查询信息
设备地址 功能代码
8位 数据字节
错误校验
设备地址 功能代码
8位 数据字节
错误校验
从机响应信息
3
版本:1.0
12/16/2015
Modbus/RTU 用户手册
2 Modbus/RTU报文格式
Modbus/RTU是一种主从技术,且CRC校验范围为从设备地址位到数据位;各功能码的详细报文格 式,请见附录。Modbus/RTU的消息帧如下:
5 Modbus/RTU支持的功能码
MOONS’驱动器目前支持如下的Modbus功能码: 1) 0x03:读保持寄存器; 2) 0x04:读输入寄存器; 3) 0x06:写单个寄存器: 4) 0x10:写多个寄存器。
5
版本:1.0
12/16/2015
Modbus/RTU 用户手册
相关文档
最新文档