IoDrvModbusSerialSlave.UpdateUnitID (METH) ¶ METHOD UpdateUnitID : UDINT Update the configured address of the Modbus Server. Only possible if server is disabled (see xEnable Input). InOut: Scope Name Type Return UpdateUnitID UDINT Input UnitID BYTE
ModbusSerialDeviceDiag.UpdateComPortSettings (METH) ¶ METHOD UpdateComPortSettings : UDINT Update the configured Com-Port settings of the Modbus Server. Only possible if server is disabled (see xEnable Input). InOut: Scope Name Type Initial Comment Return UpdateComPortSettings UDINT Input ComPort INT 0 Number of the COM Port to use Baudrate UDINT 19200 1200, 2400, 4800, …, 115000 bps Parity COM_Parity COM_Parity.SYS_EVENPARITY EVEN:=2, ODD:=1 or NONE:=0
ModbusSerialDeviceDiag.UpdateUnitID (METH) ¶ METHOD UpdateUnitID : UDINT Update the configured address of the Modbus Server. Only possible if server is disabled (see xEnable Input). InOut: Scope Name Type Return UpdateUnitID UDINT Input UnitID BYTE
ModbusServer (FB) ¶ FUNCTION_BLOCK ModbusServer InOut: Scope Name Type Initial Comment Input byUnitID BYTE wPort: WORD:= 502; // Modbus server port - 502 is Modbus default comPortSettings ComSettings Comport Settings pInputData POINTER TO WORD Input Registers pOutputData POINTER TO WORD Holding Registers uiInputDataSize UINT Size in words of Input Register data area uiOutputDataSize UINT Size in words of Holding Register data area xEnable BOOL FALSE Flag to enable execution - default is FALSE xReset BOOL FALSE Flag to reset - default is FALSE tTimeout UDINT 0 Modbus Write timeout, resets outputs if passed EOFDetectionTimeout UDINT 0 Timeout for end of frame detection (in micro-seconds!), if not set the default of (3.5 char times is used) Output xError BOOL FALSE Properties: IsComPortValid Structure: IsComPortValid (Property)
ModbusServer.IsComPortValid (PROP) ¶ PROPERTY IsComPortValid : BOOL
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 23.11.2021, 07:08:39 companyName string 3S-Smart Software Solutions GmbH libraryFile IoDrvModbusSerialSlave.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP16 Patch 3 contentFile IoDrvModbusSerialSlave.clean.json version version 2.0.0.0 ProjectInformation Released bool False LastModificationDateTime date 23.11.2021, 07:08:39 LibraryCategories library-category-list Intern|IoDrivers Author string 3S - Smart Software Solutions GmbH Company 3S - Smart Software Solutions GmbH CompiledLibraryCompatibilityVersion CODESYS V3.5 SP16 DefaultNamespace IoDrvModbusSerialSlaveLibrary Description See: Description DocFormat reStructuredText Placeholder IoDrvModbusSerialSlave Project IoDrvModbusSerialSlave Title IoDrvModbusSerialSlave Version version 4.1.0.0
Library Reference ¶ This is a dictionary of all referenced libraries and their name spaces. 3SLicense ¶ Library Identification ¶ Placeholder: 3SLicense Default Resolution: 3SLicense, * (3S - Smart Software Solutions GmbH) Namespace: _3S_LICENSE Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: 3SLicense Base Interfaces ¶ Library Identification ¶ Name: Base Interfaces Version: newest Company: System Namespace: IBaseLibrary Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: Base Interfaces, * (System) CAA Device Diagnosis ¶ Library Identification ¶ Placeholder: CAA Device Diagnosis Default Resolution: CAA Device Diagnosis, * (CAA Technical Workgroup) Namespace: DED Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: CAA Device Diagnosis CmpErrors2 Interfaces ¶ Library Identification ¶ Name: CmpErrors2 Interfaces Version: newest Company: System Namespace: CmpErrors Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: CmpErrors2 Interfaces, * (System) CmpLog ¶ Library Identification ¶ Placeholder: CmpLog Default Resolution: CmpLog, * (System) Namespace: CmpLog Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: CmpLog IoDriver Interfaces ¶ Library Identification ¶ Name: IoDriver Interfaces Version: newest Company: System Namespace: IoDriver_Interfaces Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: IoDriver Interfaces, * (System) IoDriver Parameter Interfaces ¶ Library Identification ¶ Name: IoDriver Parameter Interfaces Version: newest Company: System Namespace: IIoDrvParameter Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: IoDriver Parameter Interfaces, * (System) IoDrvBase ¶ Library Identification ¶ Placeholder: IoDrvBase Default Resolution: IoDrvBase, * (System) Namespace: IoDrvBase Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: IoDrvBase IoDrvModbusBase ¶ Library Identification ¶ Placeholder: IoDrvModbusBase Default Resolution: IoDrvModbusBase, * (3S - Smart Software Solutions GmbH) Namespace: IoDrvModbusBase Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: True SystemLibrary: False Key: IoDrvModbusBase IoStandard ¶ Library Identification ¶ Placeholder: IoStandard Default Resolution: IoStandard, * (System) Namespace: IoStandard Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: IoStandard Standard ¶ Library Identification ¶ Placeholder: Standard Default Resolution: Standard, * (System) Namespace: Standard Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: Standard SysCom ¶ Library Identification ¶ Placeholder: SysCom Default Resolution: SysCom, * (System) Namespace: SysCom Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysCom SysCpuHandling ¶ Library Identification ¶ Placeholder: SysCpuHandling Default Resolution: SysCpuHandling, * (System) Namespace: SysCpuHandling Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysCpuHandling SysMem ¶ Library Identification ¶ Placeholder: SysMem Default Resolution: SysMem, * (System) Namespace: SysMem Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysMem SysTarget ¶ Library Identification ¶ Placeholder: SysTarget Default Resolution: SysTarget, * (System) Namespace: SysTarget Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysTarget SysTypes2 Interfaces ¶ Library Identification ¶ Name: SysTypes2 Interfaces Version: newest Company: System Namespace: SysTypes Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysTypes2 Interfaces, * (System)
Sercos3_IDNRead (FB) ¶ FUNCTION_BLOCK Sercos3_IDNRead This functionn block could be used to read Sercos III slave parameter. In contrast TO Sercos3_IDNRead4 also parameters longer than 4 Bytes will be supported. The parameter TO be read is specified BY the IDN as used in the object dictionary. InOut: Scope Name Type Initial Comment Input xExecute BOOL On a rising edge at this input the reading of the slave parameter will be started. In order to get the internal channel deallocated, the instance must be called at least once by “xExecute:= FALSE”. xAbort BOOL FALSE If this parameter is TRUE, the current read process will be aborted. usiCom USINT 1 Number of the Sercos III master: If only one Sercos III master is used, usiCom is ‘1’. In case of multiple masters use ‘1’ for the first, ‘2’ for the second, etc. uiAddress UINT Topological address or Sercos address, depends on the parameter xIsSercosAddress xIsSercosAddress BOOL FALSE This input switches between topological address and Sercos address FALSE: uiAddress is the topological address TRUE: uiAddress is the Sercos address usiChannel USINT 1 Reserved for future extensions. Currently not used. dwIDN DWORD IDN (Identification Number) with 4 Bytes (SI (structure instance) and SE (structure element)) wElem WORD Value 1: Structure of the IDN Value 2: Name of the parameters Value 3: Data attributes Value 4: Unit Value 5: Minimal value Value 6: Maximal value Value 7: Data value udiTimeOut UDINT Here you can set a timeout in milliseconds. If the reading of the parameter has not been finished within this time, an error message will be generated. pBuffer POINTER TO BYTE 0 Pointer on a data buffer in which the data will be stored after a successful parameter transfer szSize CAA_SIZE 0 Size of the data buffer (see above: pBuffer) in Bytes. Output xDone BOOL This output is TRUE as soon as the command has been finished successfully. xBusy BOOL This output is TRUE as long as the execution of the command has not been finished. xError BOOL This output is TRUE, if an error is detected. eError will show the cause. eError SERCOS3_ERROR This output shows the cause of the detected error, which is indicated by xError. For example ‘SERCOS3_TIMEOUT’ in case of an timeout. udiSercosError UDINT Error code if the function block has not been finished successfully. szDataRead CAA_SIZE Number of read bytes; maximum szSize (see input parameters).
Sercos3_IDNRead4 (FB) ¶ FUNCTION_BLOCK Sercos3_IDNRead4 This function block could be used to read Sercos III slave parameter. In contrast to Sercos3_IDNRead only parameters not longer than 4 Bytes will be supported. The parameter to be read is specified by the IDN as used in the object dictionary. InOut: Scope Name Type Initial Comment Input xExecute BOOL On a rising edge at this input the reading of the slave parameter will be started. In order to get the internal channel deallocated, the instance must be called at least once by “xExecute:= FALSE”. xAbort BOOL FALSE If this parameter is TRUE, the current read process will be aborted. usiCom USINT 1 Number of the Sercos III master: If only one Sercos III master is used, usiCom is ‘1’. In case of multiple masters use ‘1’ for the first, ‘2’ for the second, etc. uiAddress UINT Topological address or Sercos address, depends on the parameter xIsSercosAddress xIsSercosAddress BOOL FALSE This input switches between topological address and Sercos address FALSE: uiAddress is the topological address TRUE: uiAddress is the Sercos address usiChannel USINT 1 Reserved for future extensions. Currently not used. dwIDN DWORD IDN (Identification Number) with 4 Bytes (SI (structure instance) and SE (structure element)) wElem WORD Value 1: Structure of the IDN Value 2: Name of the parameters Value 3: Data attributes Value 4: Unit Value 5: Minimal value Value 6: Maximal value Value 7: Data value udiTimeOut UDINT Here you can set a timeout in milliseconds. If the reading of the parameter has not been finished within this time, an error message will be generated. Output xDone BOOL This output is TRUE as soon as the command has been finished successfully. xBusy BOOL This output is TRUE as long as the execution of the command has not been finished. xError BOOL This output is TRUE, if an error is detected. eError will show the cause. eError SERCOS3_ERROR This output shows the cause of the detected error, which is indicated by xError. For example ‘SERCOS3_TIMEOUT’ in case of an timeout. udiSercosError UDINT Error code if the function block has not been finished successfully. abyData ARRAY [1..4] OF BYTE This is an array of 4 Bytes to which the read parameter data will be copied. If 1 Byte have been read, this will be stored in index 1 of the array. Values of 2 resp. 4 bytes will be copied to the array according to Intel byte order. usiDataLength USINT Number of read bytes (1,2,4).
Sercos3_IDNWrite (FB) ¶ FUNCTION_BLOCK Sercos3_IDNWrite This function block could be used to write Sercos III slave parameter. In contrast to Sercos3_IDNWrite4 also parameters longer than 4 Bytes will be supported. The parameter to be written is specified by the IDN as used in the object dictionary. InOut: Scope Name Type Initial Comment Input xExecute BOOL On a rising edge at this input the reading of the slave parameter will be started. In order to get the internal channel deallocated, the instance must be called at least once by “xExecute:= FALSE”. xAbort BOOL FALSE If this parameter is TRUE, the current write process will be aborted. usiCom USINT 1 Number of the Sercos III master: If only one Sercos III master is used, usiCom is ‘1’. In case of multiple masters use ‘1’ for the first, ‘2’ for the second, etc. uiAddress UINT Topological address or Sercos address, depends on the parameter xIsSercosAddress xIsSercosAddress BOOL FALSE This input switches between topological address and Sercos address FALSE: uiAddress is the topological address TRUE: uiAddress is the Sercos address usiChannel USINT 1 Reserved for future extensions. Currently not used. dwIDN DWORD IDN (Identification Number) with 4 Bytes (SI (structure instance) and SE (structure element)) wElem WORD Value 7: Data value udiTimeOut UDINT Here you can set a timeout in milliseconds. If the writing of the parameter has not been finished within this time, an error message will be generated. pBuffer POINTER TO BYTE 0 Pointer on a the buffer which contains the data to be written szSize CAA_SIZE 0 Size of the data buffer (see above: pBuffer) in Bytes. Output xDone BOOL This output is TRUE as soon as the command has been finished successfully. xBusy BOOL This output is TRUE as long as the execution of the command has not been finished. xError BOOL This output is TRUE, if an error is detected. eError will show the cause. eError SERCOS3_ERROR This output shows the cause of the detected error, which is indicated by xError. For example ‘SERCOS3_TIMEOUT’ in case of an timeout. udiSercosError UDINT Error code if the function block has not been finished successfully. szDataWritten CAA_SIZE Number of written Bytes; will be set to szSize after successful writing