SIMATIC Modbus/TCP Connection Of Sentron PAC 3200/4200 To A . - Siemens

Transcription

SIMATICModbus/TCPConnection of Sentron PAC 3200/4200 to aSIMATIC PN-CPUManual

Preface, table of contentsSIMATIC S7SIMATIC Modbus/TCPConnection of Sentron PAC3200/4200 to a SIMATIC PN-CPUManualProduct tics5Application example6AppendicesReferencesEdition 1.2

Safety noticesThis manual contains notices you have to observe in order to ensure your personal safety,as well as to prevent damage to property. The notices are highlighted by a warning triangle,and are presented according to degree of danger as follows:!Dangerindicates that death, severe personal injury, or considerable property damage will occur ifthe proper precautions are not taken.Warning!indicates that death, severe personal injury, or considerable property damage may occur ifthe proper precautions are not taken.Caution!indicates that minor personal injury or property damage can occur if the proper precautionsare not taken.Notehighlights important information on the product, using the product, orpart of the documentation that is of particular importance.QualifiedpersonnelA device may only be commissioned and operated by qualified personnel. For thepurpose of the safety information in this manual, "qualified personnel" are persons who areauthorized to commission, ground, and label equipment, systems, and circuits inaccordance with established safety standards.Proper usePlease observe the following:!WarningSiemens products may only be used for the applications described in the catalog and in therelevant technical documentation and in combination with third-party devices andcomponents recommended or approved by Siemens.Proper transport, storage, installation, assembly, as well as operation and maintenance arerequired to ensure that the product operates safely and without any problems. Trademarks SIMATIC and SIMATIC NET are registered trademarks of SIEMENS AG.The remaining designations in this publication may be trademarks whose use by thirdparties for their own purposes could violate the rights of the owner.Copyright Siemens AG 2012 All Rights ReservedDisclaimer of liabilityThe reproduction, transmission, or use of this document or itscontents is not permitted without express written authority. Violation ofthis rule can lead to claims for damage compensation. All rights,including rights created by patent grant or registration of a utilitymodel or design, are reserved.We have reviewed the contents of this publication to ensureconsistency with the hardware and software described. Sincevariance cannot be precluded entirely, we cannot guarantee fullconsistency However, the information in this publication is reviewedregularly and any necessary corrections are included in subsequenteditions. Suggestions for improvement are welcome.Siemens AGIndustry SectorIndustry Automation DivisionIndustrial Automation SystemsFactory AutomationI IA AS FA WF FTH 1P.O. Box 23 55, D- 90713 FürthTechnical data subject to change.

PrefacePrefacePurpose of theManualThe information in this manual allows you to set up and put in operation theconnection between a CPU with integrated PN interface and several PACdevices using Modbus/TCP.Contents of theManualThis manual describes the function of the Modbus function block and itsparameterization.The manual contains the following topics: Product description Commissioning Description of the blocks Licensing Diagnostics Application sampleScope of theManualThis manual is valid for the following software: SIMATIC Modbus/TCP 20 SENTRON PAC(6AV6676-6MA30-0AX0) V1.1.1 SIMATIC Modbus/TCP 100 SENTRON PAC(6AV6676-6MA30-1AX0) V1.1.1 SIMATIC Modbus/TCP 512 SENTRON PAC(6AV6676-6MA30-3AX0) V1.1.1The software contains the following blocks:BlocksFrom versionFC 99 „UDP MSG BUILDER“1.0FB 99 „UDP LOGGER“1.0FB 109 „MB PAC16“1.0FB 110 „MB PAC32“1.0FB 111 „MB PAC94“1.0FB 103 „TCP COMM“4.0DB 4 „UDP DATA“1.0NoteThis manual contains a description of the FBs that was valid at the time themanual was published.ModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.21

