MODBUS_CLIENT_INIT (FUNC)

Navigation:  Libraries > CT Modbus Client >

MODBUS_CLIENT_INIT (FUNC)

Previous pageReturn to chapter overviewNext page

This function block initialises Modbus communications between the client and the server.

 

 

Inputs:

 

xExecute : BOOL;  If TRUE will execute the function block if the last execution state was FALSE.

 

xBlocking : BOOL: Defines if the function block is blocking or non-blocking.

 

 

Outputs:

 

xDone : BOOL; If TRUE the Function Code has been executed successfully.

 

xBusy : BOOL; The initialisation is in progress.

 

xError : BOOL; The initialisation has failed.

 

 

Example in FBD:

 

 

MODBUS_CLIENT_INIT

 

Example in ST:

 

 // Declare an instance of MODBUS_CLIENT_INIT

 FB_ModbusInit: MODBUS_CLIENT_INIT;

 

 FB_ModbusInit.xExecute:=TRUE;

 

 // Modbus Initialisation OK, proceed to next step

 IF FB_ModbusInit.xDone THEN

         FB_ModbusInit.xExecute := FALSE; // reseting ModbusInit.xExecute Input

 END_IF