hi..
can we configuration 750-1652 using codesys v3.5 programming? like baudrate, parity, stop bit etc. right now we use Wago IO-Check software for configuration. we want to configure 750-1652 via codesys programming. so that any library or sample codesys program or is there documentation on how to configure the 750-1652 module in Codesys 3.5?
hello, yes normally you can configure those in codesys using the function blocks.
What protocol are we talking about ?
Thank you…
we use Modbus RTU communication protocol and kindly confirm that can we use below “mySerialMaster” Function Block for write configure into the 750-1652 ? or any other Function Block.
mySerialMaster : FbMbMasterSerial := ( xConnect := TRUE,
udiBaudrate := 9600,
usiDataBits := 8,
eParity := WagoTypesCom.eTTYParity.None,
eStopBits := WagoTypesCom.eTTYStopBits.One,
eHandshake := WagoTypesCom.eTTYHandshake.None,
ePhysical := WagoTypesCom.eTTYPhysicalLayer.RS485,
eFrameType := eMbFrameType.RTU,
tTimeOut := T#50MS
);
//--- Identification Object for use of FC43 (in case the slave support it) ------
myBaseIdentification : FbIdentifyBaseObject; // only needed for FC43
//-------------------------------------------------------------------------------
utQuery : typMbQuery := ( bUnitId := 1, // Slaveaddress
bFunctionCode := 16#04, // read input registers
IIdentifyObject := myBaseIdentification, // only needed for FC43
uiReadAddress := 0, // Startaddress
uiReadQuantity := 10, // Quantity of wanted registers
uiWriteAddress := 0, // not needed for FC4
uiWriteQuantity := 0, // not needed for FC4
awWriteData := [124(0)] // not needed for FC4
);
xTxTrigger : BOOL; (* Set this variable once for start a job.
This variable will be automaticly reset by the master
if the job is done.
*)
utResponse : typMbResponse; (* After the job is done you can find at this structure
the result.
*)
tonDelay : TON := (PT := T#20MS); // This is the silence time between two requests
END_VAR
//--- delay between two requests ----------------------
tonDelay( IN := (NOT tonDelay.Q) AND (NOT xTxTrigger));
xTxTrigger S= tonDelay.Q; // trigger the next request
//--- call cyclic the master --------------
mySerialMaster( I_Port := COM1, // my serial port
utQuery := utQuery,
xTrigger := xTxTrigger,
utResponse := utResponse
);
//-----------------------------------------