PrefaceAdditional Sourcesof InformationAll further information regarding the PN-CPUs and the IM 151-8 PN/DP CPU(installation, commissioning, etc.) can be found in the manual:SIEMENSSIMATIC S7-300CPU 31xC and CPU 31x: InstallationOperating InstructionsA5E00105491-07SIEMENSSIMATIC S7-300CPU 31xC und CPU 31x, Technical SpecificationsManualA5E00105474-07SIEMENSSIMATIC S7-400S7-400 Automation System: InstallationOperating InstructionsA5E00850740-01SIEMENSSIMATIC S7-400S7-400 Automation System, CPU stributed I/O ET 200SInterface Module IM151-8 PN/DP CPUOperating InstructionsA5E02049033-01SIEMENSProduct information onCPU315-2 PN/DP, 6ES7315-2EH13-0AB0CPU315F-2 PN/DP, 6ES7315-2FH13-0AB0CPU317-2 PN/DP, 6ES7317-2EK13-0AB0CPU317F-2 PN/DP, 6ES7317-2FK13-0AB0CPU319-3 PN/DP, 6ES7318-3EL00-0AB0CPU319F-3 PN/DP, 6ES7318-3FL00-0AB0A5E01103134-03Modbus/TCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.22

PrefaceFor information on PAC devices, please refer to the following manuals:SIEMENSSENTRONSENTRON PAC3200 Power Monitoring DeviceManualA5E01168664A-04For further information on STEP 7, please refer to the following manuals:SIEMENSSIMATIC SoftwareBasic Software for S7 and M7STEP 7 User ManualC79000-G7000-C502-.SIEMENSSIMATIC SoftwareSystem Software for S7-300/400System and Standard FunctionsReference ManualC79000-G7000-C503-02AdditionalQuestionsIf you have further questions regarding the use of the FBs described in thismanual, which are not answered in this document, please contact yourSiemens partner who supplied you with this function blocks.TerminologyThis document uses the term PN-CPU. The description applies to the PNCPUs of the series 300, 400 and for the IM 151-8 PN/DP CPU.The term PAC device is also used and applies the PAC3200 and PAC4200.Scope ofApplicationThe function blocks described in this manual establishes a connectionbetween a PN CPU and the PAC devices.ModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.23

Table of contentsTable of contents123Product description . 1-11.1Applications. 1-11.2Hardware and software requirements. 1-2Commissioning . 2-12.1Installing the library on the STEP 7 PG/PC . 2-12.2Adding function blocks . 2-22.3Connection configuration . 2-22.4Communication settings of the PAC . 2-32.5Creating the configuration block with the "Modbus/TCP PAC wizard". 2-32.6Calling the function blocks . 2-3Blocks of the Modbus – PAC communication . 3-13.1Configuration block CNF PAC . 3-23.2Data blocks for the PAC values . 3-43.3Function blocks MB PAC16, MB PAC32 and MB PAC94 . 3-73.3.1Functionality . 3-73.3.2Parameters of the FBs MB PAC16, MB PAC32 and MB PAC94 . 3-93.4Loggerblocks UDP LOGGER and UDP MSG BUILDER . 3-113.5Data and standard functions used by the FB . 3-123.6Renaming/rewiring of standard functions . 3-134Licensing . 4-15Diagnostics . 5-15.1Diagnostics via the display elements of the CPU . 5-25.2Diagnostics via PAC status bits in the CNF PAC . 5-35.3Diagnostics via LAST ERROR in the data block of the PAC device. 5-35.4Diagnostic messages of the FBs MB PAC16, MB PAC32 and MB PAC94 . 5-45.5Diagnostic messages of the blocks used . 5-75.6Diagnostic messages of the SFC24 . 5-76Application example . 6-1AReferences . 1ModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.2i

Product description1Product description1.1ApplicationsPositioning in thesystemenvironmentThe function blocks are a software product for CPUs with integrated PNinterface of the SIMATIC S7-300, S7-400 and IM 151-8 PN/DP CPU.Function of theFBsThese function blocks enable communication between a SIMATIC CPU withintegrated PN interface and several PAC devices.The maximum number of connectable PAC devices is 20, 100 or 512 PACs,depending on the license.A license cannot be transferred to another CPU.While communicating, the data of basic type 3 and the energy counters areread out and written to S7 data blocks. Furthermore, predefined counters inthe PAC device can be reset. Please refer to section 3.2 for a list of all PACvalues accessed.Product /blockdifferencesThe products SIMATIC Modbus/TCP 20 SENTRON PAC SIMATIC Modbus/TCP 100 SENTRON PAC and SIMATIC Modbus/TCP 512 SENTRON PACdiffer in the number of readable PAC devices. The number of PAC devicesis governed by licensing.Each of the products contains the function blocks MB PAC16, MB PAC32,and MB PAC94. The blocks differ only in the number of simultaneouslyusable connections.ModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.21-1

