180
Connection Description
Input En AhighsignalatEninputwillenable “ModbusRead” functionblocktobeactivated
Input R Resetthevaluereadfromperipheralandsettheoutputto0viatheR(Reset)
input.
ResethaspriorityoverEn
Parameter Slaveaddress:1isdefault.
Communicationprotocol: Modbus(RTU)
Communicationparameter: baudrate(BPS),Databits,Stopbits,
Parity, Overtime(responsetimeout)
CommType: RS232orRS485(CommunicationinterfaceofxLogic)
DataregisterIndex: HighLow/LowHigh
Command: 01Readcoils(0x)
02ReadDiscreteInput(1x)
03ReadHoldingRegisters(4x)
04ReadInputRegisters(3x)
Registerstartaddress,count
Output Q Qissetorresetdependingonthecommunicationstatus.
Successfulcommunication,Q=1;
Failedcommunication,Q=0;
Note:1. DataregisterIndex:HighLow/LowHigh
Forexample,whenHighLowindexwasset,onedata0x0012wasreadandsavedtoAQ,AQ=0X0012;
however,whenLowHighindexwasset,AQ=0x1200
RegardingModbusRTUdetail,pleaserefertoourModbusRTUcommunicationprotocolfileforit.
Descriptionofthefunction:
IntheconfigurationofourxLogiccommunication,thexLogicusuallyservesasaslaveviaModbusRTU
Protocol,andcancommunicatewithamasterdirectly.That’stosay,anydevicecommunicatingwith
xLogicsendscommandtoit,andthenitsresponsewillbesentoutonlywhenthexLogichasreceivedthe
command,Justasthebelowfigureshows:
However,the “ModbusRead” or “ModbusWrite”(nextchapterwillintroduceit)functionblockwouldbe
utilizedifxLogicshallberequiredtoplayaroleofmastertocommunicatewithotherdevices.Asthe
followingfigureshows: