VisuLoginProvider.SetUsers (METH) ¶ METHOD SetUsers : BOOL InOut: Scope Name Type Return SetUsers BOOL Input udiUserCount UDINT pArrUsers POINTER TO ARRAY [0..(MAX_VISIBLE_USERS - 1)] OF VUM_User
VisuUserMgmtProvider.SetUserCount (METH) ¶ METHOD SetUserCount : BOOL InOut: Scope Name Type Return SetUserCount BOOL Input udiUserCount UDINT
VisuUserMgmtProvider.SetUserDB (METH) ¶ METHOD SetUserDB : BOOL InOut: Scope Name Type Return SetUserDB BOOL Input udiUserDB UDINT
VisuUserMgmtProvider.SetUsers (METH) ¶ METHOD SetUsers : BOOL InOut: Scope Name Type Return SetUsers BOOL Input udiUserCount UDINT pArrUsers POINTER TO ARRAY [0..(MAX_VISIBLE_USERS - 1)] OF VUM_User
ClientRequestWriteMultipleRegisters (FB) ¶ FUNCTION_BLOCK ClientRequestWriteMultipleRegisters EXTENDS ClientRequestWriteMultiple WriteMultipleRegisters client request (FC16). For details about client request see ClientRequest . InOut: Scope Name Type Initial Comment Inherited from Input xExecute BOOL Rising edge: Starts defined operation FALSE : Resets the defined operation after ready condition was reached ETrigTo udiTimeOut UDINT Max. operating time for executing [µs], 0: No operating time limit ETrigTo Output xDone BOOL Ready condition reached ETrigTo xBusy BOOL Operation is running ETrigTo xError BOOL Error condition reached ETrigTo Inout rClient Client Reference to Client . ClientRequest Input uiUnitId UINT 0 Unit-Id to send the request to. ClientRequest udiReplyTimeout UDINT (50 * 1000) Reply timeout in µs - accepted maxmimum time between request message send and reply message receveived - default 50ms. ClientRequest uiMaxRetries UINT 0 Maximum number of request retries in case of “reply timeout”. ClientRequest Output eErrorID Error Error status ClientRequest eException ExceptionCodes Request exception code. ClientRequest uiRetryCnt UINT 0 Number of request retries in case of “reply timeout”. ClientRequest Input uiStartItem UINT 0 First “data item” to write. ClientRequestWriteMultiple uiQuantity UINT 1 Number of “data items” to write. ClientRequestWriteMultiple pData POINTER TO ARRAY [0..0] OF UINT 0 Pointer to write data array.
ClientRequestWriteSingle (FB) ¶ FUNCTION_BLOCK ABSTRACT ClientRequestWriteSingle EXTENDS ClientRequest WriteSingle client request base class for WriteSingleCoil, WriteSingleRegister and MaskWriteRegister. InOut: Scope Name Type Initial Comment Inherited from Input xExecute BOOL Rising edge: Starts defined operation FALSE : Resets the defined operation after ready condition was reached ETrigTo udiTimeOut UDINT Max. operating time for executing [µs], 0: No operating time limit ETrigTo Output xDone BOOL Ready condition reached ETrigTo xBusy BOOL Operation is running ETrigTo xError BOOL Error condition reached ETrigTo Inout rClient Client Reference to Client . ClientRequest Input uiUnitId UINT 0 Unit-Id to send the request to. ClientRequest udiReplyTimeout UDINT (50 * 1000) Reply timeout in µs - accepted maxmimum time between request message send and reply message receveived - default 50ms. ClientRequest uiMaxRetries UINT 0 Maximum number of request retries in case of “reply timeout”. ClientRequest Output eErrorID Error Error status ClientRequest eException ExceptionCodes Request exception code. ClientRequest uiRetryCnt UINT 0 Number of request retries in case of “reply timeout”. ClientRequest Input uiItem UINT 0 “data item” to write.
ClientRequestWriteSingleCoil (FB) ¶ FUNCTION_BLOCK ClientRequestWriteSingleCoil EXTENDS ClientRequestWriteSingle WriteSingleCoil client request (FC05). For details about client request see ClientRequest . InOut: Scope Name Type Initial Comment Inherited from Input xExecute BOOL Rising edge: Starts defined operation FALSE : Resets the defined operation after ready condition was reached ETrigTo udiTimeOut UDINT Max. operating time for executing [µs], 0: No operating time limit ETrigTo Output xDone BOOL Ready condition reached ETrigTo xBusy BOOL Operation is running ETrigTo xError BOOL Error condition reached ETrigTo Inout rClient Client Reference to Client . ClientRequest Input uiUnitId UINT 0 Unit-Id to send the request to. ClientRequest udiReplyTimeout UDINT (50 * 1000) Reply timeout in µs - accepted maxmimum time between request message send and reply message receveived - default 50ms. ClientRequest uiMaxRetries UINT 0 Maximum number of request retries in case of “reply timeout”. ClientRequest Output eErrorID Error Error status ClientRequest eException ExceptionCodes Request exception code. ClientRequest uiRetryCnt UINT 0 Number of request retries in case of “reply timeout”. ClientRequest Input uiItem UINT 0 “data item” to write. ClientRequestWriteSingle xValue BOOL FALSE
ClientRequestWriteSingleRegister (FB) ¶ FUNCTION_BLOCK ClientRequestWriteSingleRegister EXTENDS ClientRequestWriteSingle WriteSingleRegister client request (FC06). For details about client request see ClientRequest . InOut: Scope Name Type Initial Comment Inherited from Input xExecute BOOL Rising edge: Starts defined operation FALSE : Resets the defined operation after ready condition was reached ETrigTo udiTimeOut UDINT Max. operating time for executing [µs], 0: No operating time limit ETrigTo Output xDone BOOL Ready condition reached ETrigTo xBusy BOOL Operation is running ETrigTo xError BOOL Error condition reached ETrigTo Inout rClient Client Reference to Client . ClientRequest Input uiUnitId UINT 0 Unit-Id to send the request to. ClientRequest udiReplyTimeout UDINT (50 * 1000) Reply timeout in µs - accepted maxmimum time between request message send and reply message receveived - default 50ms. ClientRequest uiMaxRetries UINT 0 Maximum number of request retries in case of “reply timeout”. ClientRequest Output eErrorID Error Error status ClientRequest eException ExceptionCodes Request exception code. ClientRequest uiRetryCnt UINT 0 Number of request retries in case of “reply timeout”. ClientRequest Input uiItem UINT 0 “data item” to write. ClientRequestWriteSingle uiValue UINT 0
ClientSerial (FB) ¶ FUNCTION_BLOCK ClientSerial EXTENDS Client IMPLEMENTS ISysComUser MODBUS serial client (master). Please note: some input variables related to connection configuration are read when rising edge on xConnect occurs. To change connection configuration the application needs to - disconnect (xConnect := FALSE and execute the FB) - modify the related input variables - connect (xConnect := TRUE and execute the FB) The Client provides some statistics of sent request messages and received valid reply messages. Invalid messages are dropped at the communication level, so doesnt appear in the statistics. To analyse situations where invalid reply messages might occur, you can use udiLogOptions with LoggingOptions.WarnOnReceivedInvalidFrames. The maximum number of serial ports usable with ClientSerial / ServerSerial is limited to MAX_NUM_COMPORTS. In case there is a need to use more serial ports, anyone can set the library parameter MAX_NUM_COMPORTS within an application - see Library Manager -> ModbusFB -> Parameter -> MAX_NUM_COMPORTS. Please visit https://forge.codesys.com/prj/codesys-example/modbus/home to find examples. InOut: Scope Name Type Initial Comment Inherited from Input xConnect BOOL FALSE Connect to server (slave). Client Output xConnected BOOL Client (master) is connected to server (slave). Client xError BOOL Error Client eErrorID Error Error status Client udiNumMsgSent UDINT Number of request messages send since connect. Client udiNumMsgReply UDINT Number of reply messages received since connect. Client udiNumMsgExcReply UDINT Number of exception reply messages received since connect. Client udiNumMsgExcReplyIllFct UDINT Number of exception reply messages received since connect, signaling illegal function. Client udiNumMsgExcReplyIllDataAdr UDINT Number of exception reply messages received since connect, signaling illegal data address. Client udiNumReplyTimeouts UDINT Number of reply timeouts since connect. Client udiNumReqNotProcessed UDINT Number of requests not processed in time (“request starvation”) since connect. Client udiNumReqParamError UDINT Number of requests started with parameter error, for example “Read Coils” -> “Quantity of coils” = 0. Client udiLastTransactionTime UDINT Transaction time in ms - time difference between request message send und reply message received. Client Input iPort SysCom.SYS_COM_PORTS SysCom.SYS_COM_PORTS.SYS_COMPORT_NONE Serial port, only read when rising edge on xConnect occurs. dwBaudrate SysCom.SYS_COM_BAUDRATE SysCom.SYS_COM_BAUDRATE.SYS_BR_115200 Baud rate, only read when rising edge on xConnect occurs. byDataBits BYTE 8 Number of data bits/BYTE, 5-8, only read when rising edge on xConnect occurs. eParity SysCom.SYS_COM_PARITY SysCom.SYS_COM_PARITY.SYS_NOPARITY Parity, only read when rising edge on xConnect occurs. eStopBits SysCom.SYS_COM_STOPBITS SysCom.SYS_COM_STOPBITS.SYS_ONESTOPBIT Stop bits, only read when rising edge on xConnect occurs. eDTRcontrol SYS_COM_DTR_CONTROL SysCom.SYS_COM_DTR_CONTROL.SYS_DTR_CONTROL_DISABLE DTR control, only read when rising edge on xConnect occurs. eRTScontrol SysCom.SYS_COM_RTS_CONTROL SysCom.SYS_COM_RTS_CONTROL.SYS_RTS_CONTROL_DISABLE RTS control, only read when rising edge on xConnect occurs. eRtuAscii RtuAscii RtuAscii.RTU RTU / ASCII, only read when rising edge on xConnect occurs. udiLogOptions UDINT LoggingOptions.ClientConnectDisconnect Logging options.
ClientTCP (FB) ¶ FUNCTION_BLOCK ClientTCP EXTENDS Client MODBUS TCP client (master). Please note: some input variables related to connection configuration are read when rising edge on xConnect occurs. To change connection configuration the application needs to - disconnect (xConnect := FALSE and execute the FB) - modify the related input variables - connect (xConnect := TRUE and execute the FB) The Client provides some statistics of sent request messages and received valid reply messages. Invalid messages are dropped at the communication level, so doesnt appear in the statistics. To analyse situations where invalid reply messages might occur, you can use udiLogOptions with LoggingOptions.WarnOnReceivedInvalidFrames. Please visit https://forge.codesys.com/prj/codesys-example/modbus/home to find examples. InOut: Scope Name Type Initial Comment Inherited from Input xConnect BOOL FALSE Connect to server (slave). Client Output xConnected BOOL Client (master) is connected to server (slave). Client xError BOOL Error Client eErrorID Error Error status Client udiNumMsgSent UDINT Number of request messages send since connect. Client udiNumMsgReply UDINT Number of reply messages received since connect. Client udiNumMsgExcReply UDINT Number of exception reply messages received since connect. Client udiNumMsgExcReplyIllFct UDINT Number of exception reply messages received since connect, signaling illegal function. Client udiNumMsgExcReplyIllDataAdr UDINT Number of exception reply messages received since connect, signaling illegal data address. Client udiNumReplyTimeouts UDINT Number of reply timeouts since connect. Client udiNumReqNotProcessed UDINT Number of requests not processed in time (“request starvation”) since connect. Client udiNumReqParamError UDINT Number of requests started with parameter error, for example “Read Coils” -> “Quantity of coils” = 0. Client udiLastTransactionTime UDINT Transaction time in ms - time difference between request message send und reply message received. Client Input aIPaddr ARRAY [0..3] OF BYTE [255, 255, 255, 255] ETH server (slave) address, only read when rising edge on xConnect occurs. uiPort UINT 502 ETH server (slave) port, only read when rising edge on xConnect occurs. tConnnectTimeOut TIME TIME#1s0ms Connect timeout (in milliseconds), only read when rising edge on xConnect occurs. udiLogOptions UDINT LoggingOptions.ClientConnectDisconnect Logging options.