Product description1.2Hardware and software requirementsUsable ModulesforMB PAC16/32/94You can find the current hardware requirements here:http://www.siemens.com/s7modbus.Software VersionsThe FBs MB PAC16, MB PAC32 and MB PAC94 may be used with STEP7Version 5.5 or higher.MemoryRequirementsWork memory inkByteLoad memory inkByteMB PAC163134MB PAC323336MB PAC943638TCP COMM77UDP LOGGER66UDP MSG BUILDER11BlockModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.21-2

Commissioning2CommissioningGeneralInformationThe following STEP7 specifications refer to STEP7 Version 5.5. Processes,name and directory specifications may differ in later versions.PrerequisitesSTEP7 basic knowledge, STL knowledge, PLC basic knowledge2.1Installing the library on the STEP 7 PG/PCWhat We ProvideYouThe attached CD contains two setups. The first one installs the library"Modbus PAC", the example project, and the manuals in German andEnglish in the corresponding STEP7 directories. The second setup installs theModbus/TCP PAC Wizard.The manuals can also be found on the CD as PDF file.RequirementsTo perform the installation, STEP7 must be installed.InstallationInsert the Modbus CD in the CD-ROM drive of your PG/PC. If the setupprogram does not start automatically, the installation is performed as follows:1. Select the CD-ROM drive in Windows Explorer, open the directorySetup Modbus Lib, and double-click on the file SIMATIC Modbus/TCPSENTRON PAC V1.1.1.exe.2. Follow the instructions that the installation program displays step by step.3. Select the CD-ROM drive in Windows Explorer, open the directorySetup Wizard, and double-click on the file Setup PAC-Wizard.exe.You now find the library in\Program Files\Siemens\Step7\S7libs, the example project in \Program Files\Siemens\Step7\Examples, the manual in\Program Files\Siemens\Step7\S7manual\S7Comm, the Software Registration Form in\Program Files\Siemens\Step7\S7libs\Modbus PAC. The Modbus/TCP PAC wizard can be opened when clicking START - SIMATIC - Modbus/TCP PAC wizard.To access the Modbus library the first time, use the "Browse" function of theopen dialog for library.The manual can also be opened via the shortcut under \ProgramFiles\Siemens\Documentation.ModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.22-1

Commissioning2.2Adding function blocksMODBUS libraryBlocksThe following FBs are required for Modbus communication: MB PAC16 or MB PAC32 or MB PAC94 TCP COMM, UDP LOGGER, UDP MSG BUILDER andUDP DATATo be able to add these to your project, you must copy the blocks from thelibrary.Blocks of theStandard LibraryData are sent and received via the function blocks TSEND (FB63) and TRCV(FB64).These communication blocks are in the Standard Library Communication Blocks and must also be added to your project.Please note that the following versions of the FBs are required for trouble-freeoperation of the MB PAC16, MB PAC32 and MB PAC94:TSENDTRCVTCONTDISCON2.3V2.1 or higherV2.2 or higherV2.4 or higherV2.1 or higherConnection configurationGeneralInformationNo connection configuration is required in NetPro for communication via theintegrated PN interface of the CPU. Connections are established anddisconnected using the function blocks TCON (FB65) and TDISCON (FB66).ModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.22-2

Commissioning2.4Communication settings of the PACSettingvia the UserInterfaceThe desired IP address, the subnet mask and "Modbus/TCP" as protocol mustbe set on the PAC device.Setting via the user interface is described for the PAC3200/4200 in section9.2.7 or 9.2.8.2.5Creating the configuration block with the "Modbus/TCP PAC Wizard"GeneralInformationThe configuration data for PAC communication are set in the data blockCNF PAC. This configuration DB is created with the "Modbus/TCP PACWizard". The Wizard generates the complete structure of the configuration DBCNF PAC and creates the data blocks for the PAC devices.The wizard performs an upload of a SPL file of the tool powerconfig as well.2.6Calling the function blocksCalling the FBFor a correct program sequence the function blocks MB PAC16, MB PAC32or MB PAC94 must be called in a cyclical OB.It is not permitted to simultaneously call a Modbus block in OB1 and in a cyclicinterrupt OB (e.g. OB35).Only 1 Modbus block instance may be added to 1 CPU.The TCP COMM block is called subordinately and may not additionally becalled in an OB.The OB121 must be available on the CPU. Further information can be foundin the chapter "Licensing".ModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.22-3

