ALTUS Nexto Xpress User Manual
Hide thumbs Also See for Nexto Xpress:
Table of Contents

Advertisement

Quick Links

User Manual
Nexto Xpress
MU216600 Rev. O
November 28, 2022

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Nexto Xpress and is the answer not in the manual?

Questions and answers

Summary of Contents for ALTUS Nexto Xpress

  • Page 1 User Manual Nexto Xpress MU216600 Rev. O November 28, 2022...
  • Page 2 General Supply Conditions No part of this document may be copied or reproduced in any form without the prior written consent of Altus Sistemas de Automação S.A. who reserves the right to carry out alterations without prior advice. According to current legislation in Brazil, the Consumer Defense Code, we are giving the following information to clients who use our products, regarding personal safety and premises.
  • Page 3: Table Of Contents

    CONTENTS Contents Introduction ........... . . 1.1.
  • Page 4 CONTENTS 3.3. Ethernet Network Connection ........26 3.3.1.
  • Page 5 CONTENTS 5.1.3.1.2. IEC 60870-5-104 Conversion ......58 5.1.3.1.3. MODBUS Internal Quality ......59 5.2.
  • Page 6 CONTENTS 5.7.6.1. MODBUS Slave Protocol Configuration via Symbolic Mapping ..114 5.7.6.1.1. MODBUS Slave Protocol General Parameters – Configuration via Sym- bolic Mapping ....... . . 114 5.7.6.1.2.
  • Page 7 ......... . . 190 5.11.2. SNMP in Nexto Xpress Controllers ....... 190 5.11.3.
  • Page 8 CONTENTS 5.13.1.4. SERIAL_GET_RX_QUEUE_STATUS ..... . . 210 5.13.1.5. SERIAL_PURGE_RX_QUEUE ......211 5.13.1.6.
  • Page 9: Introduction

    CANopen, EtherNet/IP, PROFINET and MODBUS. Nexto Xpress is suitable for small applications and remote distributed I/O. It may be applied in verticals such as infrastruc- ture, building automation, water, wastewater, food, textiles, factory automation, machines and several other OEM solutions, including motion control applications.
  • Page 10: Documents Related To This Manual

    1.1. Documents Related to this Manual This manual will focus on information that is specific for the controllers of Nexto Xpress family. For other functionalities that are identical along all controllers of Nexto Series, this manual will just point to the corresponding manual of Nexto Series that contains the information.
  • Page 11: Technical Support

    1. INTRODUCTION 1.3. Technical Support For Altus Technical Support contact in São Leopoldo, RS, call +55 51 3589-9500. For further information regarding the Altus Technical Support existent on other places, see https://www.altus.com.br/en/ or send an email to altus@altus.com.br. If the equipment is already installed, you must have the following information at the moment of support requesting:...
  • Page 12: Technical Description

    Figure 2: XP325 front panel The front panel contains the identification of the I/O and communication interfaces available on Nexto Xpress controllers. The digital I/O interfaces have one LED for each point to indicate the logic state, while the communication interfaces have one LED each to indicate activity.
  • Page 13: Product Features

    2. TECHNICAL DESCRIPTION 2.2. Product Features 2.2.1. General Features XP300 XP315 XP325 XP340 XP350 Digital Inputs Fast Inputs Digital Outputs Fast Outputs Max. number of high-speed counters Max. number of external interruptions Max. number of PTO outputs Max number of VFO/PWM outputs 5 to 10 5 to 10 5 to 10...
  • Page 14 2. TECHNICAL DESCRIPTION XP300 XP315 XP325 XP340 XP350 Wire material Copper only IP level IP 20 Conformal coating Operating temperature -20 to 60 C Storage temperature -25 to 75 C Operating and storage relative humidity 5% to 96%, non-condensing 7 mm from 5 to 8.4 Hz Vibration resistance (IEC 60068-2-6, sinus) 2 G from 8.4 to 500 Hz 10 sweeps each axis, 1 octave per minute...
  • Page 15: Memory

    2. TECHNICAL DESCRIPTION 2.2.2. Memory XP300 XP315 XP325 XP340 XP350 Addressable input variables memory (%I) 2 KB Addressable output variables memory (%Q) 2 KB Direct representation variable memory (%M) 1 KB Symbolic variable memory 2 MB 2 MB 2 MB 6 MB 2 MB Program memory...
  • Page 16: Protocols

    2. TECHNICAL DESCRIPTION 2.2.3. Protocols Interface Open Protocol COM 1 / USB MODBUS RTU Master COM 1 MODBUS RTU Slave COM 1 MODBUS TCP Client NET 1 MODBUS TCP Server NET 1 MODBUS RTU over TCP Client NET 1 MODBUS RTU over TCP Server NET 1 CANopen Master CANopen Slave...
  • Page 17: Can

    2. TECHNICAL DESCRIPTION 2.2.5. CAN Connector 3-pin terminal block Physical interface CAN bus Supported standards CAN 2.0A 2.0B (11-bit and 29-bit identifiers) Max. number of nodes Termination Yes (Configurable) Baud rate 10, 20, 50, 100, 125, 250, 500, 800, 1000 kbit/s Table 8: CAN Interface Features 2.2.6.
  • Page 18: Ethernet

    2. TECHNICAL DESCRIPTION 2.2.7. Ethernet Ethernet Connector Shielded female RJ45 Auto crossover Maximum cable length 100 m Cable type UTP or ScTP, category 5 Baud rate 10/100 Mbps Physical layer 10/100 BASE-TX Data link layer Network layer Transport layer TCP (Transmission Control Protocol) UDP (User Datagram Protocol) Diagnostics LED (Link/Activity)
  • Page 19: Digital Inputs

    2. TECHNICAL DESCRIPTION 2.2.9. Digital Inputs Digital Inputs Input type Optoisolated sink type 1 Two isolated groups of 8 inputs each 24 Vdc Input voltage 15 to 30 Vdc for logic level 1 0 to 5 Vdc for logic level 0 Input impedance 4.95 kΩ...
  • Page 20: Digital Outputs

    2. TECHNICAL DESCRIPTION Fast Inputs Operation limit From - 2,147,483,648 to 2,147,483,647 Maximum input frequency 100 kHz Minimum pulse width @ 24 Vdc Table 13: Fast Inputs Features 2.2.11. Digital Outputs Digital Outputs Output type Optoisolated transistor source type Maximum output current 1.5 A per output 12 A total Leakage current...
  • Page 21: Fast Outputs

    2. TECHNICAL DESCRIPTION 2.2.12. Fast Outputs Fast Outputs Number of outputs 4 (can be used as VFO/PWM, PTO or normal output) Max. number of PTO outputs 4 when using no PTO Max number of VFO/PWM out- 2 when using 1 PTO puts 0 when using 2 PTO Connector configuration...
  • Page 22: Analog Inputs

    2. TECHNICAL DESCRIPTION 2.2.13. Analog Inputs Analog Inputs Voltage or current input, single ended, individually config- Input type ured Data format 16 bits in two’s complement, justified to the left Converter resolution 12 bits monotonicity guaranteed, no missing codes Conversion time 400 s (all V/I and RTD channels enabled) Input state indication Module protections...
  • Page 23: Analog Outputs

    2. TECHNICAL DESCRIPTION option to provide a fixed reading equal to lower and upper limits ("0" or "30000"). RTD Input Precision 0.5 % of full scale @ 25 C Supported scales Pt100, Pt1000, 0 to 400 Ω, 0 to 4000 Ω Excitation current 1 mA 0 to 400 Ω...
  • Page 24: Compatibility With Other Products

    2.3. Compatibility with Other Products To develop an application for Nexto Xpress controllers, it is necessary to check the version of MasterTool IEC XE. The following table shows the minimum version required (where the controllers were introduced) and the respective firmware...
  • Page 25: Application Times

    MainTask is determined by the conversion time (for analog inputs) and by the update time (for analog outputs), both described on General Features table. 2.4.3. Time for Instructions Execution The below table presents the necessary execution time for different instructions in Nexto Xpress CPUs. Instruction Language...
  • Page 26: Physical Dimensions

    2. TECHNICAL DESCRIPTION 2.5. Physical Dimensions Dimensions in mm. Figure 3: XP3xx Physical Dimensions...
  • Page 27: Purchase Data

    AMJG0808 Simple cable RJ45-RJ45 2 m XP101 Nexto Xpress Expansion, 16 DI 24 Vdc XP106 Nexto Xpress Expansion, 8 DI 24 Vdc and 6 DO Relay XP201 Nexto Xpress Expansion, 16 DO Transistor TLE3-21100 Gateway IoT Industrial Table 26: Related Products...
  • Page 28 AL-2306: Two shielded twisted pairs cable without connectors, used for networks based on RS-485 or CAN. AL-1766: Cable with a female DB9 connector and terminals for communication between HMI P2 and Nexto Xpress/NX3003 controllers.
  • Page 29: Installation

    3.1. Mechanical Installation Nexto Xpress controllers were designed to be installed in a standard DIN rail. Additionally, the user shall provide a suitable enclosure that meets the system protection and safety requirements. The next sections shows the procedures for installing and removing the controller.
  • Page 30 3. INSTALLATION Next, place the controller on the DIN rail fitting the top side first and then the bottom side, as indicated on steps 1 and 2 of the figure below: Figure 5: Fixing the controller on the DIN rail Finally, move the two locks to closed position to lock the controller on the DIN rail, as shown on the figure below: Figure 6: Locking the controller on the DIN rail...
  • Page 31: Removing The Controller

    3. INSTALLATION 3.1.2. Removing the controller To remove the controller from the DIN rail, just move the two locks to the open position as shown on the figure below: Figure 7: Unlocking the controller from the DIN rail...
  • Page 32: Electrical Installation

    3. INSTALLATION 3.2. Electrical Installation DANGER When executing any installation in an electric panel, certify that the main energy supply is OFF. Figure 8: XP3xx Electrical Installation Diagram...
  • Page 33 3. INSTALLATION Diagram Notes: Typical connection of analog output on voltage/current mode. Typical connection of digital output (source type). External power supply to supply outputs Q00 to Q17, terminals Q + must be connected to +24 Vdc, and terminal Q- must be connected to 0 Vdc. Protective Earth terminals for power supply and communication ports.
  • Page 34: Ethernet Network Connection

    The Ethernet network connection uses twisted pair cables (10/100Base-TX) and the speed detection is automatically made by the Nexto Xpress controller. This cable must have one of its endings connected to the interface that is likely to be used and another one to the HUB, switch, microcomputer or other Ethernet network point.
  • Page 35: Serial Rs-485 And Can Network Connection

    3. INSTALLATION Figure 9: RJ45 Female Connector Signal Description TXD + Data transmission, positive TXD - Data transmission, negative RXD + Data reception, positive Not used Not used RXD - Data reception, negative Not used Not used Table 28: RJ45 Female Connector Pin out The interface can be connected in a communication network through a hub or switch, or straight from the communication equipment.
  • Page 36: Initial Programming

    4. INITIAL PROGRAMMING 4. Initial Programming The main goal of this chapter is to help the programming and configuration of Nexto Xpress controllers, allowing the user to take the first steps before starting to program the device. Just like for the other devices of Nexto Series, the programming of Nexto Xpress controllers is made through the MasterTool IEC XE (IDE) development interface, which offers a full IEC 61131-3 programming system with all languages defined by this standard (ST, LD, SFC, FBD, etc...) plus an additional one, the CFC.
  • Page 37 4. INITIAL PROGRAMMING SIGNIFICANCE OVERLAPPING Byte Word DWord LWord Byte Word DWord %QX0.7 %QX0.6 %QX0.5 %QX0.4 %QB00 %QX0.3 %QX0.2 %QX0.1 %QX0.0 %QX1.7 %QX1.6 %QX1.5 %QX1.4 %QB01 %QX1.3 %QX1.2 %QX1.1 %QX1.0 %QX2.7 %QX2.6 %QX2.5 %QX2.4 %QB02 %QX2.3 %QX2.2 %QX2.1 %QX2.0 %QX3.7 %QX3.6 %QX3.5 %QX3.4...
  • Page 38: Project Profiles

    A project profile in the MasterTool IEC XE consists in an application template combined with a group of verification rules which guides the development of the application, reducing the programming complexity. For Nexto Xpress controllers, there is only one project profile available: Machine Profile.
  • Page 39: Cpu Configuration

    4. INITIAL PROGRAMMING 4.3. CPU Configuration The controller’s CPU configuration is located in the device tree, as shown on the figure below, and can be accessed by a double-click on the corresponding object. In this tab it’s possible to configure watchdog behavior, clock synchronism, among other parameters, as described on section Controller’s CPU.
  • Page 40 Login. Additionally, the device tree also offers the configuration of the integrated I/O available on Nexto Xpress controllers, as shown on the figure below. In this tab it is possible to configure digital inputs filters, the mode of each analog input, among other parameters.
  • Page 41: Libraries

    4.5. Inserting a Protocol Instance The Nexto Xpress controllers, as described on General Features table, offers several communication protocols. Except for the OPC communication, which have a different configuration procedure, the insertion of a protocol can be done by simply...
  • Page 42 4. INITIAL PROGRAMMING After that, the list of protocols will appear on the screen. Simply select MODBUS Symbol Server as described on the figure below: Figure 14: Selecting the Protocol...
  • Page 43: Finding The Device

    4. INITIAL PROGRAMMING 4.6. Finding the Device To establish the communication between the controller and MasterTool IEC XE, first it’s necessary to find and select the desired device. The configuration of this communication is located on the object Device on device tree, on Communication Settings tab.
  • Page 44 4. INITIAL PROGRAMMING Figure 16: Selecting the controller Additionally, the user can change the default name of the device that is displayed. For that, you must click the right mouse button on the desired device and select Change Node Name. After a name change, the device will not return to the default name under any circunstances.
  • Page 45: Login

    4. INITIAL PROGRAMMING Figure 17: Easy Connection This command performs a MAC level communication with the device, allowing to permanently change the configuration of the controller’s Ethernet interface, independently of the IP configuration of the station and from the one previously configured on the device.
  • Page 46 4. INITIAL PROGRAMMING Figure 19: IP Configuration Warning If there is no application on the controller, the following message will be presented. Figure 20: No application on the device If there is already an application on the controller, depending on the differences between the projects, the following options will be presented: Login with online change: execute the login and send the new project without stopping the current controller application (see...
  • Page 47: Run Mode

    4. INITIAL PROGRAMMING Figure 22: Configuration change Finally, at the end of this process the MasterTool IEC XE offers the option to transfer (download) the source code to the internal memory of the device, as shown on the following figure: Figure 23: Source code download Transfering the source code is fundamental to ensure the future restoration of the project and to perform modifications on the application that is loaded into the device.
  • Page 48: Stop Mode

    4. INITIAL PROGRAMMING Figure shows the application in execution. In case the POU tab is selected, the created variables are listed on a monitor- ing window, in which the values can be visualized and forced by the user. Figure 25: Program running If the controller already have a boot application internally stored, it goes automatically to Run Mode when the device is powered on, with no need for an online command through MasterTool IEC XE.
  • Page 49: Writing And Forcing Variables

    4. INITIAL PROGRAMMING Figure 26: Stopping the Application In case the controller is initialized without the stored application, it automatically goes to Stop Mode, as it happens when a software exception occurs. 4.10. Writing and Forcing Variables After Logging into a PLC, the user can write or force values to a variable of the project. The writing command (CTRL +F7) writes a value into a variable and this value could be overwritten by instructions executed in the application.
  • Page 50: Project Upload

    Figure 27: Ending the online communication with the controller 4.12. Project Upload Nexto Xpress controllers are capable to store the source code of the application on the internal memory of the device, allowing future retrieval (upload) of the complete project and to modify the application.
  • Page 51: Cpu Operating States

    To ensure that the project loaded in the controller is identical and can be accessed in other workstations, consult the chapter Projects Download/Login Method without Project Differences at the MasterTool IEC XE User Manual MT8500 - MU299609. ATTENTION The memory size area to store a project in the Nexto Xpress controller is defined on General Features table.
  • Page 52: Breakpoint

    4. INITIAL PROGRAMMING 4.13.3. Breakpoint When a debugging mark is reached in a task, it is interrupted. All the active tasks in the application will not be interrupted, continuing their execution. With this feature, it’s possible to go through and investigate the program flow step by step in Online mode according to the positions of the interruptions included through the editor.
  • Page 53: Startprg Program

    4. INITIAL PROGRAMMING ( * Main POU associated with MainTask that calls StartPrg, UserPrg/ActivePrg and NonSkippedPrg. This POU is blocked to edit. * ) PROGRAM MainPrg isFirstCycle : BOOL := TRUE; END_VAR isFirstCycle THEN StartPrg(); isFirstCycle := FALSE; ELSE UserPrg(); END_IF;...
  • Page 54: Gvl System_Diagnostics

    4. INITIAL PROGRAMMING Figure 30: IntegratedIO GVL in Online Mode 4.14.5. GVL System_Diagnostics The System_Diagnostics GVL contains the diagnostic variables of the controller’s CPU, communication and I/O interfaces. This GVL isn’t editable and the variables are declared automatically with type specified by the device to which it belongs when it is added to the project.
  • Page 55: Gvl Disables

    4. INITIAL PROGRAMMING Figure 31: System_Diagnostics GVL in Online Mode 4.14.6. GVL Disables The Disables GVL contains the MODBUS Master/Client by symbolic mapping requisition disabling variables. It is not mandatory, but it is recommended to use the automatic generation of these variables, which is done clicking in the button Generate Disabling Variables in device requisition tab.
  • Page 56: Gvl Qualities

    4. INITIAL PROGRAMMING compiled. To correct the automatically declared variable name, it must be followed the model exemplified above according to the device and the requisition to which they belong. The following picture shows an example of the presentation of this GVL when in Online mode. If the variable values are TRUE it means that the requisition to which the variables belongs is disabled and the opposite is valid when the variable value is FALSE.
  • Page 57 4. INITIAL PROGRAMMING declared variable name, it must be followed the model exemplified above according to the device and the requisition to which they belong. To the MODBUS communication devices the quality variables behave on the way showed at Table 39. ATTENTION If a symbolic mapping MODBUS Client/Master driver’s variable be mapped in Server IEC 60870-5-104 driver, it is necessary that the MODBUS mapping quality variables had been...
  • Page 58: Gvl Reqdiagnostics

    4. INITIAL PROGRAMMING 4.14.8. GVL ReqDiagnostics In ReqDiagnostics GVL, are declared the requisition diagnostics variables of symbolic mapping MODBUS Master/Client. It is nor mandatory, but recommended the use of these variables’ automatic generation, what is done by clicking in the button Generate Diagnostic Variables in device requisitions tab.
  • Page 59 4. INITIAL PROGRAMMING Figure 34: ReqDiagnostics GVL in Online Mode...
  • Page 60: Configuration

    5. CONFIGURATION 5. Configuration The Nexto Xpress controllers are configured and programmed through the MasterTool IEC XE software. The configura- tion defines the behavior and utilization modes for peripherals use and special features of the controller. The programming represents the application developed by the user, also known as Application.
  • Page 61: Time Synchronization

    5. CONFIGURATION 5.1.2. Time Synchronization For the time synchronization, Nexto Xpress controllers use the SNTP (Simple Network Time Protocol) protocol or the synchronism through IEC 60870-5-104. To use the time sync protocols, the user must set the following parameters at Synchronism tab located at CPU configuration on project treeview.
  • Page 62: Sntp

    5. CONFIGURATION Synchronization available at the Application Layer section. ATTENTION If the PLC receives a time sync command from the control center, and this option is disabled, an error answer will be returned to that command. But if this option is enabled then a success message will be returned to the control center, even that the sync command be discarded for there is another synchronism method active with higher priority.
  • Page 63: Internal Points

    5. CONFIGURATION 5.1.3. Internal Points A communication point is storage on the CPU memory under form of two distinct variables. One represents the point’s value ( type BOOL, BYTE, WORD, etc. . . ), while another, represents its quality (type QUALITY). Internal Points are those which the value and the quality are calculated internally by the user application, that is, they don’t have an external origin like occur with points linked to IEDs (Communication drivers of type Master/Client).
  • Page 64: Quality Conversions

    5. CONFIGURATION Figure 38: Internal Points Configuration Example 5.1.3.1. Quality Conversions The internal point’s quality is a trust level information about the value stored on that point. The quality may inform, for example, that the value stored is out of range, or yet that it is valid, but low trusted. The Standards like IEC 104 have their own formats to representation of point’s quality information.
  • Page 65 5. CONFIGURATION Name Type Description Flag used to signalize and prevent the event communication channel overload. As os- FLAG_FILTER BOOL cillations (rapid changes) on the digital in- puts. This flag should indicates a quality prob- lem, that the value, of the attribute to which FLAG_OVERFLOW BOOL the quality has been associated, is beyond...
  • Page 66: Iec 60870-5-104 Conversion

    5. CONFIGURATION 5.1.3.1.2. IEC 60870-5-104 Conversion The tables below show respectively the digital, analog and counters internal point’s conversion to IEC 60870-5-104 of Nexto Series available to MT8500. Internal -> IEC 60870-5-104 Digital Internal Quality Flags VALIDITY IEC 60870-5-104 Quality FLAG_RESTART NOT TOPICAL FLAG_COMM_FAIL...
  • Page 67: Modbus Internal Quality

    5. CONFIGURATION Internal -> IEC 60870-5-104 Counters Internal Quality Flags VALIDITY IEC 60870-5-104 Quality FLAG_RESTART FLAG_COMM_FAIL FLAG_REMOTE_SUBSTITUTED FLAG_LOCAL_SUBSTITUTED FLAG_FILTER FLAG_OVERFLOW OVERFLOW FLAG_REFERENCE_ERROR FLAG_INCONSISTENT FLAG_OUT_OF_RANGE FLAG_INACCURATE FLAG_OLD_DATA FLAG_FAILURE INVALID FLAG_OPERATOR_BLOCKED FLAG_TEST VALIDITY_INVALID INVALID Table 38: Counters Conversion Internal to IEC 60870-5-104 5.1.3.1.3.
  • Page 68: Serial Interface

    5. CONFIGURATION 5.2. Serial Interface 5.2.1. COM 1 The COM 1 interface is a RS-485 standard serial interface. It allows the point to point or network communication in the open protocols MODBUS RTU slave or MODBUS RTU master. When using the MODBUS master / slave protocol, some of these parameters (such as Serial Mode, Data Bits, RX Threshold and Events Serial) are automatically adjusted by MasterTool tool for the correct operation of this protocol.
  • Page 69: Advanced Configurations

    5. CONFIGURATION 5.2.2. Advanced Configurations The advanced configurations section allows to configure additional parameters of the serial port as described below: Configuration Description Default Options Bytes quantity which must be received for a new UART interruption to be gener- ated. Low values make the TIMESTAMP more pre- UART RX Threshold...
  • Page 70 5. CONFIGURATION Service Diagnostics web page SNTP SNMP MODBUS TCP 502* MasterTool MT8500 1217* 1740:1743 SQL Server 1433 MQTT 1883* / 8883* EtherNet/IP 44818 2222 IEC 60870-5-104 2404* OPC UA 4840 WEBVISU 8080 CODESYS ARTI 11740 PROFINET 34964 Table 43: Reserved TCP/UDP ports * Default port, but user changeable.
  • Page 71: Controller Area Network Interface

    5.5. Integrated I/O Nexto Xpress controllers have integrated I/O points, which allows it to interface with external devices like sensors, actua- tors, step motors, encoders, etc... There are two objects on project treeview related to Integrated I/O, as shown on the figure below:...
  • Page 72: Digital Inputs

    5. CONFIGURATION 5.5.1. Digital Inputs The parameters related to the Digital Inputs are located on the screen below (example from XP325), for both standard and fast inputs (when configured as normal digital inputs): Figure 40: Digital Inputs Parameters The table below shows the possible configuration values: Configuration Description Default...
  • Page 73: Fast Inputs

    5. CONFIGURATION 5.5.2. Fast Inputs The fast inputs are special input signals that can be used for special high-speed functions. These special physical inputs can be assigned to two types of logical elements: high-speed counters and external interruption. Each of these logical elements consumes a certain amount of fast inputs signals.
  • Page 74 5. CONFIGURATION Configuration Description Default Options Digital Input Counter 0 (Input B): Up/Down (A count, B direction) with zero Fast Fast Input I00 Digital Input Counter 0 (Input A): Quadrature 2X Input I00 configuration Counter 0 (Input A): Quadrature 2X with zero Counter 0 (Input A): Quadrature 4X Counter 0 (Input A): Quadrature 4X with zero Fast...
  • Page 75: High-Speed Counters

    5. CONFIGURATION 5.5.2.1. High-Speed Counters The high-speed counter units have multiple operating modes. The following table describes the details of each of these modes: Counter Mode Counting waveforms Up/Down (A count, B di- rection) with zero Quadrature 2X Quadrature 2X with zero Quadrature 4X Quadrature 4X with zero Table 48: High-speed counter modes...
  • Page 76 5. CONFIGURATION The overall behavior is the same for all counters: when counting UP and the maximum positive value is reached, the next value will be the minimum negative value. The same thing happens for the oposite direction, so when counting DOWN and the minimum negative value is reached, the next value will be the maximum positive value.
  • Page 77 5. CONFIGURATION Variable Description Type Allowed Values Load the preset value to the counter Load value. This operation is performed FALSE or TRUE on rising edge of this bit Sample the counter storing its value Sample in hold. This operation is per- FALSE or TRUE formed on rising edge of this bit Table 50: Counter command structure...
  • Page 78 5. CONFIGURATION The table below describes the inputs and outputs variables of the function block. Variable Description Type Allowed Values Enable the function block ENABLE BOOL FALSE or TRUE execution REFERENCE COUNTER_VAR Counter variable FastInputs.Counter0 T_COUNTER STOP Stop the counter BOOL FALSE or TRUE RESET...
  • Page 79: Counter Interrupts

    5. CONFIGURATION 5.5.2.1.1. Counter Interrupts The high-speed counter units have the ability to generate interrupts by comparison, i.e., when the counter reach a certain comparison value, an specific task will run and interrupt the main program execution. Each high-speed counter unit have two comparison values, called Comparer0 and Comparer1, which are present on the corresponding global symbolic data structure or FunctionBlock as described on previous sections.
  • Page 80: External Interruption

    5. CONFIGURATION Figure 45: Counter Interrupt Settings 5.5.2.2. External Interruption The fast inputs can be set as Interruption (Rising Edge) mode, which means that when a rising edge (0V to 24V transition) is performed on the input, an specific task will run and interrupt the main program execution. Each external interruption will generate an specific event.
  • Page 81: Fast Outputs

    5. CONFIGURATION ATTENTION The external interruption does not supports reentrancy. If another interruption occurs (af- ter the filter time) and its program execution is still not finished, this interruption will be discarded. 5.5.3. Fast Outputs The fast outputs are special output signals that can be used for pulse generator outputs. These special physical outputs can be assigned to two types of logical elements: VFO/PWM (variable frequency/pulse width) and PTO (pulse train output).
  • Page 82 5. CONFIGURATION (Q15 or Q17) will be forced to normal digital output mode. As shown on the previous table, the fast outputs can be configured as normal digital output. In this case, its digital value can be set using the standard global variable IntegratedIo.DigitalOutputs. When configured as VFO/PWM or PTO, the user program can control the fast ouputs through the FastOutputs symbolic structure, which is automatically created on IntegratedIo GVL as shown on the following figure: Figure 48: Fast Output structure...
  • Page 83 5. CONFIGURATION Figure 49: VFO/PWM waveform The figure shows a pulsed waveform, where T is the period of the pulses and is the pulse width. Those are the pulse parameters which can be changed on VFO/PWM mode. The frequency is defined as the inverse of period, then: The duty cycle is the reason between the pulse width and the period, then: 100% To control the VFO/PWM output, the user program must access the VFO_PWM variable of the fast output structure.
  • Page 84 5. CONFIGURATION Figure 50: LibIntegratedIo.PWM function block The table below describes the inputs and outputs variables of the function block. Variable Description Type Allowed Values Enable the function ENABLE BOOL FALSE or TRUE block execution. FAST_OUTPUT Fast Output Variable. REFERENCE FastOutputs.Q14 FastOutputs.Q15 T_FAST...
  • Page 85 5. CONFIGURATION Figure 51: PTO with trapezoidal profile For some applications it is more recommended to use the “S” profile, which acceleration and deceleration curves are similar to “S” shape. The figure below shows this profile. Figure 52: PTO with “S” profile Besides the PTO parameters, there are status information and commands that the user program can use to control the output.
  • Page 86 5. CONFIGURATION Figure 54: PTO Softstop on "S" profile To control the PTO, the user program must access the PTO variable of the fast output structure. The structure of PTO is shown on the table below: Variable Description Type Allowed Values StartFrequency Start frequency in Hertz UDINT...
  • Page 87 5. CONFIGURATION The table below shows the PTO status structure. Variable Description Type Allowed Values Pulse train is being per- Running FALSE or TRUE formed Acceleration step (from Acceleration StartFrequency to MaxFre- FALSE or TRUE quency) Deceleration step (from Deceleration MaxFrequency to StopFre- FALSE or TRUE quency)
  • Page 88 5. CONFIGURATION The table below describes the inputs and outputs variables of the function block. Variable Description Type Allowed Values Enable the function block ENABLE BOOL FALSE or TRUE execution FAST_OUTPUT Fast Output Variable REFERENCE FastOutputs.Q14 FastOutputs.Q15 T_FAST FastOutputs.Q16 _OUTPUT FastOutputs.Q17 Start the pulse train when START...
  • Page 89: Analog Inputs

    5. CONFIGURATION Variable Description Type Allowed Values Pulse train has already been DONE BOOL FALSE or TRUE performed Table 63: LibIntegratedIo.PTO function block description 5.5.4. Analog Inputs The parameters related to the Analog Inputs are shown below: Figure 56: Analog Inputs Parameters The table below shows the possible configuration values: Configuration Description...
  • Page 90: Rtd Inputs

    5. CONFIGURATION 5.5.5. RTD Inputs The parameters related to the RTD Inputs are shown below: Figure 57: RTD Inputs Parameters The table below shows the possible configuration values: Configuration Description Default Options Selects the tempera- Temperature Unit Degree Celsius Degree Celsius ture unit Degree Fahrenheit Input Type...
  • Page 91: Analog Outputs

    5. CONFIGURATION The next table describes additional details about each input type: Temperature Coef- Input type Measurement Band Count Resolution ficient ( ) 400 Ω 0 to 400 Ω 0.1 Ω 0 to 4000 4000 Ω 0 to 4000 Ω 0 to 4000 1 Ω...
  • Page 92: I/O Mapping

    5.6. USB Port The USB Host port present on Nexto Xpress controllers allows to extend the controller’s functionalities by using several types of USB dongles. Due to the wide range of USB devices available on the market (flash drives, Ethernet/Wifi adapters, 3G/4G modem, etc...), the support for each specific device is provided by a firmware update.
  • Page 93 5. CONFIGURATION Figure 60: USB Devices Section The content of this page changes dynamically according to the type of USB device that is connected. In the example above, there is no device connected. This page requires login, similar to the firmware update section. The default user and password are "admin", without quotation marks, for both fields.
  • Page 94: Mass Storage Devices

    5. CONFIGURATION 5.6.1. Mass Storage Devices 5.6.1.1. General Storage Mass storage devices can be used to expand the controller’s flash memory to store big amount of data, like on datalogger applications, for instance. To use a USB mass storage device, simply connect it to the USB port. After a few seconds, when the device is properly detected and mounted, the USB LED will turn on and the device information will appear on section USB Devices located at the tab PLC Management of the controller’s diagnostics webpage as shown below: Figure 62: Mass Storage Device Information...
  • Page 95: Not Loading The Application At Startup

    5. CONFIGURATION Figure 63: USB Mass Storage Folder 5.6.1.2. Not Loading the Application at Startup The USB mass storage device can be used to prevent the controller from automatically loading the application after the power on. To do that, simply place an empty text file called "dontbootapp.txt" on the root folder of mass storage device. The presence of this file is informed in the Special Files field on controller’s system webpage as shown below.
  • Page 96: Usb To Rs-232 Converters

    (hence, will not go to RUN). 5.6.2. USB to RS-232 Converters Nexto Xpress allows to implement a RS-232 port using a USB to Serial converter. These converters are based on an internal controller chip. The following table shows the list of supported controllers:...
  • Page 97: Modem Devices

    An USB Modem with a SIM chip can be used to connect the PLC to the internet using the cellular data network (telephone services, like sending SMS, are not implemented). This feature allows to use Nexto Xpress controllers to implement telemetry and IoT applications.
  • Page 98 5. CONFIGURATION manufacturers calls this feature as Virtual Server or Port Forwarding). The following table describes the number of the TCP port associated to the main services of the PLC. Port Service Embedded system web page 8080 Embedded Webvisu web page 1217 MasterTool programming Table 70: TCP ports of main PLC services...
  • Page 99 5. CONFIGURATION ATTENTION The provider APN and PIN code fields are mandatory for every SIM chip. If the provider informs these parameters, they shall be used. In other hand, it’s known that several SIM chips simply doesn’t care for the content of these fields, using internal predefined values. In this case, these fields of the web page can be left with the default values and the connection will proceed successfully.
  • Page 100: Wifi Adapters

    5. CONFIGURATION ATTENTION For bridge devices, or router devices with external access enabled (port forwarding), once connected to the internet, anyone who knows the modem IP address will be able to access the controller remotely. So, for security reasons, it is EXTREMELY important and recom- mended to configure the User Rights on the controller to restrict the online operations of MasterTool IEC XE with login and password.
  • Page 101 5. CONFIGURATION Discovery Mode: defines what is the method to set the WiFi network. If selected as "Auto", the "Scan" button must be used to choose the wanted network. If selected as "Manual", the name of the SSID and Security Type must be entered manually.
  • Page 102 5. CONFIGURATION ATTENTION If the Default Gateway was set as "WiFi Adapter", the Gateway of the NET1 diagnostics of the MasterTool will show zero (0.0.0.0). Otherwise, if it was set as "Local Ethernet", the WiFi adapter Gateway will be zero. The configuration and operation sequence can be summarized into the following steps: Plug the device into the USB port.
  • Page 103: Communication Protocols

    5. CONFIGURATION 5.7. Communication Protocols Nexto Xpress controllers offers several communication protocols, including MODBUS (exclusively Symbolic), OPC UA and other. The following table describes the configuration limits: XP300 XP315 XP325 XP340 XP350 Mapped Points 20480 Mappings 5120 Requests NETs – Client or Server instances COM (n) –...
  • Page 104: Protocol Behavior X Cpu State

    5. CONFIGURATION Requests by device: Number of requests, such as reading or writing holding registers, which can be configured for each of the devices (slaves or servers) from Master or Client protocols instances. This parameter does not apply to instances of Slave or Server protocols.
  • Page 105: Double Points

    5. CONFIGURATION Notes: Symbol : Protocol remains active and operating normally. Symbol : Protocol is disabled. EtherCAT: The tests were performed using MainTask as EtherCAT bus cycle task. If another task is used, the protocol will remain active when there’s a breakpoint in MainPrg. For further information on EtherCAT protocol, consult MasterTool IEC XE User Manual MT8500 - MU299609.
  • Page 106: Consumers

    5. CONFIGURATION Figure 72: CPU’s Event Queue 5.7.3.1. Consumers The consumers are typically communication drivers that will communicate with SCADA or HMI. After been stored in CPU’s queue, the consumers receive the events related to communication points mapped in its configuration. These events are then stored in a consumer’s own events queue, which the size and working are described on the communication driver specific section.
  • Page 107: Producers

    5. CONFIGURATION 5.7.3.3. Producers The producers are typically communication drivers or PLC internal elements that are capable to generate events. The previous figure show some examples. Internal Points: This is a PLC’s firmware internal element, which detects events each execution cycle (MainTask) to those communication points that don’t have a defined origin and then inserts the events in the CPU’s queue.
  • Page 108 5. CONFIGURATION Parameter Type Description Input action defined by user from the following list: SUCCESS(0) NOT_SUPPORTED(1) BLOCKED_BY_SWITCHING_HIERARCHY(2) SELECT_FAILED(3) INVALID_POSITION(4) POSITION_REACHED(5) PARAMETER_CHANGE_IN_EXECUTION(6) eCommandResult ENUM STEP_LIMIT(7) BLOCKED_BY_MODE(8) BLOCKED_BY_PROCESS(9) BLOCKED_BY_INTERLOCKING(10) BLOCKED_BY_SYNNCHROCHECK(11) COMMAND_ALREADY_IN_EXECUTION(12) BLOCKED_BY_HEALTH (13) ONE_OF_N_CONTROL(14) ABORTION_BY_CANCEL(15) TIME_LIMIT_OVER(16) ABORTION_BY_TRIP(17) OBJECT_NOT_SELECTED(18) OBJECT_ALREADY_SELECTED(19) NO_ACCESS_AUTHORITY(20) ENDED_WITH_OVERSHOOT(21) ABORTION_DUE_TO_DEVIATION(22) ABORTION_BY_COMMUNICATION_LOSS(23) BLOCKED_BY_COMAND(24) NONE(25)
  • Page 109 5. CONFIGURATION Parameter Type Description Indicates that a command was intercepted and the data bCommandAvailable BOOL are available to be processed This structure stores received command data, which is composed by the following fields: sCommand STRUCT eCommand sSelectParameters sOperateParameters The description of each field is in this section. Out of function action from obtained result, according to ENUM eStatus...
  • Page 110 5. CONFIGURATION Parameter Type Description Received selection command configuration. This struc- sOperateConfig STRUCT ture parameters are described on Table Field of received operation command referred value. This sValue STRUCT structure parameters are described on Table Table 81: Parameters sOperateParameters Parameter Type Description When true indicates that an operation command without...
  • Page 111 5. CONFIGURATION Parameter Type Description bValue BOOL Point operation value. The pulsed command configuration parameters are stored sPulseConfig STRUCT in this structure. This structure parameters are described on Table 89. Table 85: Parameters sDoublePoint Parameter Type Description diValue DINT Point operation value. Table 86: Parameters sIntegerStatus Parameter Type...
  • Page 112: Modbus Rtu Master

    5. CONFIGURATION 5.7.5. MODBUS RTU Master This protocol is available for the Nexto Series CPUs in its serial channels. By selecting this option at MasterTool IEC XE, the CPU becomes MODBUS communication master, allowing the access to other devices with the same protocol, when it is in the execution mode (Run Mode).
  • Page 113 5. CONFIGURATION Configuration Description Default Options Delay for the answer trans- Send Delay (ms) 0 to 65535 mission. Minimum Interframe Minimum silence time be- 3.5 to 100.0 (chars) tween different frames. Table 90: MODBUS RTU Master General Configurations Notes: Send Delay: The answer to a MODBUS protocol may cause problems in certain moments, as in the RS-485 interface or other half-duplex.
  • Page 114 5. CONFIGURATION Direct Repre- Diagnostic Variable sentation T_DIAG_MODBUS Size Description Variable _RTU_MASTER_1.* 0: there are no errors. 1: invalid serial port. 2: invalid serial port mode 3: invalid baud rate 4: invalid data bits 5: invalid parity 6: invalid stop bits 7: invalid modem signal parameter SERIAL_STATUS %QB(n+1)
  • Page 115: Devices Configuration - Symbolic Mapping Configuration

    5. CONFIGURATION Direct Repre- Diagnostic Variable sentation T_DIAG_MODBUS Size Description Variable _RTU_MASTER_1.* tCommand. %QX(n+2).7 Reserved bDiag_23_reserved %QB(n+3) BYTE Reserved byDiag_3_reserved Communication Statistics: Counter of request transmitted by the mas- tStat. %QW(n+4) WORD ter (0 to 65535). wTXRequests Counter of normal responses received by tStat.
  • Page 116: Mappings Configuration - Symbolic Mapping Settings

    5. CONFIGURATION Configuration Description Default Options Communication Time-out Defines the application level 3000 10 to 65535 (ms) time-out Defines the numbers of re- Maximum Number of Re- tries before reporting a com- 0 to 9 tries munication error Table 92: Device Configurations Notes: Slave Address: According to the MODBUS standard, the valid slave addresses are from 0 to 247, where the addresses from 248 to 255 are reserved.
  • Page 117: Requests Configuration - Symbolic Mapping Settings

    5. CONFIGURATION Configuration Description Default Options Name of a variable declared Value Variable Symbolic variable name in a program or GVL Coil - Write (1 bit) Coil - Read (1 bit) Holding Register - Write Data Type MODBUS data type (16 bits) Holding Register - Read (16 bits)
  • Page 118 5. CONFIGURATION Figure 76: Data Requests Screen MODBUS Master Configuration Description Default Value Options 01 – Read Coils 02 – Read Input Status 03 – Read Holding Regis- Function Code ters MODBUS function type 04 – Read Input Registers 05 – Write Single Coil 06 –...
  • Page 119 5. CONFIGURATION Configuration Description Default Value Options Name of a variable declared Diagnostic Variable Diagnostic variable name in a program or GVL Field for symbolic variable used to disable, individually, MODBUS requests config- Variable used to disable ured. This variable must be Disabling Variable MODBUS relation of type BOOL.
  • Page 120 5. CONFIGURATION Write Single Register (FC 06): 1 Write Multiple Coils (FC 15): 1968 Write Multiple Registers (FC 16): 123 Mask Write Register (FC 22): 1 Read/Write Multiple Registers (FC 23): 121 Write Data Range: this field shows the MODBUS write data range configured for each request. The initial address, along with the read data size will result in the range of write data for each request.
  • Page 121 Exception Codes: The exception codes presented in this field are values returned by the slave. The definitions of the ex- ception codes 128, 129 and 255 presented in the table are valid only when using Altus slaves. Slaves from other manufacturers might use other definitions for each code.
  • Page 122: Modbus Rtu Slave

    5. CONFIGURATION ATTENTION Differently from other application tasks, when a depuration mark in the MainTask is reached, the task of a Master MODBUS RTU instance and any other MODBUS task will stop running at the moment that it tries to perform a writing in a memory area. It occurs in order to keep the consistency of the memory areas data while a MainTask is not running.
  • Page 123 5. CONFIGURATION Figure 78: Modbus Slave Advanced Configurations Configuration Description Default Possibilities Time for the instance execu- tion within the cycle, with- Task Cycle (ms) 20 to 100 out considering its own exe- cution time Delay for the transmission Send Delay (ms) 0 to 65535 response Minimum...
  • Page 124 5. CONFIGURATION Direct Repre- Diagnostic Variable sentation T_DIAG_MODBUS Size Description Variable _RTU_SLAVE_1.* The slave is not in execution (see bit: bIn- tDiag. %QX(n).1 terruptedByCommand). bNotRunning The bit bNotRunning was enabled as the tDiag. %QX(n).2 slave was interrupted by the user through bInterruptedByCommand command bits.
  • Page 125 5. CONFIGURATION Direct Repre- Diagnostic Variable sentation T_DIAG_MODBUS Size Description Variable _RTU_SLAVE_1.* Command bits, automatically initialized: tCommand. %QX(n+2).0 Stop slave. bStop tCommand. %QX(n+2).1 Restart slave. bRestart tCommand. %QX(n+2).2 Restart diagnostics statistics (counters). bResetCounter tCommand. %QX(n+2).3 Reserved. bDiag_19_reserved tCommand. %QX(n+2).4 Reserved. bDiag_20_reserved tCommand.
  • Page 126: Configuration Of The Relations - Symbolic Mapping Setting

    5. CONFIGURATION Direct Repre- Diagnostic Variable sentation T_DIAG_MODBUS Size Description Variable _RTU_SLAVE_1.* Counter of frames with overrun errors dur- tStat. %QW(n+12) WORD ing reception – UART FIFO or RX line – wRXOverrunErrors (0 to 65535). Counter of frames with construction er- tStat.
  • Page 127: Modbus Ethernet

    5. CONFIGURATION Value Variable: this field is used to specify a symbolic variable in MODBUS relation. Data Type: this field is used to specify the data type used in the MODBUS relation. Data Type Size [bits] Description Coil Digital output that can be read or written. Input Status Digital input (read only).
  • Page 128 5. CONFIGURATION Figure 80: MODBUS TCP Communication Network The association of MODBUS variables with CPU symbolic variables is made by the user through relations definition via MasterTool IEC XE configuration tool. It’s possible to configure up to 32 relations for the server mode and up to 128 relations for the client mode.
  • Page 129: Modbus Ethernet Client

    5. CONFIGURATION Data Type Size [bits] Description Coil Digital output that can be read or written. Input Status Digital input (read only). Holding Register Analog output that can be read or written. Input Register Analog input (read only). Table 104: MODBUS data types supported by Nexto CPUs Code Description 0x01...
  • Page 130: Modbus Client Protocol General Parameters - Configuration Via Symbolic Mapping

    5. CONFIGURATION 5.7.8.1.1. MODBUS Client Protocol General Parameters – Configuration via Symbolic Mapping The general parameters, found on the MODBUS protocol configuration initial screen (figure below), are defined as: Figure 81: MODBUS Client General Parameters Configuration Screen Configuration Description Default Options RTU via TCP Connection Mode...
  • Page 131: Device Configuration - Configuration Via Symbolic Mapping

    5. CONFIGURATION Direct Repre- Diagnostic Variable sentation T_DIAG_MODBUS Size Description Variable _ETH_CLIENT_1.* tCommand. %QX(n+2).1 Restart client. bRestart tCommand. %QX(n+2).2 Restart the diagnostic statistics (counters). bResetCounter tCommand. %QX(n+2).3 Reserved. bDiag_19_reserved tCommand. %QX(n+2).4 Reserved. bDiag_20_reserved tCommand. %QX(n+2).5 Reserved. bDiag_21_reserved tCommand. %QX(n+2).6 Reserved. bDiag_22_reserved tCommand.
  • Page 132 5. CONFIGURATION Figure 82: Device General Parameters Settings Configuration Description Default Options IP Address Server IP address 0.0.0.0 1.0.0.1 to 223.255.255.255 TCP Port TCP port 2 to 65534 Slave Address MODBUS Slave address 0 to 255 Table 108: MODBUS Client General Configurations Notes: IP Address: IP address of Modbus Server Device.
  • Page 133: Mappings Configuration - Configuration Via Symbolic Mapping

    5. CONFIGURATION configured protocol is MODBUS RTU over TCP. Communication Time-out: the Communication time-out is the time that the client will wait for a server response to the request. For a MODBUS Client device, two variables of the system must be considered: the time the server takes to process a request and the response sending delay in case it is set in the server.
  • Page 134: Requests Configuration - Configuration Via Symbolic Mapping

    5. CONFIGURATION Configuration Description Default Options Coil - Write (1 bit) Coil - Read (1 bit) Holding Register - Write Data Type MODBUS data type (16 bits) Holding Register - Read (16 bits) Holding Register – Mask And (16 bits) Holding Register –...
  • Page 135 5. CONFIGURATION Figure 84: MODBUS Data Request Screen Configuration Description Default Value Options 01 – Read Coils 02 – Read Input Status 03 – Read Holding Regis- Function Code MODBUS function type ters 04 – Read Input Registers 05 – Write Single Coil 06 –...
  • Page 136 5. CONFIGURATION Configuration Description Default Value Options Field for symbolic variable used to disable, individually, MODBUS requests config- Variable used to disable ured. This variable must be Disabling Variable MODBUS relation of type BOOL. The variable can be simple or array el- ement and can be in struc- tures.
  • Page 137 5. CONFIGURATION Write Multiple Registers (FC 16): 123 Mask Write Register (FC 22): 1 Read/Write Multiple Registers (FC 23): 121 Write Data Range: this field shows the MODBUS write data range configured for each request. The initial address, along with the read data size will result in the range of write data for each request. Diagnostic Variable: The MODBUS request diagnostics configured by symbolic mapping or by direct representation, are stored in variables of type T_DIAG_MODBUS_RTU_MAPPING_1 for Master devices and T_DIAG_MODBUS_ETH_CLIENT_1 for Client devices and the mapping by direct representation are in 4-byte and 2-word, which are described in Table...
  • Page 138 Exception Codes: the exception codes show in this filed is the server returned values. The definitions of the exception codes 128, 129 and 255 are valid only with Altus slaves. For slaves from other manufacturers these exception codes can have different meanings.
  • Page 139: Modbus Client Relation Start In Acyclic Form

    5. CONFIGURATION ATTENTION Unlike other tasks of an application, when a mark is reached at MainTask debugging, the MODBUS Ethernet Client instance task or any other MODBUS task will stop being executed at the moment it tries to write in the memory area. This occurs in order to maintain data consistency of memory areas while MainTask is not running.
  • Page 140 5. CONFIGURATION Notes: TCP Port: if there are multiple instances of the protocol added in a single Ethernet interface, different TCP ports must be selected for each instance. Some TCP ports, among the possibilities mentioned above, are reserved and therefore cannot be used.
  • Page 141: Modbus Server Diagnostics - Configuration Via Symbolic Mapping

    5. CONFIGURATION Configuration Description Default Value Options Time for the instance execu- tion within the cycle, with- Task Cycle (ms) 5 to 100 out considering its own exe- cution time Maximum idle time between Connection Inactivity client and server before the 1 to 3600 Time-out (s) connection is closed by the...
  • Page 142 5. CONFIGURATION Direct Rep- Diagnostic Variable resentation T_DIAG_MODBUS Size Description Variable _ETH_SERVER_1 .* Command bits, restarted automatically: tCommand. %QX(n+2).0 Stop the server. bStop tCommand. %QX(n+2).1 Restart the server. bRestart tCommand. %QX(n+2).2 Reset diagnostics statistics (counters). bResetCounter tCommand. %QX(n+2).3 Reserved. bDiag_19_reserved tCommand.
  • Page 143: Mapping Configuration - Configuration Via Symbolic Mapping

    5. CONFIGURATION Note: Counters: all counters of the MODBUS Ethernet Server Diagnostics return to zero when the limit value 65535 is exceeded. 5.7.9.1.3. Mapping Configuration – Configuration via Symbolic Mapping The MODBUS relations configuration, showed on figure below, follows the parameters described on table below: Figure 87: MODBUS Server Data Mappings Screen Default Configuration...
  • Page 144: Opc Da Server

    5. CONFIGURATION ATTENTION Unlike other tasks of an application, when a mark is reached at MainTask debugging, the MODBUS Ethernet Server instance task or any other MODBUS task will stop being exe- cuted at the moment it tries to write in the memory area. This occurs in order to maintain data consistency of memory areas while MainTask is not running.
  • Page 145: Creating A Project For Opc Da Communication

    5. CONFIGURATION Role Description The field devices and the PLCs are where the operation state and plant control information are stored. The SCADA system ac- Programmable Controllers and cess the information on these devices and store on the SCADA Field Devices Level server, so that the SCADA clients can consult it during the plant operation.
  • Page 146 5. CONFIGURATION ATTENTION The variables shown in the objects IoConfig_Globals, IoConfig_Application_Mappings and IoConfig_Global_Mappings are used internally for I/O control and shouldn’t be used by the user. ATTENTION In addition to the variables declared at SFC language POUs, some implicitly created vari- ables are also shown.
  • Page 147 5. CONFIGURATION Field Description Variable comment, inserted on the POU or GVL where the vari- able was declared. To show up as a variable comment here, the Comment comment must be entered one line before the variable on the editor, while in text mode, or in the comment column when in tabular mode.
  • Page 148: Configuring A Plc On The Opc Da Server

    5. CONFIGURATION A: INT; B: INT; {attribute 'symbol' := 'none'} C: INT; {attribute 'symbol' := 'read'} D :INT; END_VAR When a variable with a type different from the basic types is defined, the use of the attribute must be done inside the declaration of this DUT and not only in the context in which the variable is created.
  • Page 149 5. CONFIGURATION Figure 91: OPC DA Server Settings The Gateway Configuration is the same set in the Gateway used for the communication between the MasterTool IEC XE and the PLC and described in Communication Settings, present in the MasterTool IEC XE User Manual – MU299609. If the configuration used is localhost the Gateway Address must be filled with 127.0.0.1.
  • Page 150 5. CONFIGURATION Default Set- Device Configuration Description Possibilities ting IP Address of the computer that the OPC DA Server is installed, for the cases in which all PLCs are in the Gateway Address same subnetwork. If there’s 127.0.0.1 0.0.0.0 to 255.255.255.255 some PLC that it’s in an- other subnetwork, it must be specified the Gateway used...
  • Page 151: Importing A Project Configuration

    5. CONFIGURATION ATTENTION To store the OPC DA Server configuration, the MasterTool IEC XE must be run with ad- ministrator rights on the Operational System. Depending on the OS version, this privilege must be done in the moment that the program is executed: right-click the MasterTool IEC XE icon and choose Run as Administrator.
  • Page 152: Limits Of Communication With Opc Da Server

    5. CONFIGURATION State Value Description There has been a disconnection with the PLC configured STATE_DISCONNECT in the OPC DA Server. When the OPC configuration (stored in an OPCServer.ini file) has a wrong syntax, the variable value will be this. STATE_NO_CONFIGURATION Generally, this behavior is not observed for the Master- Tool IEC XE maintains this configuration valid.
  • Page 153: Accessing Data Through An Opc Da Client

    5. CONFIGURATION Table 126: OPC DA Server Communication Limits ATTENTION The Maximum number of simultaneous connections of an OPC DA Server in a single PLC is shared with connections made with the MasterTool IEC XE. I.e. the sum of connections of OPC DA Server and MasterTool IEC XE should not exceed the maximum quantity defined in Table 126.
  • Page 154: Opc Ua Server

    5. CONFIGURATION In cases where the server is remotely located, it may be necessary to add the network path or IP address of the computer in which the server is installed. In these cases, there are two configuration options. The first is to directly configure it, being necessary to enable the COM/DCOM Windows Service.
  • Page 155 5. CONFIGURATION Figure 94: OPC UA Architecture The figure above presents a typical architecture for SCADA system communication and PLCs in automation design. All roles present in the communication are explicit in this figure regardless of where they are running, they may be on the same equipment or on different equipment.
  • Page 156: Creating A Project For Opc Ua Communication

    5. CONFIGURATION Role Description The supervisory network is the network by which SCADA Clients are connected to SCADA Servers, often using a propri- etary SCADA system protocol. In a topology in which multiple Supervision Network Clients are not used or the Server and Client are installed in the same equipment, there is no such network, and in this case this equipment must directly use the OPC UA protocol for commu- nication with the PLC.
  • Page 157 5. CONFIGURATION Figure 95: Object Symbol Configuration ATTENTION When enabling OPC UA protocol support, OPC DA protocol support is still enabled. You can enable OPC UA and OPC DA communications at the same time to report the variables configured on the Symbol Configuration object or via attributes. Another way to access this configuration, once already created a project with the Symbol Configuration object, is given by accessing the Settings menu of the configuration tab of the Symbol Configuration.
  • Page 158: Types Of Supported Variables

    5. CONFIGURATION 5.7.11.2. Types of Supported Variables This section defines the types of variables that support communication via the OPC UA protocol, when declared within GVLs or POUs and selected in the Symbol Configuration object (see previous section). The following types of simple variables are supported: BOOL SINT USINT / BYTE...
  • Page 159: Main Communication Parameters Adjusted In An Opc Ua Client

    5. CONFIGURATION 6. Click the icon to generate a certificate and select the following parameters: Key length (bit): 3072 Validity period (days): 365 (can be modified if desired) 7. Wait while the certificate is calculated and transferred to the controller (this may take a few minutes); 8.
  • Page 160: Publishing Interval (Ms) E Sampling Interval (Ms)

    5. CONFIGURATION 5.7.11.6.2. Publishing Interval (ms) e Sampling Interval (ms) The Publishing Interval parameter (unit: milliseconds) must be set for each subscription. The Sampling Interval parameter must be set for each variable (unit: milliseconds). However, in many OPC UA clients, the Sampling Interval parameter can be defined for a subscription, being the same for all the variables grouped in the subscription.
  • Page 161: Publishingenabled, Maxnotificationsperpublish E Priority

    5. CONFIGURATION According to the OPC UA standard, it is possible to define these parameters for each variable. However, many clients allow you to define common values for all variables configured in a subscription. The Filter Type parameter must be of DataChangeFilter, indicating that value changes in the variables should cause it to be transmitted in a Publish Response package.
  • Page 162 5. CONFIGURATION Figure 97: Selecting OPC UA Server in Client Configuration Once the Client connects to the Server, TAG import commands can be used. These commands query information declared in the PLC, returning a list with all the symbols made available by the PLC. Figure 98: List of Symbols Browsed by OPC UA The list of selected variables will be included in the Client’s communications list and can be used, for example, in screens of a SCADA system.
  • Page 163: Ethernet/Ip

    5. CONFIGURATION 5.7.12. EtherNet/IP The EtherNet/IP is a master-slave architecture protocol, which consist of an EtherNet/IP Scanner (the master) and one or more EtherNet/IP Adapter (the slave). The EtherNet/IP editor provides dialogs for setting parameters and for mapping inputs/outputs to variables. The Ethernet/IP protocol is based on CIP (Common Industrial Protocol), which have two primary purposes: The transport of control-oriented data associated with I/O devices and the transport of other information related to the system being con- trolled, such as configuration parameters and diagnostics.
  • Page 164: Ethernet/Ip Scanner Configuration

    5. CONFIGURATION Figure 99: Adding an EtherNet/IP Interface Figure 100: Adding an EtherNet/IP Adapter or Scanner 5.7.12.2. EtherNet/IP Scanner Configuration The Scanner requires at least one Adapter with which it will exchange data. New Adapters can be installed on MasterTool with the EDS and DCF Files.
  • Page 165: General

    5. CONFIGURATION Adapter. Figure 101: Adding an EtherNet/IP Adapter Under the Scanner 5.7.12.2.1. General After open the Adapter declared under the Scanner it’s possible to configure it as needed. The first Tab is General, on it is possible to configure the IP address and the Electronic Keying parameters. These parameters must be checked or unchecked if the adapter being used is installed on MasterTool.
  • Page 166: Connections

    5. CONFIGURATION 5.7.12.2.2. Connections The upper area of the Connections tab displays a list of all configured connections. When there is an Exclusive Owner connection in the EDS file, it is inserted automatically when the Adapter is added. The configuration data for these connections can be changed in the lower part of the view.
  • Page 167: Assemblies

    5. CONFIGURATION from zero. Figure 104: EtherNet/IP New Connection’s Window 5.7.12.2.3. Assemblies The upper area of the Assemblies tab displays a list of all configured connections. When a connection is selected, the associated inputs and outputs are displayed in the lower area of the tab. Figure 105: EtherNet/IP Assemblies Output Assembly and Input Assembly: Configuration...
  • Page 168: Ethernet/Ip I/O Mapping

    5. CONFIGURATION Configuration Description Deletes all selected Input- Delete s/Outputs. Moves the selected In- Move Up put/Output within list. The order in the list deter- Move Down mines the order in the I/O mapping. These values can be changed Name by double-clicking into the text field.
  • Page 169: Module Types

    5. CONFIGURATION Figure 106: Adding an EtherNet/IP Module under the Adapter 5.7.12.3.1. Module Types There are 18 different modules which can be added under the adapter. Nine outputs and Nine inputs. They are of type BYTE, WORD, DWORD, REAL, SINT, INT, DINT and BIG. These types can be chosen in the General tab of the module. Figure 107: EtherNet/IP Module’s Type 5.7.12.3.2.
  • Page 170: Type Of Data

    5. CONFIGURATION Size: 1000 events Retentivity: non retentive Overflow policy: keep the newest To configure this protocol, it is needed to do the following steps: Add a protocol IEC 60870-5-104 Server instance to one of the available Ethernet channel. To realize this procedure consult the section Inserting a Protocol Instance Configure the Ethernet interface.
  • Page 171: Double Points

    5. CONFIGURATION Below, there is a code example for fields manipulation in an USINT type variable. Attention, because this code doesn’t consist if the value is inside the range, therefore this consistency remains at user’s charge. PROGRAM UserPrg usiVTI: USINT; // Value with transient state indication, mapped for the Client siValue: SINT;...
  • Page 172: Digital Input Double Points

    5. CONFIGURATION 5.7.13.2.1. Digital Input Double Points For the digital input modules it is needed two auxiliary variables’ declaration, to be mapped on the digital input module, besides the double point that is wished to map on the server: The double point value variable: type DBP The simple point OFF/TRIP value variable: type BOOL The simple point ON/CLOSE value variable: type BOOL Figure 108: Double Point Variables Declaration Example...
  • Page 173: Digital Output Double Points

    5. CONFIGURATION Figure 111: Variables Mapping at the Module Inputs At last, the user must insert two code lines in its application, to be cyclically executed, to simple variables value attribution to double point: DBP value variable, index ON, receive simple point ON value DBP value variable, index OFF, receive simple point OFF value Figure 112: Variables’...
  • Page 174 5. CONFIGURATION fbPulsedCmd: PulsedCommandNexto; // Pulsed Command Instance byResult: BYTE; // Pulsed command result dbpIEC104: DBP; // Variable mapped in the IEC 104 bSetup: BOOL:= TRUE; // Interceptor initial setup END_VAR // Executes the function configuration in the first cycle bSetup THEN CmdReceive.dwVariableAddr:= ADR(dbpIEC104);...
  • Page 175 5. CONFIGURATION fbPulsedCmd( byCmdType:= 102, byPulseTime:= DWORD_TO_BYTE(CmdReceive.sCommand.sOperateParameters. sValue.sDoublePoint.sPulseConfig.dwOffDuration/10), ptDbpVarAdr:= ADR(dbpIEC104), stQuality:= IOQualities.QUALITY_NX2020[5], byStatus=> byResult); END_IF ELSE // Returns command not supported byResult:= 1; END_IF COMMAND_TYPE.CANCEL: // Returns command finished with success // (controlled by IEC104 protocol) byResult:= 7; END_CASE // Treats the pulsed command function result // and generates the answer to the intercepted command CASE byResult...
  • Page 176 5. CONFIGURATION and used a function block equivalent to PulsedCommand function of library LibRtuStandard. The PulsedCommandNexto() function block shows up coded in ST language. FUNCTION_BLOCK PulsedCommandNexto VAR_INPUT byCmdType: BYTE; // command type: // 100 = status // 101 = close/on // 102 = trip/off byPulseTime: BYTE;...
  • Page 177 5. CONFIGURATION byStatus:= 2; END_IF 102: // Execute pulse OFF // Valids the pulse duration byPulseTime > 1 THEN // Check if there is already an active command on this point ptDbpVarAdr^.ON ptDbpVarAdr^.OFF THEN // Returns that there is already an active byStatus:= 6;...
  • Page 178: General Parameters

    5. CONFIGURATION // Disable TRIP and CLOSE outputs ptDbpVarAdr^.ON:= FALSE; ptDbpVarAdr^.OFF:= FALSE; // Returns absent module byStatus:= 4; // Next state: initial byState:= 0; END_IF // Copy DBP output states to the simple outputs bON:= ptDbpVarAdr^.ON; bOFF:= ptDbpVarAdr^.OFF; 5.7.13.3. General Parameters To the General Parameters configuration of an IEC 60870-5-104 Server according to figure below follow the table below parameters: Figure 114: Server IEC 60870-5-104 General Parameters Screen...
  • Page 179 5. CONFIGURATION Figure 115: IEC 60870-5-104 Server Mappings Screen...
  • Page 180 5. CONFIGURATION Factory De- Parameter Description Possibilities fault Name of a variable declared Value Variable Symbolic variable name in a POU or GVL Single Point Information Double Point Information Step Position Information Measured Value (Normal- 60870-5-104 object ized) Object Type type configuration Measured Value (Scaled) Measured...
  • Page 181: Link Layer

    5. CONFIGURATION write command, the written value is going to be stored in that variable. The variable can be simple, array, array element or can be at structures. Counter Variable: This field applies only on mapping of Integrated Totals type objects, being this the controller variable to be managed on process.
  • Page 182 5. CONFIGURATION Figure 116: Server IEC 60870-5-104 Link Layer Configuration Screen Factory De- Parameter Description Possibilities fault Listened port address to client connection. Used Port Number 2404 1 to 65535 when the client connection isn’t through IP Connected client IP, used IP Address when the client connection 0.0.0.0...
  • Page 183: Application Layer

    5. CONFIGURATION Factory De- Parameter Description Possibilities fault Maximum number data messages (I-Frame) Parameter w (APDUs) 1 to 8 received and not acknowl- edged Table 135: IEC 60870-5-104 Server Link Layer Configuration Note: The fields Time-out t1 (s), Time-out t2 (s) and Time-out t3 (s) are dependents between themselves and must be configured in a way that Time-out t1 (s) be bigger than Time-out t2 (s) and Time-out t3 (s) be bigger than Time-out t1 (s).
  • Page 184 5. CONFIGURATION Factory De- Parameter Description Possibilities fault Time period in which the selection command will remain active (the count Maximum Time Between starts from the received 1 to 180 Select and Operate (s) selection command knowledge) waiting Operate command Transmission Mode Analog input events trans-...
  • Page 185: Server Diagnostic

    5. CONFIGURATION Function Type Configuration Description Equivalent to the counters acquisition D Mode (Integrated Totals) defined by Stan- Freeze by counter- dard IEC 60870-5-101. In this mode, interrogation com- Transmission Mode the control station’s counters interrogation mand, transmit commands, freeze the counters. Case the spontaneously frozen values have been modified, they are reported through events.
  • Page 186: Commands Qualifier

    5. CONFIGURATION Diagnostic variable type Size Description T_DIAG_IEC104_SERVER_1.* tClient_X.eConnectionStatus. Connected client. ENUM value (2) CONNECTED tClient_X.tQueueDiags. BOOL Client queue is overflowed bOverflow tClient_X.tQueueDiags. WORD Configured queue size wSize tClient_X.tQueueDiags. WORD Events number in the queue wUsage tClient_X.tQueueDiags. DWORD Reserved dwReserved_0 tClient_X.tQueueDiags.
  • Page 187: Canopen Manager

    - Although CANopen specification allows up to 127 nodes (including Manager), applications with Nexto Xpress must not exceed a maximum of 64 slave devices. A special care must be taken considering the physical bus lenght and the selected baudrate. The following table shows the...
  • Page 188: Canopen Manager Configuration

    5. CONFIGURATION Figure 118: Adding CANopen Manager To add a CANopen slave device, first you need to install it on the Device Repository. To do that, go to Tools - Device Repository and install the device EDS file. After that, right-click on the CANopen_Manager device and click on Add Device. Search the devices you desire and click on Add Device button like shown on the following picture: Figure 119: Adding CANopen Slave Device 5.7.14.2.
  • Page 189: Canopen Slave Configuration

    5. CONFIGURATION Figure 120: CANopen Manager general parameters The detailed description of CANopen Manager general parameters can be found on section Device Editors - CANopen of MasterTool IEC XE Online Help (F1). Additionally, the tab CANopen I/O Mapping allows to change the bus cycle task: Figure 121: CANopen Manager bus cycle task setting By default, the bus cycle task is configured to use the MainTask.
  • Page 190 5. CONFIGURATION The General tab contains the slave address (Node ID), Nodeguarding and Emergency object settings. The PDO tab contains the configuration of process data (I/O data) that will be exchanged. The SDO tab contains the SDO objects which can be selected to be accessed by SDO read/write FunctionBlock provided by CiA405 library.
  • Page 191: Remote I/O Mode

    5.8. Remote I/O Mode Nexto Xpress controllers have a remote operation mode, which is used as I/O expansion. This expansion is based in CANopen protocol. When the controller is in remote mode, it isn’t a standard PLC, operating only as a remote slave. To configure your Xpress as a remote I/O expansion, access the product Web page PLC Management, in the Operation Mode tab.
  • Page 192 5. CONFIGURATION Figure 124: CANopen Slave Remote Configuration Screen Click in the items with the + on the right to expand the configuration panel. All parameters shown in the I/O Configuration are the same mentioned in the Integrated I/O section. While the CANopen Slave Configuration parameters are the same of those in the CANopen Manager section.
  • Page 193 5. CONFIGURATION Figure 126: Operation Mode in the PLC Overview Screen Therefore, it’s possible to use a controller with the CANopen Manager feature (e.g. XP325) to access the CANopen Slave I/O. See the CANopen Manager section in this document to learn how use this feature. The CANopen Slave Remote PDOs are organized as follow: Variable Name Representation...
  • Page 194 5. CONFIGURATION Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 bOpenLoop bOverRange bInputNotEnable Table 143: AIx Diagnostics Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 bUnderRange bOverRange bInputNotEnable...
  • Page 195 5. CONFIGURATION Figure 128: CANopen Slave in Pre-Operational - STOP...
  • Page 196: Communication Performance

    5. CONFIGURATION 5.9. Communication Performance 5.9.1. MODBUS Server The MODBUS devices configurable in the Nexto CPU run in the background, with a priority below the user application and cyclically. Thus, their performance varies depending on the remaining time, taking into account the difference between the interval and time that the application takes to run.
  • Page 197: Opc Da Server

    5. CONFIGURATION For cycle times equal or greater than 20 ms, the increase of the answer rate is linear, and may be calculated using an equation: N = C x (1 / T ) Where: N is the medium number of answers per second; C is the number of active connections; T is the MODBUS task interval in seconds.
  • Page 198: User Web

    5.11.2. SNMP in Nexto Xpress Controllers The Nexto Xpress controllers behaves as agents in SNMP communication, with support for protocols SNMPv1, SNMPv2c, SNMPv3 and support the MIB-II, where required objects are described in RFC-1213. The information provided by the SNMP cannot be manipulated or accessed through the user application, requiring an external SNMP manager to perform access.
  • Page 199 Extension to Interfaces, OID 1.3.6.1.2.1.2 Table 149: MIB II Objects – Nexto Xpress SNMP Agent By default, the SNMP agent is activated, i.e., the service is initialized at the time the controller is started. The access to the agent information is via the Ethernet interface, TCP port 161. The following figure shows an example of an SNMP manager reading some values.
  • Page 200: Configuration Snmp

    5. CONFIGURATION If you want to disable the service, change the SNMPv3 user or communities for SNMPv1 / v2c predefined, you must access the controller’s web page as described on the following section. 5.11.3. Configuration SNMP SNMP settings can be changed through the web page, in the CPU Management tab in the SNMP menu. To access the settings, you must first log in, as shown in figure below.
  • Page 201: User And Snmp Communities

    The Username and Password to access the agent via SNMP protocol are the same used to login on the SNMP Settings web page. 5.11.4. User and SNMP Communities To access the SNMPv1 / v2c of the Nexto Xpress controllers, there are two communities, according to following table. Communities Default String...
  • Page 202: Rtc Clock

    5. CONFIGURATION 5.12. RTC Clock Nexto Series CPUs have an internal clock that can be used through the NextoStandard.lib library. This library is automati- cally loaded during the creation of a new project (to perform the library insertion procedure, see Libraries section).
  • Page 203: Gettimezone

    5. CONFIGURATION Input Parameters Type Description This variable returns the value of EXTENDED_DATE DATEANDTIME date and hour of RTC in the format _AND_TIME shown at Table 162. Table 153: Input Parameters of GetDateAndTime Output Parameters Type Description Returns the function error state, see GETDATEANDTIME RTC_STATUS Table 164.
  • Page 204: Getdayofweek

    5. CONFIGURATION Output Parameters Type Description Returns the function error state, see GetTimeZone RTC_STATUS Table 164. Table 156: Output Parameters of GetTimeZone Utilization example in ST language: PROGRAM UserPrg GetTimeZone_Status : RTC_STATUS; TimeZone : TIMEZONESETTINGS; xEnable : BOOL; END_VAR -------------------------------------------------------------------------- xEnable = TRUE THEN GetTimeZone_Status := GetTimeZone(TimeZone);...
  • Page 205: Rtc Writing Functions

    5. CONFIGURATION 5.12.1.2. RTC Writing Functions The clock settings are made through function and function blocks as follows: 5.12.1.2.1. SetDateAndTime SetDateAndTime function is used to write the settings on the clock. Typically the precision is on the order of hundreds of milliseconds.
  • Page 206: Settimezone

    5. CONFIGURATION xExec : BOOL; xError : BOOL; xStatus : RTC_STATUS; END_VAR -------------------------------------------------------------------------- xRequest THEN SetDateAndTime.REQUEST:=TRUE; SetDateAndTime.DATEANDTIME:=DateAndTime; xRequest:= FALSE; END_IF SetDateAndTime(); SetDateAndTime.REQUEST:=FALSE; SetDateAndTime.DONE THEN xExec:=SetDateAndTime.EXEC; xError:=SetDateAndTime.ERROR; xStatus:=SetDateAndTime.STATUS; END_IF ATTENTION If you try to write time values outside the range of the RTC, the values are converted to valid values, provided they do not exceed the valid range of 01/01/2000 to 12/31/2035.
  • Page 207: Rtc Data Structures

    5. CONFIGURATION When called, the function will configure the TIMEZONE with the new system time zone configuration. The configuration results is returned by the function. Utilization example in ST language: PROGRAM UserPrg Status : RTC_STATUS; TimeZone : TIMEZONESETTINGS; xWrite : BOOL; END_VAR -------------------------------------------------------------------------- //FB SetTimeZone...
  • Page 208: Timezonesettings

    5. CONFIGURATION Enumerable Value Description INVALID_DAY SUNDAY MONDAY DAYS_OF_WEEK TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY Table 163: DAYS_OF_WEEK Structure 5.12.2.3. RTC_STATUS This enumerator is used to return the type of error in the RTC setting or reading and it is described in the table below: Enumerator Value Description...
  • Page 209: Function Blocks And Functions

    5. CONFIGURATION NextoStandard library has the appropriate interfaces for writing and reading the system’s date and hour accordingly and for informing the correct diagnostics. 5.13. Function Blocks and Functions 5.13.1. Special Function Blocks for Serial Interfaces The special function blocks for serial interfaces make possible the local access (COM 1 AND COM 2) and also access to remote serial ports (expansion modules).
  • Page 210 5. CONFIGURATION Data type Options Description Controls the RS-232C port of the Nexto CPU. In case the CTS is dis- abled, the RTS is enabled. Then waits for the CTS to be enabled RS232_RTS_CTS to get the transmission and RTS restarts as soon as possible, at the end of transmission.
  • Page 211 5. CONFIGURATION Data type Options Description List all available serial ports (COM 10, COM 11, COM 12, COM 13, SERIAL_PORT COM 1 COM 14, COM 15, COM 16, COM 17, COM 18 and COM 19 – expan- sion modules). COM 2 Defines a character in the RX queue in extended mode.
  • Page 212 5. CONFIGURATION Data type Options Description NO_ERROR No errors. Return the parameters with invalid values or out of range: - SERIAL_PORT - SERIAL_MODE ILLEGAL_* - BAUDRATE - DATA_BITS - PARITY - STOP_BITS - HANDSHAKE - UART_RX_THRESHOLD - TIMEOUT - TX_BUFF_LENGTH - HANDSHAKE_METHOD - RX_BUFF_LENGTH Indicates the serial port is being...
  • Page 213: Serial_Cfg

    5. CONFIGURATION Data type Options Description The interruption by the CTS sig- nal can’t be enabled in case CTS_INTERRUPT_ the handshake is different from NOT_ALLOWED RS232_MANUAL or in case the serial port doesn’t have the respec- tive pin. The interruption by the DSR signal can’t be enabled in case the serial DSR_INTERRUPT_ port doesn’t have the respective pin.
  • Page 214 5. CONFIGURATION Output parameters Type Description This variable is true when the block con- cludes the execution with an error. It is ERROR BOOL false otherwise. It is connected to the vari- able DONE, as its status is showed after the block conclusion.
  • Page 215: Serial_Get_Cfg

    5. CONFIGURATION Config.DONE; Config.EXEC; Config.ERROR; Status := Config.STATUS; //If it is necessary to treat the error. 5.13.1.2. SERIAL_GET_CFG The function block is used to capture the desired serial port configuration. Figure 139: Block to Capture the Serial Configuration Input parameters Type Description This variable, when true, enables the func-...
  • Page 216: Serial_Get_Ctrl

    5. CONFIGURATION Output parameters Type Description This structure receives the serial port con- PARAMETERS SERIAL_PARAMETERS figuration parameters, as described in the SERIAL_PARAMETERS data type. Table 170: SERIAL_GET_CFG Output Parameters Utilization example in ST language, after the library is inserted in the project: PROGRAM UserPrg GetConfig: SERIAL_GET_CFG;...
  • Page 217 5. CONFIGURATION Output parameters Type Description This variable is true when the block is com- DONE BOOL pletely executed. It is false otherwise. This variable is true while the block is be- EXEC BOOL ing executed. It is false otherwise. This variable is true when the block con- cludes the execution with an error.
  • Page 218: Serial_Get_Rx_Queue_Status

    5. CONFIGURATION 5.13.1.4. SERIAL_GET_RX_QUEUE_STATUS This block is used to read some status information regarding the RX queue, specially developed for the normal mode, but it can also be used in the extended mode. Figure 141: Block Used to Visualize the RX Queue Status Input parameters Type Description...
  • Page 219 5. CONFIGURATION PROGRAM UserPrg Get_Status: SERIAL_GET_RX_QUEUE_STATUS; Port: SERIAL_PORT := COM1; Status: SERIAL_STATUS; Status_RX: SERIAL_RX_QUEUE_STATUS; END_VAR //INPUTS: Get_Status.REQUEST := TRUE; Get_Status.PORT := Port; //FUNCTION: Get_Status(); //OUTPUTS: Get_Status.DONE; Get_Status.EXEC; Get_Status.ERROR; Status := Get_Status.STATUS; //If it is necessary to treat the error. Status_RX := Get_Status.RXQ_STATUS; //If it is necessary to treat the error of the RX.
  • Page 220 5. CONFIGURATION Output parameters Type Description This variable is true when the block con- cludes the execution with an error. It’s ERROR BOOL false otherwise. It is connected to the vari- able DONE, as its status is showed after the block conclusion.
  • Page 221 5. CONFIGURATION Figure 143: Block Used to Read the Reception Buffer Values Input parameters Type Description This variable, when true, enables the func- REQUEST BOOL tion block use. Select the serial port, as described in the PORT SERIAL_PORT SERIAL_PORT data type. RX_BUFFER_ Pointer of a byte array to receive the buffer POINTER TO BYTE...
  • Page 222 5. CONFIGURATION Output parameters Type Description In case the ERROR variable is true, the STATUS structure will show the error found during the block execution. The possible states, already described in the STATUS SERIAL_STATUS SERIAL_STATUS data type, are: - NO_ERROR - ILLEGAL_SERIAL_PORT - PORT_BUSY - HW_ERROR_UART...
  • Page 223 5. CONFIGURATION 5.13.1.7. SERIAL_RX_EXTENDED This function block is used to receive a serial port buffer using the RX queue extended mode as shown in the Serial Interface section. Figure 144: Block Used for Reception Buffer Reading Input parameters Type Description This variable, when true, enables the func- REQUEST BOOL...
  • Page 224 5. CONFIGURATION Output parameters Type Description In case the ERROR variable is true, the STATUS structure will show the error found during the block execution. The possible states, already described in the STATUS SERIAL_STATUS SERIAL_STATUS data type, are: - NO_ERROR - ILLEGAL_SERIAL_PORT - PORT_BUSY - HW_ERROR_UART...
  • Page 225: Serial_Set_Ctrl

    5. CONFIGURATION //OUTPUTS: Receive_Ex.DONE; Receive_Ex.EXEC; Receive_Ex.ERROR; Status := Receive_Ex.STATUS; //If it is necessary to treat the error. Receive_Ex.RX_RECEIVED; Receive_Ex.RX_REMAINING; Receive_Ex.RX_SILENCE; 5.13.1.8. SERIAL_SET_CTRL This block is used to write on the control signals (RTS and DTR), when they are available in the serial port. It can also set a busy condition for the transmission, through BREAK parameter and it can only be used if the modem signal is configured for RS232_MANUAL.
  • Page 226 5. CONFIGURATION Input parameters Type Description This variable, when true, enables the func- REQUEST BOOL tion block use. Select the serial port, as described in the PORT SERIAL_PORT SERIAL_PORT data type. RTS_VALUE BOOL Value to be written on RTS signal. Enables the RTS_VALUE parameter writ- RTS_EN BOOL...
  • Page 227: Serial_Tx

    5. CONFIGURATION Set_Control.PORT := Port; Set_Control.RTS_VALUE := FALSE; Set_Control.RTS_EN := FALSE; Set_Control.DTR_VALUE := FALSE; Set_Control.DTR_EN := FALSE; Set_Control.BREAK := FALSE; //FUNCTION: Set_Control(); //OUTPUTS: Set_Control.DONE; Set_Control.EXEC; Set_Control.ERROR; Status := Set_Control.STATUS; //If it is necessary to treat the error. 5.13.1.9. SERIAL_TX This function block is used to transmit a data buffer through serial port and it is only finalized after all bytes were transmitted or after time-out (generating errors).
  • Page 228 5. CONFIGURATION Input parameters Type Description When true, the RX queue and the UART CLEAR_RX_ FIFO RX are erased before the transmis- BOOL BEFORE_TX sion beginning. This behavior is typical in half-duplex master/slave protocols. Table 183: SERIAL_TX Input Parameters Output parameters Type Description This variable is true when the block is com-...
  • Page 229: Inputs And Outputs Update

    5. CONFIGURATION Transmit.REQUEST := TRUE; Transmit.PORT := Port; Transmit.TX_BUFFER_POINTER := ADR(Buffer_Pointer); Transmit.TX_BUFFER_LENGTH := 10; Transmit.TX_TIMEOUT := 10000; Transmit.DELAY_BEFORE_TX := 1000; Transmit.CLEAR_RX_BEFORE_TX := TRUE; //FUNCTION: Transmit(); //OUTPUTS: Transmit.DONE; Transmit.EXEC; Transmit.ERROR; Status := Transmit.STATUS; //If it is necessary to treat the error. Transmit.TX_TRANSMITTED;...
  • Page 230: Timer Retain

    5. CONFIGURATION Figure 148: Refresh integrated Outputs function 5.13.3. Timer Retain The timer retain is a function block developed for applications as production line clocks, that need to store its value and restart the counting from the same point in case of power supply failure. The values stored by the function block, are only zero in case of a Reset Cold, Reset Origin or a new application Download (see the MasterTool IEC XE User Manual - MU299609), when the counters keep working, even when the application is stopped (Stop Mode).
  • Page 231: Tof_Ret

    5. CONFIGURATION Figure 150: TOF_RET Block Graphic Behavior Utilization example in ST language: PROGRAM UserPrg VAR RETAIN bStart : BOOL := TRUE; TOF_RET : TOF_RET; END_VAR // When bStart=FALSE starts counting TOF_RET( IN := bStart, PT := T#20S); // Actions executed at the end of the counting (TOF_RET.Q = FALSE) THEN bStart := TRUE;...
  • Page 232: Ton_Ret

    5. CONFIGURATION Output parameters Type Description This variable executes a rising edge as the BOOL PT variable (time delay) reaches its maxi- mum value. TIME This variable shows the current time delay. Table 188: TON_RET Output Parameters Figure 152: TON_RET Block Graphic Behavior Utilization example in ST language: PROGRAM UserPrg...
  • Page 233 5. CONFIGURATION Input parameters Type Description This variable, when receives a rising edge, BOOL enables the function block counting. This variable specifies the function block TIME counting limit (time delay). Table 189: TP_RET Input Parameters Output parameters Type Description This variable is true during the counting, BOOL otherwise is false.
  • Page 234: Maintenance

    These diagnostics function is to point possible system installation or configuration problems, and communication network problems or deficiency. 6.1.1. Diagnostics via LED Nexto Xpress controllers have a power (PWR) and a diagnostic indication (DG) LEDs. The following table shows the meaning of each state and its respective descriptions: Description...
  • Page 235: Diagnostics Via Web

    Additionally, the management tab has other features like Firmware Update and SNMP. Firmware Update tab is restricted to the user, that is, only for internal use of Altus. In cases where the update is performed...
  • Page 236: Diagnostics Via Variables

    Retentivity Error: The PLC writes data to retentive memory every 5 seconds at runtime. When this bit is TRUE, the most probable root cause is a hardware error on retentive memory. In this case, the CPU must be sent to Altus Technical Assistance.
  • Page 237: Detailed Diagnostics

    6. MAINTENANCE 6.1.3.2. Detailed Diagnostics The tables below contains Nexto Xpress controllers’ detailed diagnostics. It is important to have in mind the observations below before consulting them: Visualization of the Diagnostics Structures: The Diagnostics Structures added to the Project can be seen at the item Library manager of MasterTool IEC XE tree view.
  • Page 238 6. MAINTENANCE DG_XP3xx.tDetailed.* Type Description Counter of characters transmitted from COM1.* dwTXBytes DWORD COM 1 (0 to 4294967295). Number of characters left in the reading wRXPendingBytes WORD buffer in COM 1 (0 to 4095). Number of characters left in the transmis- wTXPendingBytes WORD sion buffer in COM 1 (0 to 1023).
  • Page 239 6. MAINTENANCE DG_XP3xx.tDetailed.* Type Description tMassStorage. Informs the status of the device: ENUM (BYTE) byMountState MOUNTED UNMOUNTED tMassStorage. Informs the free space on the mass storage DWORD device. dwFreeSpaceKb tMassStorage. Informs the total size of the mass storage DWORD device. dwTotalSizeKb tSerialConverter.
  • Page 240 6. MAINTENANCE DG_XP3xx.tDetailed.* Type Description FAILED_RETRYING (3): connection failed, the WiFi will try to connect again. This can occur due to wrong password or the network is not available. CONNECTED (4): WiFi adapter con- nected to the network. tWifiAdapter. String with the IP used in the WiFi net- STRING work.
  • Page 241 6. MAINTENANCE DG_XP3xx.tDetailed.* Type Description Counter of connection losses in the dwRXDropErrors DWORD reception through the interface (0 to 4294967295). Counter of frame errors in the reception dwRXFrameErrors DWORD through the interface (0 a 4294967295). Indicates if the memory used for recording byMounted BYTE the user files is able to receive data.
  • Page 242 6. MAINTENANCE DG_XP3xx.tDetailed.* Type Description sLastUpdateTime. BYTE byDayOfMonth sLastUpdateTime. BYTE byMonth sLastUpdateTime. Date and time of the last sync time via WORD SNTP. wYear sLastUpdateTime. BYTE byHours sLastUpdateTime. BYTE byMinutes sLastUpdateTime. BYTE bySeconds sLastUpdateTime. WORD byMilliseconds AnalogInputs. The input channel is not enabled on the tAnalogInput_xx.
  • Page 243 6. MAINTENANCE Code Description Code Description Watchdog time of the expired IEC 0x0010 0x0052 Privileged instruction. task (Software Watchdog). 0x0012 I/O configuration error. 0x0053 Page failure. Check-up errors after program 0x0013 0x0054 Stack overflow. download. 0x0014 0x0055 Fieldbus error. Invalid disposition. 0x0015 I/O updating error.
  • Page 244: Diagnostics Via Function Blocks

    6. MAINTENANCE Sensors of Platinum Sensors of Platinum 0 to 400 Ω Scale 0 to 4000 Ω Scale type (Pt) type (Pt) Diagnostics 0.00385 0.003916 Resist. Count Resist. Count Temp. Count Temp. Count >420 Ω 4200 >4200 Ω >4200 >850 Over range (420 (4200...
  • Page 245: Preventive Maintenance

    6. MAINTENANCE Returned Parameters Size Description Task cycle time (execution) with 1 s res- dwCurScanTime DWORD olution. Task cycle minimum time with 1 s reso- dwMinScanTime DWORD lution. dwMaxScanTime DWORD Task cycle maximum time 1 s resolution. Task cycle average time with 1 s resolu- dwAvgScanTime DWORD tion.

Table of Contents