This tutorial provides guidelines and procedures to enable users to use the Nexto Xpress I/O expansion modules via the CANopen communication protocol, a feature widely used in automation applications.
Components
Software: Mastertool IEC XE 3.50
PLC: XP325
Expansion Modules: XP600 and XP610
Tutorial Sections
1. ARCHITECTURE
2. DEVELOPMENT
2.1. Inserting the expansion modules in MasterTool
2.2. Configuring the CAN network and expansion module parameters
2.3. Electrical connection and manual configuration of communication DIP switches
2.4. Inserting the Function Blocks
2.5. Function Block Operation
2.6. Function Block Operation Modes
2.7. Analog input and output values
1. ARCHITECTURE
In the architecture for this tutorial, the H terminals of both expansions were connected to the H terminal of the CAN port on the XP340, and the L terminals of the expansions to the L terminal of the Xpress. The controller's ethernet port was also connected to the computer's ethernet port using a network cable.
2. DEVELOPMENT
This tutorial will show the steps to use the Nexto Xpress I/O expansions via the CANopen protocol. All steps for inserting the protocol and using the expansions are illustrated, but it is important to have the Nexto Xpress Series Manual and the technical specifications document for the expansions on hand, allowing consultation during the application steps. This document will guide you on installation and physical connection of the modules, programming, and configurations in MasterTool.
2.1. Inserting expansion modules in MasterTool
The .eds files for the expansion modules are available in the download center on the Altus website, under the "softwares" category, with the series "Nexto Xpress" and function "I/O Modules".
After installing the .eds files on your computer, to add them to MasterTool just go to "Tools" and then "Device Repository".
A new window will open. Click on "Install", select the corresponding expansion module files you are using, click "Open" and then close this window.
If necessary, you can add the respective Function Blocks for each module. Just go to "Tools" and then "Library Repository".
A new window will open. Click on "Install", select the corresponding expansion module files you are using, click "Open" and then close this window.
Now, right-click on "CAN" at the root of the project, and then on "Add Device".
Initially, following the path "Fieldbusses" --> "CANopen" --> "CANopenManeger", add the Manager, which will be the function of the PLC.
After this, right-click on "Manager" and add the expansions, one at a time.
2.2. Configuring CAN network parameters
CAN protocol parameters can be configured by double-clicking on “CAN”.
The same applies to the Manager and the expansions, where a tab will open allowing parameter configuration.
The DIP switch on the expansion modules must be configured manually, according to the node ID set on each module and the CAN communication baud rate.
2.3. Electrical connection and manual configuration of communication DIP switches.
The expansions are powered at 24Vdc, on the V+, V- terminals, and the connection of the CAN network adapter to the PLC is done by connecting the H terminals to H and L to L.
Important: Both the electrical connection and the DIP switch configuration table can be found in the technical specifications document for the expansions. Located in the Support and Downloads area of the Altus website.
https://www.altus.com.br/suporte/download/baixararquivo/AwQKVA==/2
2.3.1. Internal termination configuration
As for the internal termination switch, it should only be activated at the ends of the CAN network, that is, on the CanOpen_Manager and on the last adapter in the CanOpen_Manager communication.
Adapter
The internal termination on the expansion modules is activated by DIP switch 11.
2.3.2. Additional configuration for the XP610 module
To use the outputs of the XP610, some additional settings are required. Click on the module tab. In "General", enable the option "Enable Advanced Config." and then also enable "Optional Device".
Then, in SDOs enable the option "Create all SDOs".
2.4. Inserting the Function Blocks
To use the Function Blocks, you need to add the libraries you installed in the “2.1. Inserting expansion modules in MasterTool” step. To do this, at the root of the project open the “Library Manager”, go to “Add Library” and in the “(Miscellaneous)” tab select the desired Function Blocks and click “OK”.
Now, in the project root, open “UserPOUs”, the POU “UserPrg(PRG)”. With it open, select and drag with the left mouse button the “Box with EN/ENO” option to the network (logic line) where you want to insert it.
To use the desired block, you need to fill in the internal field of the box with the name of the block. In this case, where it says “???”, you need to fill in “XP600_FB”, which is the name of the block added in the previous step, corresponding to the analog input expansion module.
When you add the block name, you need to create a variable to map it, and to do this just press the “Enter” key 3 times after writing the name in the box, and an automatic default variable will be added.
Now repeat the same procedure to insert the Function Block for the analog outputs, but use the name “XP610_mA_FB”.
Note: The contact that comes with the block will not be used, so it can be deleted.
2.5. Function Block Operation
These function blocks are used to convert values from the Engineering Scale (0 to 10000) to values in the 0 to 10V, 0 to 20mA, and 4 to 20mA scales, both when reading and writing values. While the analog inputs read values in the 0 to 10V, 0 to 20mA, and 4 to 20mA scales and convert them to the Engineering Scale, the analog outputs read the Engineering Scale and convert it to the 0 to 10V, 0 to 20mA, and 4 to 20mA scales.
In the example, we use the variables “Valor_Analogico” in the “input” of XP600_FB so that the inputs read the values that will be generated by the outputs, “Valor_Lido” which is the value converted by the XP600 function block, and “Valor_de_Engenharia” which is the value to be written in the software and converted by the XP610 function block.
2.6. Function Block Operation Modes
To configure the operation mode of the function block, that is, the scale to be converted, you need to go to the “Library Manager” and check the documentation for each one.
In XP600_FB we will use “Mode 3”, responsible for the 4 to 20mA scale.
In XP610_mA_FB, we will use “Mode 1”, responsible for the 4 to 20mA scale. In this case, there is no 0 to 10V scale because no major conversion is needed, since the software supplies the engineering value from 0 to 10000.
2.7. Analog input and output values
With the 4 to 20mA scale chosen, the conversion will be “0 = 4mA” and “10000 = 20mA”, but the value shown in the image below is 2000 (two thousand), because in a real scale “10000 / 20 = 500”, and since "4 x 500 = 2000", then “0 = 4mA = 2000” (“Engineering Scale, Analog Scale, Real Scale” respectively).
Comments
0 comments
Please sign in to leave a comment.