Blocks of the Modbus – PAC communication3Blocks of the Modbus – PAC communicationOverviewThe MB PAC16/32/94 blocks process the data transfer between the CPU andthe PAC devices. They internally call the block TCP COMM, which isresponsible for connection management.All PAC devices to be processed are configured in the block CNF PAC.The values read out from the PAC devices are stored in the PAC data blocks.PN-CPUData blocks for PAC valuesDB for PAC 1MB PAC16DB for PAC 3DB for PAC 2DB for PAC 4CNF PAC:Config-DB of the PACsPAC 1PAC 2PAC 3PAC 4PACPAC 12PAC 3PAC 4ModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.23-1

Blocks of the Modbus – PAC communication3.1Configuration block CNF PACGeneralinformationThe configuration DB CNF PAC is created with the "Modbus/TCP PACWizard" and contains all information needed for communication with theconnected PAC devices.This includes: The number of connections used to communicate with the PACdevices The IP addresses of the PAC devices The numbers of the data blocks in which the values from the PACdevices are saved The status display of the PAC devicesWith one CPU, several connections may be used simultaneously for ModbusPAC communication. The maximum number of simultaneously establishedconnections depends on the CPU.Up to 512 PAC devices can be configured in the CNF PAC. Here, the numberof PAC devices can be divided as required among the connections to be used.The data from the configuration DB is checked on initialization and maynot be changed during runtime.The structure of the CNF PAC must not be changed.STATUS PACThe array STATUS PAC [1.512], which shows the current states of the PACunits during runtime, is in the first part of CNF PAC. Each bit designates 1PAC device, in ascending order from the first PAC device.Example:The states of the PAC devices 1 to 14 from ID 1 are stored inSTATUS PAC[1] to STATUS PAC[14]. The states of the PAC devices fromID 2 are stored in STATUS PAC[15] to STATUS PAC[28], etc.ModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.23-2

Blocks of the Modbus – PAC communicationIf the status bit of a PAC device is TRUE, an error in the last data transfer hasbeen detected. If the status bit is FALSE, the last data transfer for this PACdevice has been processed successfully.ConnectionparametersThe connection parameters are defined in the second part of the CNF PAC. For each connection there is 1 structure, e.g. ID 1, ID 2, etc. Each connection has a unique ID number. Max. 16, 32 or 94 connections can be used in parallel depending onthe Modbus block. For each of these connections, the number of PAC devices processedunder this connection is specified in an array. The IP address and the number of the data block to store the readPAC values are set for each PAC device. The parameters are visiblein the data view for the individual PAC devices.ModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.23-3

Blocks of the Modbus – PAC communication3.2Data blocks for the PAC valuesGeneralinformationThere is 1 data block for PAC specific values for each PAC device. Thesedata blocks are automatically created in the right length and with completeparameter names by the "Modbus/TCP PAC Wizard".CONTROL BYTEUsing CONTROL BYTE, the operating hours counter, the maximum values,the minimum values and the energy counters can be reset.If one or more reset bits are set during runtime, the next time this PAC isprocessed the relevant values in the PAC device are reset and the associatedreset bit is then set to FALSE.Status valuesDATA VALID shows whether the values in the data block could be transferredconsistently during the last processing.The DATA VALID bit is reset if the query for the relevant device is running orthe query could not be ended correctly.ERROR COUNTER shows the number of processing cycles with errors forthis device. This value can be reset manually.LAST ERROR shows the last error status for this PAC device.TIMESTAMP shows the time stamp for the last time the data could be readout consistently.ModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.23-4

Blocks of the Modbus – PAC communicationDataThe data of basic type 3 and the energy counters are read out.Register numberMeaningRead1, 2Voltage A-N3, 4Voltage B-N5, 6Voltage C-N7, 8Voltage A-B9, 10Voltage B-C11, 12Voltage C-A13, 14Current A15, 16Current B17, 18Current C19, 20Apparent power A21, 22Apparent power B23, 24Apparent power C25, 26Active power A27, 28Active power B29,30Active power C31,32Reactive power A33, 34Reactive power B35, 36Reactive power C37, 38Power factor A39, 40Power factor B41, 42Power factor C43, 44THD voltage A1)45, 46THD voltage B1)47, 48THD voltage C1)49, 50THD current A1)51, 52THD current B1)53, 54THD current C1)55, 56Power frequency57, 58Mean value voltage UL-N59, 60Mean value voltage UL-L61, 623-phase average current63, 64Total apparent power65, 66Total active power67, 68Total reactive power (Qn)69, 70Total power factor71, 72Amplitude unbalance of voltage73, 74Amplitude unbalance of currentModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.23-5

