187
05
Forcetheswitchstatusofsinglecoil(00000~0XXXX)
ForceSingleCoil
(output)
06 Pre-setthedataofsingleregister
(40000~4XXXX)
Setsingleoutputregister
15
Forcemulti-coilson/offbit(00000~0XXXX)
16
Writemulti-holdingregistersdata(40000~4XXXX)
4.Whereistosavethepre-configurationdatathatwouldbewrittentoSlave.Itcontains2kindwaysto
pre-configuration.Oneisautomode,thisdatausestheflagsintheprogram,suchasFM,AFM,I,Qand
AQ.Themanualmodeisinputafixedvalueorbitstatus.
Example1
WritetheI2bitstatusofMasterxLogictoSlavexLogicwithNo.1andcontrolQ1ofSlaveviaRS485port.
Theprogramofmastercanbemadeasfollows: