Page 1
User Manual Nexto Serie CPU NX3004 MU214616 Rev. B May 27, 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 6
CONTENTS 5.4.3.1.2. Configuration of the Relations – Symbolic Mapping Setting ..91 5.4.3.2. MODBUS Slave Protocol Configuration via Direct Representation (%Q) ..92 5.4.3.2.1. General Parameters of MODBUS Slave Protocol – Configuration via Di- rect Representation (%Q) .
Page 7
CONTENTS 5.4.8.7. Accessing Data Through an OPC UA Client ..... 136 5.4.9. EtherNet/IP ......... . . 138 5.4.9.1.
Page 8
CONTENTS 5.10.3. PID Function Block ........182 5.10.4.
Nexto Series uses an advanced technology in its bus, which is based on a high speed Ethernet interface, allowing input and output information and data to be shared between several controllers inside the same system. The system can be easily divided and distributed throughout the whole field, allowing the use of bus expansion with the same performance of a local module, turning possible the use of every module in the local frame or in the expansion frames with no restrictions.
Figure 2: Nexto Series – Overview 1.2. Innovative Features Nexto Series brings to the user many innovations regarding utilization, supervision and system maintenance. These features were developed focusing a new concept in industrial automation. Battery Free Operation: Nexto Series does not require any kind of battery for memory maintenance and real time clock operation.
ETD – Electronic Tag on Display: Another exclusive feature that Nexto Series brings to PLCs is the Electronic Tag on Display. This new functionality brings the process of checking the tag names of any I/O pin or module used in the system directly to the CPU’s graphic display.
Such procedure guaranties that the module static energy limits are not exceeded. It’s important to register each received equipment serial number, as well as software revisions, in case they exist. This information is necessary, in case the Altus Technical Support is contacted.
1. INTRODUCTION 1.5. 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:...
Description Diagnostics LED Watchdog LED Table 2: LEDs Description Nexto Series CPUs has two switches available to the user. The table below shows the description of these switches. For further information regarding the diagnostics switch, see sections One Touch Diag.
2. TECHNICAL DESCRIPTION Interfaces Description RJ45 communication connector 10/100Base-TX stan- dard. Allows the point to point or network communi- NET 1 cation. For further utilization information, see Ethernet Interfaces Configuration section. DB9 female connector for RS-232 communication stan- dard. Allows the point to point or network. For further COM 1 utilization information, see Serial Interfaces Configura-...
2. TECHNICAL DESCRIPTION NX3004 Maximum number of I/O modules on the bus Maximum number of additional Ethernet TCP/IP interface modules Ethernet TCP/IP interface redundancy sup- port Maximum number of PROFIBUS-DP network (using master modules PROFIBUS-DP) PROFIBUS-DP network redundancy support Redundancy support (half-clusters) Hot Swap support Event oriented data reporting (SOE) Protocol...
Page 17
2. TECHNICAL DESCRIPTION NX3004 Addressable input variables memory (%I) 32 Kbytes Addressable output variables memory (%Q) 32 Kbytes Direct representation variable memory (%M) 16 Kbytes Symbolic variable memory 2 Mbytes Maximum amount of memory configurable as 7.5 Kbytes retentive or persistent Full Redundant Data Memory Direct representation input variable mem- ory (%I)
2. TECHNICAL DESCRIPTION Command VAR RETAIN VAR PERSISTENT Reset warm / Power on/off cycle Reset cold Reset origin Remove CPU or Power Supply from the rack while energized Download Online change Reboot PLC Clean All Reset Process (IEC 60870-5-104) Table 7: Post-command Variable Behavior In the case of Clean All command, if the application has been modified so that persistent variables have been removed, inserted into the top of the list or otherwise have had its modified type, the value of these variables is lost (when prompted by the tool MasterTool to download).
2. TECHNICAL DESCRIPTION 2.2.5. Ethernet Interfaces 2.2.5.1. NET 1 NET 1 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 (Full Duplex) Data link layer LLC (Logical Link Control) Network layer IP (Internet Protocol)
2.3. Compatibility with Other Products To develop an application for Nexto Series CPUs, 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 version at that...
< 5000 Table 14: Instruction Times 2.4.3. Initialization Times Nexto Series CPUs have initialization times of 50 s, and the initial screen with the NEXTO logo (Splash) is presented after 20 s from the power switched on. 2.4.4. Interval Time...
AL-2306: Two shielded twisted pairs cable without connectors, used for networks based on RS-485 or CAN. AL-2319: Two RJ45 connectors for programming the CPUs of the Nexto Series and Ethernet point-to-point with another device with Ethernet interface communication.
Page 25
2. TECHNICAL DESCRIPTION AL-1763: Cable with one DB9 male connector and terminal block for communication between CPUs of the Nexto Series and products with RS-485/RS-422 standard terminal block. NX9202/NX9205/NX9210: Cables used for Ethernet communication and to interconnect the bus expansion modules.
3. INSTALLATION 3. Installation This chapter presents the necessary proceedings for the Nexto Series CPUs physical installation, as well as the care that should be taken with other installation within the panel where the CPU is been installed. CAUTION: If the equipment is used in a manner not specified by in this manual, the protection provided by the equipment may be impaired.
3.3.3. Network Cable Installation Nexto Series CPUs Ethernet ports, identified on the panel by NET, have standard pinout which are the same used in PCs. The connector type, cable type, physical level, among other details regarding the CPU and the Ethernet network device are...
3. INSTALLATION Figure 6: 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 18: RJ45 Female Connector Pinout - 10BASE-TE and 100BASE-TX The interface can be connected in a communication network through a hub or switch, or straight from the communication equipment.
3. INSTALLATION Figure 7: DB9 Female Connector Sign Description Not used Term+ Internal Termination, positive TXD+ Data Transmission, positive RXD+ Data Reception, positive Negative Reference for External Termination Positive Reference for External Termination Term- Internal Termination, negative TXD- Data Transmission, negative RXD- Data Reception, negative Table 19: COM 1 (NX3004/NX3005) and COM 2 (NX3010/NX3020/NX3030)
3. INSTALLATION Figure 8: RS-485 Connections without Termination Diagram Diagram Note: 1. The not connected terminals must be insulated so they do not make contact with each other. 3.4.2. RS-485 Communication with Internal Termination In order to connect in a RS-485 network using the internal termination, the cable AL-1763 identified terminals must be connected in the respective device terminals, as shown on table below.
3. INSTALLATION Diagram Note: 1. The not connected terminals must be insulated so they do not make contact with each other. 3.4.3. RS-485 Communication with External Termination In order to connect to a RS-485 network wih external termination, the AL-1763 cable identified terminals must be con- nected in the respective device terminals according to the table below.
3. INSTALLATION AL-1763 terminals CPU terminal signals Not connected Not connected Not connected Table 23: RS-422 Connections without Termination The figure diagram below indicates how the AL-1763 connection terminals should be connected in the device terminals. Figure 11: Connections without Termination Diagram Diagram Note: 1.
3. INSTALLATION Figure 12: RS-422 Connections with Termination Diagram Diagram Note: 1. The not connected terminals must be insulated so they do not make contact with each other. 3.4.6. RS-422 Communication with External Termination In order to connect in a RS-422 network using interface external termination, the cable AL-1763 identified terminals must be connected in the respective device terminals, as shown on table below.
3.5.1. Module Installation on the Main Backplane Rack Nexto Series has an exclusive method for connecting and disconnecting modules on the bus which does not require much effort from the operator and guarantee the connection integrity. For further information regarding Nexto Series products fixation, please see Nexto Series User Manual –...
4. INITIAL PROGRAMMING 4. Initial Programming The main goal of this chapter is to help the programming and configuration of Nexto Series CPUs, allowing the user to take the first steps before starting to program the device. Nexto Series CPU uses the standard IEC 61131-3 for language programming, which are: IL, ST, LD, SFC and FBD, and besides these, an extra language, CFC.
4. INITIAL PROGRAMMING The table above shows the organization and memory access, illustrating the significance of bytes and the disposition of other variable types, including overlapping. 4.2. Project Profiles A project profile in the MasterTool IEC XE consists in an application template together with a group of verification rules which guides the development of the application, reducing the programming complexity.
4. INITIAL PROGRAMMING 4.2.2. Basic In the Basic Project Profile, the application has one user task of the Continuous type called MainTask, which executes the program in a continuous loop (with no definition of cycle time) with priority fixed in 13 (thirteen). This task is responsible for the execution of a single programming unit POU called MainPrg.
The Custom project profile allows the developer to explore all the potential of the Runtime System implemented in the Nexto Series central processing units. No functionality is disabled; no priority, task and programs association or nomenclatures are imposed. The only exception is for MainTask, which must always exist with this name in this Profile.
4. INITIAL PROGRAMMING This profile may further include an interruption task, called TimeInterruptTask00, with a higher priority than the MainTask, and hence, can interrupt its execution at any time. Tasks Priority Type Interval Event MainTask MainPrg Cyclic 20 ms TimeInterruptTask00 TimeInterruptPrg00 Cyclic 4 ms...
4. INITIAL PROGRAMMING 4.2.8. Maximum Number of Tasks The maximum number of tasks that the user can create is only defined for the Custom profile, the only one which has this permission. The others already have their tasks created and configured. However, the tasks that will be created must use the following prefixes, according to the type of each of the tasks: CyclicTaskxx, TimeInterruptTaskxx, ExternInterruptTaskxx, where xx represents the number of the task that being created.
Page 42
4. INITIAL PROGRAMMING Figure 15: CPU Configuration Besides that, by double-clicking on CPU’s NET 1 icon, it’s possible to configure the Ethernet interface that will be used for communication between the controller and the software MasterTool IEC XE. Figure 16: Configuring the CPU Communication Port The configuration defined on this tab will be applied to the device only when sending the application to the device (down- load), which is described further on sections Finding the Device...
The insertion procedure and more information about available libraries must be found in the MasterTool Programming Manual – MP399609. 4.5. Inserting a Protocol Instance The Nexto Series CPUs, as described in the Protocols section, offers several communication protocols. Except for the...
4. INITIAL PROGRAMMING Figure 18: Selecting the Protocol 4.5.2. MODBUS Ethernet The first step to configure the MODBUS Ethernet, in client mode, is to include the instance in the desired NET (in this case, NET 1, as the CPU NX3010 has only one Ethernet interface). Click on the NET with the mouse right button and select Add Device..., as shown on figure below.
Page 45
4. INITIAL PROGRAMMING Figure 19: Adding the Instance After that, the available protocols for the user will appear on the screen. Define the protocol configuration mode selecting MODBUS Symbol Client, for symbolic mapping setting or MODBUS Client, for direct addressing (%Q) and click on Add Device, as depicted on figure below.
4. INITIAL PROGRAMMING Figure 20: Selecting the Protocol 4.6. Finding the Device To establish the communication between the CPU 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 47
4. INITIAL PROGRAMMING Figure 21: Finding the CPU If there is no gateway previously configured, it can be included by the button Add gateway, using the default IP address localhost to use the gateway resident on the station or changing the IP address to use the device internal gateway. Next, the desired controller must be selected by clicking on Set active path.
4. INITIAL PROGRAMMING Figure 23: Easy Connection This command performs a MAC level communication with the device, allowing to permanently change the configuration of the CPU’s Ethernet interface, independently of the IP configuration of the station and from the one previously configured on the device.
Page 49
4. INITIAL PROGRAMMING After the command execution, some user interface messages may appear, which are presented due to differences between an old project and the new project been sent, or simply because there was a variation in some variable. If the Ethernet configuration of the project is different from the device, the communication may be interrupted at the end of download process when the new configuration is applied on the device.
4. INITIAL PROGRAMMING If the new application contains changes on the configuration, the online change will not be possible. In this case, the MasterTool IEC XE requests whether the login must be executed as download (stopping the application) or if the operation must be cancelled.
4. INITIAL PROGRAMMING Figure 30: Starting the Application The figure below shows the application in execution. In case the POU tab is selected, the created variables are listed on a monitoring window, in which the values can be visualized and forced by the user. Figure 31: Program running If the CPU 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.
4. INITIAL PROGRAMMING Figure 32: Stopping the Application In case the CPU 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.
Figure 33: Finalizing the online communication with the CPU 4.12. Project Upload Nexto Series CPUs 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.
4. INITIAL PROGRAMMING Next, just select the desired CPU and click OK, as shown on figure below. Figure 35: Selecting the CPU To ensure that the project loaded in the CPU 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.
4. INITIAL PROGRAMMING 4.13.4. Exception When a CPU is in Exception it indicates that some improper operation occurred in one of the application active tasks. The task which caused the Exception will be suspended and the other tasks will pass for the Stop mode. It is only possible to take off the tasks from this state and set them in execution again after a new CPU start condition.
4. INITIAL PROGRAMMING ELSE UserPrg(); END_IF; MainPrg call other two POUs of program type, named StartPrg and UserPrg. While the UserPrg is always called, the StartPrg is only called once in the PLC application start. To the opposite of MainPrg program, that must not be modified, the user can change the StartPrg and UserPrg programs. Initially, when the project is created from the wizard, these two programs are created empty, but the user might insert code in them.
4. INITIAL PROGRAMMING Figure 36: System_Diagnostics GVL in Online Mode 4.14.5. 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.
4. INITIAL PROGRAMMING VAR_GLOBAL MODBUS_Device_DISABLE_0001 : BOOL; MODBUS_Device_DISABLE_0002 : BOOL; MODBUS_Device_DISABLE_0003 : BOOL; MODBUS_Device_1_DISABLE_0001 : BOOL; MODBUS_Device_1_DISABLE_0002 : BOOL; END_VAR The automatic generation through button Generate Disabling Variables only create variables, and don’t remove automati- cally. This way, in case any relation is removed, its respective disabling variable must be removed manually. The Disables GVL is editable, therefore the requisition disabling variables can be created manually without need of fol- lowing the model created by the automatic declaration and can be used both ways at same time, but must always be of BOOL type.
4. INITIAL PROGRAMMING 4.14.7. GVL Module_Diagnostics The Module_Diagnostics GVL contains the diagnostics variables of the I/O modules used in the project, except by the CPU and communication drivers. This GVL isn’t editable and the variables are automatically declared with type specified by the module, to which it belongs, when that is added to the project.
Page 60
4. INITIAL PROGRAMMING [Device Name]_REQDG_[Requisition Number]: [Variable Type]; Where: Device Name: Name that appear at the Tree View to the device. Mapping Number: Number of the mapping that was declared on the device mapping table, following the up to down sequence, starting with 0001.
4. INITIAL PROGRAMMING Figure 39: ReqDiagnostics GVL in Online Mode 4.14.9. Prepare_Start Function In this POU, the PrepareStart system event function is defined. It belongs to the communication task and is called before starting the application. When there is active communication with the PLC, it is possible to observe the event status and the call count in the System Events tab in the Task Configuration object.
5. CONFIGURATION 5. Configuration The Nexto Series CPUs are configured and programmed through the MasterTool IEC XE software. The configuration made defines the behavior and utilization modes for peripherals use and the CPUs special features. The programming represents the Application developed by the user.
Page 63
5. CONFIGURATION Settings Description Standard Options - Denabled, only for de- Enabled, clared modules match - Disabled (with match con- consistency. Hot Swap Mode Module hot swap mode sistency) (may vary - Disabled, no match consis- according to tency CPU model) - Enabled, with match con- sistency only for declared modules...
MainTask anymore. 5.1.1.1. Hot Swap Nexto Series CPUs have the possibility of I/O modules change in the bus with no need for system turn off and without information loss. This feature is known as hot swap.
5. CONFIGURATION Reset Origin is carried out, it will be necessary to perform the download so that the CPU can return to the normal state (Run). The Reset Warm, Reset Cold and Reset Origin commands can be done by MasterTool IEC XE in the Online menu. The CPU will remain in normal Run even if find a module not declared on the bus.
5. CONFIGURATION 5.1.1.1.7. How to do the Hot Swap CAUTION: Before performing the Hot Swap it is important to discharge any possible static energy accu- mulated in the body. To do that, touch (with bare hands) on any metallic grounded surface before handling the modules.
Page 67
5. CONFIGURATION Enabled, with Startup Enabled, Disabled, Disabled, Enabled, Consistency without for declared without Condition with Startup Disabled for Declared Startup modules Startup Consistency Modules Consistency only Consistency Only clared Blinks 2x Blinks 2x Blinks 2x Blinks 4x Blinks 2x Blinks 4x module Application:...
5. CONFIGURATION 5.1.1.2. Retain and Persistent Memory Areas The Nexto CPU allows the use of symbolic variables and output variables of direct representation as retentive or persistent variables. The output variables of direct representation which will be retentive or persistent must be declared in the CPU General Parameters, as described at Configuration.
In addition, it is important to stress that there’s a maximum quantity of attempts for the Nexto Series CPUs. This number is set in five attempts before the connection is set up and in three attempts after that.
Page 70
5. CONFIGURATION ACK sending delay: defines the maximum time waited by the interface for the TCP ACK transmitting. This ACK is responsible for the message receiving conformation, in case of MODBUS, by the destiny device. The set of this field decreases the amount of messages circling through the network.
5. CONFIGURATION 5.1.1.4. Project Parameters The CPU project parameters are related to the configuration for input/output refreshing at the task that they are used of the project tasks and consistency of the retentive and persistent area in %Q. Configuration Description Default Options Performs the consistency of...
Figure 45: ExternInterruptTask00 Configuration Screen 5.1.3. Time Synchronization For the time synchronization, Nexto Series CPUs use the SNTP (Simple Network Time Protocol) or the synchronism through IEC 60870-5-104.
Page 73
5. CONFIGURATION To use the time sync protocols, the user must set the following parameters at Synchronism tab, accessed through the CPU, in the device tree: Figure 46: SNTP Configuration Configuration Description Default Options Time zone of the user loca- Time Zone (hh:mm) tion.
5. CONFIGURATION 5.1.3.1. SNTP When enabled, the CPU will behave as a SNTP client, which is, it will send requests of time synchronization to a SNT- P/NTP server which can be in the local net or in the internet. SNTP client works with a resolution of 1 ms, but with an accuracy of 100 ms.
5. CONFIGURATION Configuration Description Default Options Serial channel configura- Serial Type RS-485 RS-422 and RS-485 tion. Serial communication port 200, 300, 600, 1200, 1800, Baud Rate 115200 speed configuration. 2400, 4800, 9600, 19200, 38400, 57600, 115200 bps Serial port parity configura- Parity None Even...
5. CONFIGURATION 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 cise when the EXTENDED 1, 4, 8 and 14 MODE is used and min- imizes the overrun errors.
* Default port, but user changeable. 5.4. Protocols Configuration Independently of the protocols used in each application, the Nexto Series CPUs has some maximum limits for each CPU model. There are basically two different types of communication protocols: symbolic and direct representation mappings. The...
Page 78
5. CONFIGURATION MODBUS MODBUS MODBUS Ethernet MODBUS Ethernet Limitations Master Slave Client Server Mappings per in- stance Devices per instance Mappings per de- vice Simultaneous quests per instance Simultaneous requests per device Table 47: MODBUS Protocol Limitations for Direct Representation Notes: Devices per instance: Master or Client Protocols: number of slaves or server devices supported by each Master or Slave protocol instance.
MODBUS client device. MODBUS RTU devices, Master or Slave do not support simultaneous requests. 5.4.1. Protocol Behavior x CPU State The table below shows in detail the behavior of each configurable protocol in Nexto Series CPUs in every state of operation. CPU operational state STOP...
5.4.2. 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 81
5. CONFIGURATION RTS in zero and put the RS-485 in high impedance state). To solve this problem, the master can wait the determined time in this field before sending the new request. Otherwise, the first bytes transmitted by the master could be lost. Minimum Interframe: The MODBUS standard defines this time as 3.5 characters, but this parameter is configurable in order to attend the devices which do not follow the standard.
Page 82
5. CONFIGURATION Direct Rep- Diagnostic Variable resentation 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)
5. CONFIGURATION Direct Rep- Diagnostic Variable resentation 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.
5. CONFIGURATION Configuration Description Default Options Slave Address MODBUS slave address 0 to 255 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...
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 86
5. CONFIGURATION Figure 50: 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 87
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 88
5. CONFIGURATION 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 89
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.
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.
5. CONFIGURATION Direct representation variables (%Q) for the protocol diagnostic: Default Configuration Description Options Value %Q Start Address of Diag- Initial address of the diag- 0 to 2147483628 nostics Area nostic variables Size Size of diagnostics area Disabled for editing Table 59: MODBUS RTU Master Configuration Notes: Initial Address of Diagnostics in %Q: this field is limited by the size of outputs variables (%Q) addressable memory of...
5. CONFIGURATION Default Configuration Description Options Value Sets the number of retries Maximum Number of Re- before reporting a communi- 0 to 9 tries cation error Initial address used to dis- Mapping Disabling 0 to 2147483644 able MODBUS relations Table 60: Device Configuration - MODBUS Master Notes: Instance Name: this field is the identifier of the device, which is checked according to IEC 61131-3, i.e.
Page 93
5. CONFIGURATION Figure 54: MODBUS Function In table below, the number of factory default settings and the values for the column Options, may vary according to the data type and MODBUS function (FC). Configuration Description Default Value Options Read Function MODBUS function type Read Write...
5.4.3. MODBUS RTU Slave This protocol is available for the Nexto Series on its serial channels. At selecting this option in MasterTool IEC XE, the CPU becomes a MODBUS communication slave, allowing the connection with MODBUS RTU master devices. This protocol is available only in execution mode (Run Mode).
5. CONFIGURATION 5.4.3.1.1. MODBUS Slave Protocol General Parameters – Configuration via Symbolic Mapping The general parameters, found on the MODBUS protocol initial screen (figure below), are defined as. Figure 55: MODBUS RTU Slave Configuration Screen Configuration Description Default Options Slave Address MODBUS slave address 1 to 255 Table 62: Slave Configurations...
Page 96
5. CONFIGURATION Configuration Description Default Possibilities Enable the MODBUS Sym- Keep the communication bol Slave to run while the Unchecked Checked or unchecked running on CPU stop CPU is in STOP or after a breakpoint Table 63: Modbus Slave Advanced Configurations Notes: Task Cycle: the user will have to be careful when changing this parameter as it interferes directly in the answer time, data volume for scan and mainly in the CPU resources balance between communications and other tasks.
Page 97
5. CONFIGURATION Direct Rep- Diagnostic Variable resentation T_DIAG_MODBUS Size Description Variable _RTU_SLAVE_1.* 0: there is no error. 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 98
5. CONFIGURATION Direct Rep- Diagnostic Variable resentation T_DIAG_MODBUS Size Description Variable _RTU_SLAVE_1.* tCommand. %QX(n+2).7 Reserved. bDiag_23_reserved %QB(n+3) BYTE Reserved. byDiag_3_reserved Communication Statistics: Counter of normal requests received by the slave and answered normally. In case of tStat. %QW(n+4) WORD a broadcast command, this counter is in- wRXRequests cremented, but it is not transmitted (0 to 65535).
5. CONFIGURATION 5.4.3.1.2. Configuration of the Relations – Symbolic Mapping Setting The MODBUS relations configuration, showed on figure below, follows the parameters described on table below: Figure 57: MODBUS Data Mappings Screen Configuration Description Default Options Name of a variable declared Value Variable Symbolic variable name in a program or GVL...
5. CONFIGURATION ATTENTION: Differently from other application tasks, when a depuration mark in the MainTask is reached, the task of a MODBUS RTU Slave 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.
5. CONFIGURATION Notes: %Q Start Address of Diagnostics Area: this field is limited by the size of output variables addressable memory (%Q) of each CPU, which can be found in section Memory. Slave Address: it is important to note that the Slave accepts requests broadcast, when the master sends a command with the address set to zero.
Page 102
5. CONFIGURATION Default Configuration Description Options Value Coil (1 bit) Data Type MODBUS data type Coil Holding Register (16 bits) Input Register (16 bits) Input Status (1 bit) Initial address of the MOD- Data Start Address 1 to 65536 BUS data Data Size Number of MODBUS data 1 to 65536...
5. CONFIGURATION 5.4.4. MODBUS Ethernet The multi-master communication allows the Nexto CPUs to read or write MODBUS variables in other controllers or HMIs compatible with the MODBUS TCP protocol or MODBUS RTU via TCP. The Nexto CPU can, at the same time, be client and server in the same communication network, or even have more instances associated to the Ethernet interface.
5.4.5. MODBUS Ethernet Client This protocol is available for all Nexto Series CPUs on its Ethernet channels. When selecting this option at MasterTool IEC XE, the CPU becomes a MODBUS communication client, allowing the access to other devices with the same protocol, when it’s in execution mode (Run Mode).
5. CONFIGURATION Configure the general parameters of MODBUS protocol client, with the Transmission Control Protocol (TCP) or RTU via TCP. Add and configure devices by setting IP address, port, address of the slave and time-out of communication (available on the Advanced Settings button of the device). Add and configure the MODBUS mappings, specifying the variable name, data type, data initial address, data size and variable that will receive the quality data.
Page 106
5. CONFIGURATION Direct Rep- Diagnostic Variable resentation T_DIAG_MODBUS Size Description Variable _ETH_CLIENT_1.* Indicates if there is failure in the module or tDiag. %QX(n).6 the module is not present. bModuleFailure Indicates that all devices configured in the tDiag. %QX(n).7 Client are in failure. bAllDevicesCommFailure %QB(n+1) byDiag_1_reserved...
5. CONFIGURATION 5.4.5.1.2. Device Configuration – Configuration via Symbolic Mapping The devices configuration, shown on figure below, follows the following parameters: Figure 63: 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...
5. CONFIGURATION Configuration Description Default Options Number of simultaneous re- Maximum Simultaneous quest the client can ask from 1 to 8 Request the server Communication Time-out Application level time-out in 3000 10 to 65535 (ms) Connection is Connection is closed after a Defines when the connec- closed after...
Page 109
5. CONFIGURATION Figure 64: MODBUS Data Type 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)
5. CONFIGURATION Data Type Size [bits] Description Coil - Write Writing digital output. Coil - Read Reading digital output. Holding Register - Write Writing analog output. Holding Register - Read Reading analog output. Analog output which can be read or written with AND Holding Register - Mask And mask.
Page 111
5. CONFIGURATION 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 – Write Single Register 15 –...
Page 112
5. CONFIGURATION Code Function Type Description 0x01 Read Coils (FC 01) 0x02 Read Input Status (FC 02) 0x03 Read Holding Registers (FC 03) 0x04 Read Input Registers (FC 04) Access to Variables 0x05 Write Single Coil (FC 05) 0x06 Write Single Holding Register (FC 06) 0x0F Write Multiple Coils (FC 15) 0x10...
Page 113
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...
5. CONFIGURATION different meanings. Disabling Variable: field for the variable used to disable MODBUS requests individually configured within requests. The request is disabled when the variable, corresponding to the request, is equal to 1, otherwise the request is enabled. Last Error Code: The codes for the possible situations that cause an error in the MODBUS communication can be consulted below: Code Enumerable...
5. CONFIGURATION Figure 66: MODBUS Client Setup Screen Protocol selection and direct representation variables (%Q) for diagnostics: Default Setting Description Options Value %Q Start Address of Diag- Initial address of the diag- 0 to 2147483628 nostics Area nostic variables Size Size of diagnostics Disabled for editing RTU via TCP...
5. CONFIGURATION Figure 67: Configuring MODBUS Client Factory Configuration Description Options default Identifier, according to IEC Name Name of the instance MODBUS_Device 61131-3 Destination IP IP address of the server 0. 0. 0.1 1.0.0.1 to 223.255.255.255 TCP Port TCP Port 2 to 65534 Initial address used to dis- Any address of the %Q area,...
Page 117
5. CONFIGURATION Figure 68: MODBUS Data Type Figure 69: MODBUS Function In table below, the number of factory default settings and the values for the column Options, may vary according to the data type and MODBUS function (FC). Configuration Description Default Value Options Read...
Page 118
5. CONFIGURATION Configuration Description Default Value Options Starting address of the read Read Data Start Address 1 to 65536 MODBUS data Number of read MODBUS Depends on the function Read Data Size data used Starting address of the read Read IEC Variable 0 to 2147483647 variables (%I) Starting address of MOD-...
5.4.6. MODBUS Ethernet Server This protocol is available for all Nexto Series CPUs on its Ethernet channels. When selecting this option at MasterTool IEC XE, the CPU becomes a MODBUS communication server, allowing the connection with MODBUS client devices. This protocol is only available when the CPU is in execution mode (Run Mode).
Page 120
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.
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 10 to 3600 Time-out (s) connection is closed by the...
5. CONFIGURATION Note: Counters: all counters of the MODBUS Ethernet Server Diagnostics return to zero when the limit value 65535 is exceeded. 5.4.6.1.3. Mapping Configuration – Configuration via Symbolic Mapping The MODBUS relations configuration, showed on figure below, follows the parameters described on table below: Figure 72: MODBUS Server Data Mappings Screen Default Configuration...
5. CONFIGURATION 5.4.6.2. MODBUS Server Ethernet Protocol Configuration via Direct Representation (%Q) To configure this protocol using Direct Representation (%Q), the user must perform the following steps: Configure the general parameters of MODBUS Server Protocol, such as: communication times, address and direct representation variables (%Q) to receive the diagnostics and control relation.
5. CONFIGURATION %Q Start Address of Diagnostics Area: this field is limited by the size of output variables addressable memory (%Q) at CPU, which can be found in section Memory. 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.
Page 126
5. CONFIGURATION Configuration Description Default Options Coil (1 bit) Data Type MODBUS data type Coil Holding Register (16 bits) Input Status (1 bit) Input Register (16 bits) MODBUS data initial ad- Data Start Address 1 to 65536 dress 1 to 65536 (Holding Regis- Data Size MODBUS data quantity ter and Input Register)
5.4.7. OPC DA Server It’s possible to communicate with the Nexto Series CPUs using the OPC DA (Open Platform Communications Data Access) technology. This open communication platform was developed to be the standard in industrial communications. Based on client/server architecture, it offers several advantages in project development and communication with automation systems.
Page 128
A gateway enables the communication between the OPC DA Server and Nexto Series PLCs. A gateway in the same sub- Gateway for PLC Communica- net of the PLC is always necessary, as described in chapter...
5. CONFIGURATION Role Description The OPC Client Device module is responsible for the requests to Device Module OPC Client the OPC DA Server using the OPC DA protocol. The collected data is stored on the SCADA Server database. The SCADA Server is responsible for connecting to the various SCADA Server Level communication devices and store the data collected by them on a database, so that it can be consulted by the SCADA Clients.
Page 130
5. CONFIGURATION Figure 77: Symbol Configuration Object The table below presents the descriptions of the Symbol Configuration object screen fields. Field Description Symbols Variable identifier that will be provided to the OPC DA Server. Indicates what the possible access right level are in the declared symbol.
Page 131
5. CONFIGURATION Figure 78: Selecting Variables on the Symbol Configuration After this procedure, the project must be loaded into a PLC so the variables will be available for communication with the OPC DA Server. If the object Symbol Configuration screen is open and any of the variables, POUs or GVLs selected is changed, its name will appear with the red color.
5. CONFIGURATION ATTENTION: The configurations of the symbols that will be provided to the OPC DA Server are stored inside the PLC project. By modifying these configurations it’s necessary to load the applica- tion on the PLC so that it’s possible to access those variables. ATTENTION: When a variable is removed from the project and loaded on the PLC unchecking it from the object Symbol Configuration, the variable can no longer be read with the OPC Client.
Page 133
5. CONFIGURATION Default Set- Device Configuration Description Possibilities ting PLC description inside the This field is a STRING and OPC DA Server configura- it accepts alphanumeric (let- tion file. This field can have ters and numbers) charac- any name, but for organiza- ters and the “_”...
5. CONFIGURATION When a new PLC needs to be configured on the OPC DA Server, simply press the New Device button and the configuration will be created. When the setup screen is accessed, a list of all PLCs already configured on the OPC DA Server will be displayed.
5. CONFIGURATION State Value Description Finished the process of reading the symbols (variables) STATE_SYMBOLS_LOADED from the PLC configured in the OPC DA Server. This is a transitory state during the connection. After the reading of the symbols (variables) the OPC DA STATE_RUNNING Server is running the periodic update of the values of the available symbols in each configured PLC.
The communication between the OPC DA Server and the PLC uses the same protocol used in the MasterTool IEC XE communication with the PLC. This protocol is only available for the Ethernet interfaces of the Nexto Series CPUs, it’s not possible to establish this kind of communication with the Ethernet expansion modules.
Page 137
5. CONFIGURATION Figure 80: Selecting the OPC DA Server in the Client 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.
5. CONFIGURATION ATTENTION: The simulation mode of MasterTool IEC XE software can be used for OPC communication tests. The information on how to configure it are presented in the Testing an OPC Communi- cation using the Simulator section of the MasterTool IEC XE User Manual – MU299609. 5.4.8.
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.
5. CONFIGURATION Figure 83: 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.
5. CONFIGURATION BOOL SINT USINT / BYTE UINT / WORD DINT UDINT / DWORD LINT ULINT / LWORD REAL LREAL STRING TIME LTIME You can also use structured types (STRUCTs or Function Blocks) created from previous simple types. Finally, it is also possible to create arrays of simple types or of structured types. 5.4.8.3.
5. CONFIGURATION 8. Reboot the controller. 9. On the OPC UA client, perform the necessary procedures to connect to the OPC UA server and generate a certificate with the Basic256Sha256 profile (see specific OPC UA client manual for details); 10. Back to MasterTool, click on the icon of the Security Screen to perform a refresh;...
5. CONFIGURATION 5.4.8.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.
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 145
5. CONFIGURATION Figure 85: 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 86: 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.
5. CONFIGURATION 5.4.9. 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 147
5. CONFIGURATION Figure 87: Adding an EtherNet/IP Interface Figure 88: Adding an EtherNet/IP Adapter or Scanner...
5. CONFIGURATION 5.4.9.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. The configuration options may differ depending on the device description file of the added Adapter.
5. CONFIGURATION Figure 90: EtherNet/IP General Tab 5.4.9.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 150
5. CONFIGURATION Default Configuration Description Options Value Request Packet Interval: ex- Multiple of MainTask inter- RPI (ms) change interval of the input 10 ms and output data. Size of the producer data from the Scanner to the O -> T Size (Bytes) Depends on adapter’s EDS 0 - 400 Adapter (Originator ->...
5. CONFIGURATION 5.4.9.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 93: EtherNet/IP Assemblies Output Assembly and Input Assembly: Configuration Description...
5. CONFIGURATION 5.4.9.2.4. EtherNet/IP I/O Mapping I/O Mapping tab shows, in the Variable column, the name of the automatically generated instance of the Adapter under IEC Objects. In this way, the instance can be accessed by the application. Here the project variables are mapped to adapter’s inputs and outputs.
5. CONFIGURATION Figure 95: EtherNet/IP Module’s Type 5.4.9.3.2. EtherNet/IP Module I/O Mapping It shows, in the Variable column, the name of the automatically generated instance of the module under IEC Objects. In this way, the instance can be accessed by the application. The Always update variables option must be kept as default in Enable 5.5.
5. CONFIGURATION smaller is the cycle time of the MODBUS Server task, higher is the impact of the number of connections in his answer rate. However, for cycle times smaller than 20 ms this impact is not linear and the table below must be viewed for information. The table below exemplifies the number of requisitions that a MODBUS Server inserted in a local Ethernet interface is capable to answer, according to the cycle time configured for the MODBUS task and the number of active connections: Answered requisitions...
5. CONFIGURATION Total quantity of vari- ables in the PLC’s Variable update time at OPC DA Client project 5% of CPU Busy 50% of CPU Busy 80% of CPU Busy 15000 3200 ms 6400 ms 20000 ms 20000 4000 ms 8100 ms 25000 ms Table 103: Communication Rate of an OPC DA Server...
5.7. 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).
5. CONFIGURATION Figure 96: Clock Reading and Writing Blocks ATTENTION: Function blocks of RTC Reading and Writing, previously available in 2.00 MasterTool IEC XE or older become obsolete from 2.00 or newer, the following blocks are no longer used: NextoGetDateAndTime, NextoGetDateAndTimeMs, NextoGetTimeZone, NextoSetDateAnd- Time, NextoSetDateAndTimeMs and NextoSetTimeZone.
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 115. Table 106: Input Parameters of GetDateAndTime Output Parameters Type Description Returns the function error state, see GETDATEANDTIME RTC_STATUS Table 117.
5. CONFIGURATION Output Parameters Type Description Returns the function error state, see GetTimeZone RTC_STATUS Table 117. Table 109: Output Parameters of GetTimeZone Utilization example in ST language: PROGRAM UserPrg GetTimeZone_Status : RTC_STATUS; TimeZone : TIMEZONESETTINGS; xEnable : BOOL; END_VAR -------------------------------------------------------------------------- IF xEnable = TRUE THEN GetTimeZone_Status := GetTimeZone(TimeZone);...
5. CONFIGURATION DayOfWeek := GetDayOfWeek(); 5.7.1.2. Function Blocks and Functions of RTC Writing and Configuration The clock settings are made through function and function blocks as follows: 5.7.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.
RTC_STATUS. 5.7.2. RTC Data Structures The reading and setting function blocks of the Nexto Series CPUs RTC use the following data structures in its configuration: 5.7.2.1. EXTENDED_DATE_AND_TIME This structure is used to store the RTC date when used the function blocks for date reading/setting within milliseconds of accuracy.
5. CONFIGURATION 5.7.2.2. DAYS_OF_WEEK This structure is used to store the day of week: Enumerable Value Description INVALID_DAY SUNDAY MONDAY DAYS_OF_WEEK TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY Table 116: DAYS_OF_WEEK Structure 5.7.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...
5.8. User Files Memory Nexto Series CPUs have a memory area destined to the general data storage, in other words, the user can store several project files of any format in the CPU memory. This memory area varies according to the CPU model used (check Memory section).
Page 165
5. CONFIGURATION Figure 103: Files Transference ATTENTION: The files contained in the folder of a project created by MasterTool IEC XE have special names reserved by the system in this way cannot be transferred through the Files tab. If the user wishes to transfer a project to the user memory, you must compact the folder and then download the compressed file (*.zip for example).
5. CONFIGURATION 5.9. CPU’s Informative and Configuration Menu The access to the Informative Menu, the Nexto CPU Configuration and the detailed diagnostics, are available through levels and to access the menu information, change level and modify any configuration, a long touch is required on the diagnostic button and to navigate through the items on the same level, a short touch on the diagnostic button is required.
Page 167
5. CONFIGURATION The figure below describes an example of how to operate the Nexto CPUs menu through the contrast adjust menu procedure from the Statusscreen. Besides to make the configuration easy, it is possible to identify all screen levels and the touch type to navigate through them, and to modify other parameters as Language and the Memory Card, using the same access logic.
5. CONFIGURATION 5.10. Function Blocks and Functions 5.10.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). Therefore, the user can create his own protocols and handle the serial ports as he wishes, following the IEC 61131-3 languages available in the MasterTool IEC XE software.
Page 169
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 170
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 171
5. CONFIGURATION Data type Options Description List of critic error codes that can be returned by the serial func- tion block. Each block returns specific errors, which will be de- scribed below: NO_ERROR No errors. Return the parameters with invalid values or out of range: - SERIAL_PORT - SERIAL_MODE...
5. CONFIGURATION Data type Options Description The interruption by the DCD signal DCD_INTERRUPT_ can’t be enabled in case the serial NOT_ALLOWED port doesn’t have the respective pin. 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...
Page 173
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.
5. CONFIGURATION END_VAR //INPUTS: Config.REQUEST := TRUE; Config.PORT := Port; Config.PARAMETERS := Parameters; //FUNCTION: Config(); //OUTPUTS: Config.DONE; Config.EXEC; Config.ERROR; Status := Config.STATUS; //If it is necessary to treat the error. 5.10.1.2. SERIAL_GET_CFG The function block is used to capture the desired serial port configuration. Figure 107: Block to Capture the Serial Configuration Input parameters Type...
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 STATUS SERIAL_STATUS possible states, already described in the SERIAL_STATUS data type, are: - NO_ERROR - ILLEGAL_SERIAL_PORT - PORT_BUSY - HW_ERROR_UART...
Page 176
5. CONFIGURATION Figure 108: Block Used to Visualize the Control Signals 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. Table 125: SERIAL_GET_CTRL Input Parameters Output parameters Type...
5. CONFIGURATION Get_Control: SERIAL_GET_CTRL; Port: SERIAL_PORT := COM1; Status: SERIAL_STATUS; END_VAR //INPUTS: Get_Control.REQUEST := TRUE; Get_Control.PORT := Port; //FUNCTION: Get_Control(); //OUTPUTS: Get_Control.DONE; Get_Control.EXEC; Get_Control.ERROR; Status := Get_Control.STATUS; //If it is necessary to treat the error. Get_Control.CTS_VALUE; Get_Control.DSR_VALUE; Get_Control.DCD_VALUE; 5.10.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.
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 179
5. CONFIGURATION Figure 110: Block Used to Clean the RX Queue 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. Table 129: SERIAL_PURGE_RX_QUEUE Input Parameters Output parameters Type...
Page 180
5. CONFIGURATION Purge_Queue.PORT := Port; //FUNCTION: Purge_Queue(); //OUTPUTS: Purge_Queue.DONE; Purge_Queue.EXEC; Purge_Queue.ERROR; Status := Purge_Queue.STATUS; //If it is necessary to treat the error. 5.10.1.6. SERIAL_RX This function block is used to receive a serial port buffer, using the RX queue normal mode. In this mode, each character in the RX queue occupy a single byte which has the received data, storing 5, 6, 7 or 8 bits, according to the serial interface configuration.
Page 181
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.
5. CONFIGURATION //FUNCTION: Receive(); //OUTPUTS: Receive.DONE; Receive.EXEC; Receive.ERROR; Status := Receive.STATUS; //If it is necessary to treat the error. Receive.RX_RECEIVED; Receive.RX_REMAINING; 5.10.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 Interfaces Configuration section.
Page 183
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.
5. CONFIGURATION Buffer_Pointer: ARRAY [0..1023] OF SERIAL_RX_CHAR_EXTENDED; Status: SERIAL_STATUS; END_VAR //INPUTS: Receive_Ex.REQUEST := TRUE; Receive_Ex.PORT := Port; Receive_Ex.RX_BUFFER_POINTER := ADR(Buffer_Pointer); Receive_Ex.RX_BUFFER_LENGTH := 1024; //Max size. Receive_Ex.RX_TIMEOUT := 10000; //FUNCTION: Receive_Ex(); //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;...
Page 185
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...
5. CONFIGURATION //INPUTS: Set_Control.REQUEST := TRUE; 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.10.1.9.
Page 187
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 137: SERIAL_TX Input Parameters Output parameters Type Description This variable is true when the block is com-...
5. CONFIGURATION Figure 115: Block for Input Updating Input parameters Type Description byRackNumber BYTE Rack number. Position number where the module is con- bySlotNumber BYTE nected. Table 139: REFRESH_INPUT Input Parameters Possible TYPE_RESULT: OK_SUCCESS: Execution success. ERROR_FAILED: This error is returned if the function is called for a module that has only outputs, or also if the option Always update variables (located in the module’s configuration screen, tab I/O Mapping ) is not checked.
5. CONFIGURATION ATTENTION: REFRESH_OUTPUT function does not support inputs that have been mapped to symbolic variables. For proper operation it is necessary that the input is mapped to a variable within the memory direct representation of input variables (%Q). ATTENTION: The REFRESH_OUTPUT function updates only the direct variables %Q that are declared in the "Bus: I/O Mapping"...
5. CONFIGURATION 5.10.3. PID Function Block ATTENTION: The PID function block described up to previous revision L of this manual became obsolete and was removed from this manual. The PID, PID_INT and PID_REAL function blocks described up to revision C of MP399609, also became obsolete and were also removed from newer versions of that manual.
5. CONFIGURATION Output parameters Type Description This variable executes a falling edge as the BOOL PT variable (time delay) reaches its maxi- mum value. TIME This variable shows the current time delay. Table 142: TOF_RET Output Parameters Figure 118: TOF_RET Block Graphic Behavior Utilization example in ST language: PROGRAM UserPrg VAR RETAIN...
5. CONFIGURATION Figure 119: TON_RET Function Block Input parameters Type Description This variable, when receives a rising edge, BOOL enables the function block counting. This variable specifies the block counting TIME limit (time delay). Table 143: TON_RET Input Parameters Output parameters Type Description This variable executes a rising edge as the...
Page 194
5. CONFIGURATION // Actions executed at the end of the counting IF (TON_RET.Q = TRUE) THEN bStart := FALSE; END_IF 5.10.4.3. TP_RET The TP_RET function block works as a trigger. The timer which starts when the IN input has its state changed from (FALSE) to (TRUE), that is, a rising edge, it is increased until the PT time limit is reached.
5.11.2. SNMP in Nexto CPUs The CPUs of the Nexto Series behave as agents in SNMP communication. The information made available through SNMP cannot be manipulated or accessed through the user application, requiring an external SNMP manager to perform access. The table below contains the objects available in the Nexto CPUs.
By default, the SNMP agent is activated, i.e., the service is initialized at the time the CPU is started. The access to the agent information is via the Ethernet interfaces NET 1 and NET 2 of the Nexto Series CPUs on TCP port 161. So when the service is active, the agent information can be accessed through any one of the two Ethernet interfaces, if available.
Page 197
5. CONFIGURATION 5.11.4. 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. Figure 124: SNMP Login screen After successful login, the current state of the service (enabled or disabled) as well as the user information SNMPv3 and communities for SNMPv1 / v2c can be viewed.
The user and password to login on the web page of SNMP settings and to access the agent via SNMP protocol are the same. 5.11.5. User and SNMP Communities To access the SNMPv1 / v2c of the Nexto Series CPUs, there are two communities, according to table below. Communities Default String...
5. CONFIGURATION 5.12. User Management and Access Rights It provides functions to define users accounts and to configure the access rights to the project and to the CPU. Using the software MasterTool IEC XE, it’s possible to create and manage users and groups, setting, different access right levels to the project.
Diagnostics via Function Blocks The first one is an innovating feature of Nexto Series, which allows a fast access to the application abnormal conditions. The second is purely visual, generated through two LEDs placed on the panel (DG and WD) and also through the LEDs placed in the RJ45 connector (exclusive for Ethernet connection).
Page 201
6. MAINTENANCE the IEC 61131-3 standard), in other words, the name attributed to the CPU, and after that all diagnostics are shown, through CPU display messages. This process is executed twice on the display. Everything occurs automatically as the user only has to execute the first short touch and the CPU is responsible to show the diagnostics.
To remove this diagnostic from the CPU, a hot swap must be done in the module where the diagnostic is active. For further details on the procedure for viewing the diagnostics of the CPU or other bus modules, see description in the User Manual Nexto Series – MU214600. 6.1.2. Diagnostics via LED This product have a LED for diagnostic indication (LED DG) and a LED for watchdog event indication (LED WD).
Table 154: Ethernet LEDs Meaning 6.1.3. Diagnostics via WEB Besides the previously presented features, the Nexto Series brings to the user an innovating access tool to the system diagnostics and operation states, through a WEB page. The utilization, besides being dynamic, is very intuitive and facilitates the user operations. The use of a supervisory system can be replaced when it is restricted to system status verification.
Page 204
6. MAINTENANCE Figure 128: Initial Screen There is also the “System Overview” tab, which can be visualized through the Rack or the present module list (option on the screen right side). While there is no application on the CPU, this page will display a configuration with the largest available rack and a standard power supply, connected with the CPU.
SNMP. Firmware Update tab is restricted to the user, that is, only for internal use of Altus. In cases where the update is performed remotely (via a radio or satellite connection for example), the minimum speed of the link must be 128 Kbps.
6.1.5. Diagnostics via Variables The Nexto Series CPUs have many variables for diagnostic indication. There are data structures with the diagnostics of all modules declared on the bus, mapped on the variables of direct representation %Q, and defined symbolically through the AT directive, in the GVL System_Diagnostics created automatically by the MasterTool IEC XE.
Page 207
6. MAINTENANCE Diagnostics Mes- Variable Direct Variable Description sage DG_Module.tSummarized.* Variable There is no active diagnostic. NO DIAG TRUE – There is a configuration problem CONFIG. bConfigMismatch in the bus, as the module inserted in the MISMATCH wrong position. FALSE – The bus is configured correctly. TRUE –...
Page 208
6. MAINTENANCE Diagnostics Mes- Variable Direct Variable Description sage DG_Module.tSummarized.* Variable INVALID bInvalidDateTime TRUE – The date or hour are invalid. DATE/TIME FALSE – The date and hour are correct. TRUE – The RTS (Runtime System) has RUNTIME RESET bRTSReset been restarted at least once.
Software Exception: In case the software exception diagnostic is true, the user must verify his application to guarantee it is not accessing the memory wrongly. If the problem remains, the Altus Technical Support sector must be consulted. The software exception codes are described next in the CPU detailed diagnostics table.
Page 210
6. MAINTENANCE Variable Direct representation Size Description DG_Module.tDetailed.* Exception code generated by the RTS. See Ta- Exception. %QW(n+21) WORD ble 160. wExceptionCode Level, in percentage (%), of charge in the pro- Exception. %QB(n+23) BYTE cessor. byProcessorLoad Table 159: Exception Detailed Diagnostics Group Description Note: Exception Code: the code of the exception generated by the RTS (Runtime System) can be consulted below: Code...
Page 211
6. MAINTENANCE Vari- Direct representation Size Description able_Modulo.tDetailed.* CPU Startup Status: RetainInfo. 01: Hot start %QB(n+25) BYTE byCPUInitStatus 02: Warm Start 03: Cold Start Note: These variables are reset in every powerup. Cold Startup Counter: It will be incremented only due to the CPU hot removal in the bus and RetainInfo.
Page 212
6. MAINTENANCE Variable Direct representation Size Description DG_Module.tDetailed.* Protocol selected in the COM 1: Serial.COM1. %QB(n+42) BYTE 00: Without protocol byProtocol 01: MODBUS RTU Master 02: MODBUS RTU Slave 03: Other protocol Counter of characters received from COM 1 (0 Serial.COM1.
Page 213
6. MAINTENANCE Variable Direct representation Size Description DG_Modulo.tDetailed.* BYTE Ethernet.NET1. %QB(n+173) NET 1 MAC Address. ARRAY(6) abyMAC Counter of sent packages through NET 1 port Ethernet.NET1. %QD(n+179) DWORD (0 to 4294967295). dwPacketsSent Counter of received packages through NET 1 Ethernet.NET1. %QD(n+183) DWORD port (0 to 4294967295).
Page 214
6. MAINTENANCE Variable Direct representation Size Description DG_Module.tDetailed.* Status of presence of declared I/O modules in DWORD WHSB. %QD(n+375) buses, individually. For more information about ARRAY adwModulePresenceStatus this diagnostic, see the notes below. (32) Counter of failures in the WHSB bus. This WHSB.
Page 215
6. MAINTENANCE Code Enumerable Description Application in Stop Mode due to an exception in the APPL_STOP_DUE_TO_EXCEPTION CPU. Application in Stop Mode due to Duplicated Slots diag- DUPLICATED_SLOT_HOT_SWAP_ nostic being set when the Hot Swap Mode is "Disabled" DISABLED or "Disabled, for declared modules only". Application in Stop Mode due to Duplicated Slots diag- nostic being set when the Hot Swap Mode is "Enabled, DUPLICATED_SLOT_HOT_SWAP_...
6. MAINTENANCE Variable Direct representation Size Description DG_Modulo.tDetailed.* SNTP. %QX(n+532).0 SNTP Service enabled. bServiceEnabled Indicates which server is active: SNTP. %QB(n+533) BYTE 00: None active server. byActiveTimeServer 01: Active Primary Server. 02: Active Secondary Server. Counter of times in which the primary server is SNTP.
Page 217
6. MAINTENANCE Input parameter Type Description psAppName POINTER TO STRING Application name. psTaskName POINTER TO STRING Task name. POINTER TO stTask- Pointer to receive the application informa- pstTaskInfo Info tion. Table 174: GetTaskInfo Input Parameters The data returned by the function, through the pointer informed in the input parameters are described on table below. Returned Parameters Size Description...
6. MAINTENANCE 6.2. Graphic Display The graphic display available in this product has an important tool for the process control, as through it is possible to recognize possible error conditions, active components or diagnostics presence. Besides, all diagnostics including the I/O modules are presented to the user through the graphic display.
MSG. ERROR requested module(s). Indicates the product presented an unexpected problem. Get in SIGNATURE MISSING contact with Altus Technical Support sector. Indicates that occurred an error in the application and the Run- APP. ERROR RESTARTING time is restarting the application.
Is the Ethernet network cable properly connected to the Nexto CPU NET 1 or NET 2 port and to the network device? Is the Nexto Series CPU on, in execution mode (Run) and with no diagnostics related to hardware? If the Nexto CPU indicates the execution mode (Run) but it does not respond to the requested communications, whether...
In many cases, the failure may not be visual. In critical applications, is recommendable the periodic replacement of the TVS diodes, even if they do not show visual signals of failure. Bus tightness and cleanness every six months. For further information, see Nexto Series Manual - MU214600.
Need help?
Do you have a question about the Nexto Series and is the answer not in the manual?
Questions and answers