Blocks of the Modbus – PAC communicationRegister numberMeaning205, 206Device diagnostics and device status207, 208Status of the digital outputs209, 210Status of the digital inputs211, 212Active tariff213, 214Operating hours counter517, 518Length of the last period2801, 2802Active energy procurement tariff 12803, 2804Active energy procurement tariff 22805, 2806Active energy supply tariff 12807, 2808Active energy supply tariff 22809, 2810Reactive energy procurement tariff 12811, 2812Reactive energy procurement tariff 22813, 2814Reactive energy supply tariff 12815, 2816Reactive energy supply tariff 22817, 2818Apparent output supply tariff 12819, 2820Apparent output supply tariff 2Write213, 214Operating hours counter60002Reset of maximum values60003Reset of minimum values60004Reset of energy counter (0 all, 1 activeenergy procurement tariff 1, 2 tariff 2)ModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.23-6

Blocks of the Modbus – PAC communication3.3Function blocks MB PAC16, MB PAC32 and MB PAC943.3.1 FunctionalityDifferentiation ofthe blocksMB PAC16,MB PAC32 andMB PAC94The blocks MB PAC16, MB PAC32 and MB PAC94 differ in the number ofmaximum connections that can be established simultaneously with this block.BlockMaximum number of parallel connectionsMB PAC1616MB PAC3232MB PAC9494With one CPU, several connections may be used simultaneously for ModbusPAC communication. The maximum number of simultaneous connections isCPU dependent and can be found in the technical data for each CPU. Byusing multiple connections, the data throughput can be increased and theupdate time reduced.The size of the instance DB for the blocks is directly proportional to thenumber of possible connections. To save memory space, we recommendusing the smallest possible block for your application.TasksThe blocks implement the following tasks: Cyclical reading of the data of basic type 3 and the energy counters ofall configured PAC devices Data transfer to the parameterized DB Deletion of PAC counters on request Time based monitoring of connection establishment and terminationas well as the receipt of data Connection and data management using the T-blocks from thestandard library Application of the Modbus/TCP protocol License checkingModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.23-7

Blocks of the Modbus – PAC communicationTriggering of joband completedmessageModbus communication is activated with the parameterization of CYCLICAL 0 ms. When the given time expires, the connection to the first PAC device isestablished. If scheduled, the counters in the PAC device are reset. The dataof basic type 3 and the energy counters are then read out and written to therelevant data block.The CPU waits for the parameterized time MONITOR for a response from thePAC device. If a timeout occurs (no response from PAC device), the job endsfor the PAC device with an error and the next PAC device is processed.If the response telegram is received within MONITOR, a plausibility test isperformed. If the result is positive, the required actions are performed.If additional PAC devices are parameterized for the connection ID, these areprocessed consecutively. Here, the PAC devices within 1 connection ID arealways processed sequentially. In contrast, the various connection IDs in theCNF PAC block are processed in parallel, i.e. the PAC devices in the firstconnection ID are read out in parallel with the PAC devices in the secondconnection ID.The output DONE is set if all parameterized PAC devices in the CNF PACcan be read out without error. If an error is detected in at least 1 PAC device,the job is ended with an error, the ERROR bit is set, and an error number isshown in STATUS.Online helpBlock online help is available in the SIMATIC Manager for the function blocksMB PAC16/32/94. If the block is marked and the "F1" key is pressed, theonline help is opened with the most important information on the block.Programming errorOB121If the Modbus block is not yet licensed for this CPU, the OB121 is called.Warning!If the OB121 is missing from the control, the CPU is set to STOP state.ModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.23-8

