Article translated with the assistance of AI tools. Images and parts of the content will still be reviewed.
This tutorial provides guidelines and procedures to enable the user to use the Nexto Xpress I/O expansion modules through 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. Adding the expansion modules in MasterTool
2.2. Configuring CAN network and expansion module parameters
2.3. Electrical connection and manual DIP switch communication configuration
2.4. Adding Function Blocks
2.5. Operation of Function Blocks
2.6. Function Block Operating Modes
2.7. Analog input and output values
1. ARCHITECTURE
In the architecture of 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 were connected to the L terminal of the Xpress. The controller's Ethernet port was also connected to the computer's Ethernet port via a network cable.
2. DEVELOPMENT
This tutorial will show the steps to use the Nexto Xpress I/O expansions through the CANopen protocol. All steps for protocol insertion and use of expansions are illustrated, but it is important to have the Nexto Xpress Series Manual and the technical specifications document of the expansions on hand for reference during the application stages. These documents will guide you on installation and physical connection of the modules, programming, and configurations in MasterTool.
2.1. Adding expansion modules in MasterTool
The .eds files for the expansion modules are available in the download center on the Altus website, under the category "software", with the series "Nexto Xpress" and function "I/O Modules".
After installing the .eds files on your computer, to add them to MasterTool, go to "Tools" and then to "Device Repository".
A new window will open. Click "Install", select the corresponding expansion module files you are using, click "Open", and then close this window.
If needed, you can add the respective Function Blocks for each module. Just go to "Tools" and then to "Library Repository".
A new window will open. Click "Install", select the corresponding expansion module files you are using, click "Open", and then close this window.
Now, right-click on "CAN" at the project root, then click "Add Device".
Initially, follow the path "Fieldbusses" --> "CANopen" --> "CANopenManager" to add the Manager, which will serve as the PLC function.
After this, right-click on the "Manager" and add the expansions one by one.
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.
IMPORTANT: For the CANopen_Manager and slave producer times (Heartbeat), use the same time defined for the Maintask cycle.
The DIP switches on the expansion modules must be manually configured according to the node ID set on each module and the CAN communication baud rate.
2.3. Electrical connection and manual DIP switch communication configuration
The expansions are powered by 24Vdc at the V+ and V- terminals, and the CAN network adapter connection to the PLC is made by connecting the H terminals together and the L terminals together.
Important: Both the electrical connection and the DIP switch configuration table can be found in the technical specifications document of 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
Regarding 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 of the CANopen_Manager communication.
Adapter
Internal termination on the expansion modules is activated via DIP switch 11.
2.3.2. Additional configuration for the XP610 module
To use the outputs of the XP610, some additional configurations are necessary. Click on the module tab. Under "General", enable the option "Enable Advanced Config." Then also enable "Optional Device".
Next, under SDOs, enable the option "Create all SDOs".
2.4. Adding Function Blocks
To use the Function Blocks, it is necessary to add the libraries you installed in step “2.1. Adding expansion modules in MasterTool”. To do this, at the project root open the “Library Manager”, go to “Add Library” and in the “(Miscellaneous)” tab select the desired Function Blocks and click “OK”.
Now open the POU “UserPOUs” at the project root and open the POU “UserPrg(PRG)”. With it open, select and drag with the left mouse button the option “Box with EN/ENO” to the network (logic line) where you want to insert it.
To use the desired block, you need to fill the internal box field with the block name; in this case, where it says “???” you must fill in “XP600_FB”, which is the block name added in the previous step, corresponding to the analog input expansion module.
After adding the block name, it is necessary to create a variable to map it, and for this, just press the “Enter” key 3 times after typing the name in the box; this will automatically add a standard variable.
Now repeat the same procedure to insert the Function Block for analog outputs, but using the name “XP610_mA_FB”.
Note: The contact that comes with the block will not be used, so it can be deleted.
2.5. Operation of Function Blocks
These function blocks are used to convert Engineering Scale values (0 to 10000) to values in the ranges of 0 to 10V, 0 to 20mA, and 4 to 20mA, both for reading and writing values. Analog inputs read values in the ranges of 0 to 10V, 0 to 20mA, and 4 to 20mA and convert them to the Engineering Scale, while analog outputs read the Engineering Scale and convert it to the ranges of 0 to 10V, 0 to 20mA, and 4 to 20mA.
In the example, we use the variables “AnalogValue” on the input of XP600_FB so that the inputs read the values generated by the outputs, “ReadValue” which is the value converted by the XP600 function block, and “EngineeringValue” which is the value written in the software and converted by the XP610 function block.
2.6. Function Block Operating Modes
To configure the function block operating mode, that is, the scale to be converted, go to the “Library Manager” and check the documentation for each block.
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, as the software provides 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”. However, the value shown in the image below is 2000 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.