Blocks of the Modbus – PAC communication3.3.2 Parameters of the FBs MB PAC16, MB PAC32 and MB PAC94Parameters of the function blocks MB PAC16, MB PAC32 and MB PAC94ParameterDecl.TypeDescriptionRange ofvaluesInitINITINBOOLTRUE: Block is initializedTRUE/FALSEnoCONFIG DBINBLOCK DBNumber of the configuration DBCNF PACCPUdependentyesMONITORINTIMEMonitoring time for connectionestablishment and termination and forthe receipt of data from the link partnerThe minimum time that may be set is 20msDefault: 500 msT#20mstoT# 24d20h31m23s647msnoREG KEYINSTRING [17] Registration key (activation code) forlicensingCharacternoCYCLICALINTIMEPolling cycle0: No processing 0: Data should be read cyclically everyx secondsDefault: 5 sT#0ms toT# 24d20h31m23s647msnoCONN CNTININT0: All parallel connections areestablished at the same time 0: Count of connections, which areestablished at the same time ( in 1CPU cycle)0 to 94noCONN WAITINTIME0: Connection establishment withoutdelay 0: next connection establishment afterx msT#0ms toT# 24d20h31m23s647msnoDONEOUTBOOLTRUE: The values of all PAC deviceshave been read or written without errorTRUE/FALSEnoERROROUTBOOLTRUE: An error occurred in processingthe PAC devicesTRUE/FALSEnoSTATUSOUTWORDError number / status display0 to FFFFnoCharacternoIDENT CODE OUTSTRING [18] Identification number for licensingWith this identifier, you may request theREG KEY activation key for yourlicense.OutputsThe output parameters are dynamic displays and thus represent only 1 CPUcycle. They must be copied to different memory areas for any furtherprocessing or display in a variable table.Ranges of valuesThere may be CPU specific restrictions to consider in the ranges of values forthe various parameters.ModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-6MA30-1AX0, 6AV6676-6MA30-2AX0; Manual Edition 1.23-9

Blocks of the Modbus – PAC communicationINITWith INIT TRUE, the Modbus block initiates a restart. Here, the connectionIDs and the parameterized PAC devices are read from the config blockCNF PAC and checked for validity.The restart, e.g. on a change in CNF PAC, may only be performed if no PACdevices are presently being read out. If PAC devices are to be added toCNF PAC, it must be ensured using CYCLICAL 0 ms that no new pollingcycle is started. After the change in CNF PAC, the block must be reinitializedwith INIT TRUE.If INIT TRUE is set, the array STATUS PAC [1.512] in CNF PAC-DB isdeleted.Please note that depending on the number of connections and PACs, thecycle time of the OB is increased for 1 CPU cycle due to the validity test onINIT TRUE.Use of the OB80 in the user program is recommended.CONFIG DBThe CONFIG DB parameter designates the number of the data blockCNF PAC. The PAC specific parameters that are needed for communicationbetween the PN-CPU and the PAC devices are stored in this parameter datablock.The parameter CONFIG DB is an initialization parameter. After the parameteris changed, reinitialization of the block via INIT is required.The value range for this parameter is CPU dependent. The DB number 0 isnot allowed, because it is reserved for the system.The DB number is entered in plain text in the form "DBxy".MONITORThe monitoring time MONITOR monitors the establishment and termination ofconnections and the receipt of data from the link partner. The minimum valueis 20 ms.If MONITOR is set to 20 ms and a polling cycle is to be started, a relevanterror message occurs. No data from the PAC devices is read.If the monitoring time is exceeded, the active job is ended with an error. Amonitoring time of 500 ms is recommended.In selection of MONITOR it should be noted, that the time of the polling cycleand so also the updating time of the other PAC devices is increased by thistime, if a connection error to a PAC device occurs.REG KEYThe block must be licensed on every CPU. The block is licensed with thecorrect entry of the activation code at this parameter and Modbuscommunication can be used without restriction.Further information can be found in the chapter "Licensing".ModbusTCP Connection of Sentron PAC 3200/4200 to a SIMATIC PN-CPU6AV6676-6MA30-0AX0, 6AV6676-

Installation Insert the Modbus CD in the CD-ROM drive of your PG/PC. If the setup program does not start automatically, the installation is performed as follows: 1. Select the CD-ROM drive in Windows Explorer, open the directory Setup_Modbus_Lib, and double-click on the file SIMATIC Modbus/TCP SENTRON PAC V1.1.1.exe. 2.