schutzvermerk nach din 34 beachten canopen 3-apr-15, page 1 communication xc100-mi4

20
CANopen Jun 27, 2022, page 1 Schutzvermerk nach DIN 34 beachten Communication XC100-MI4

Upload: lisa-webster

Post on 19-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

CANopenCommunication XC100-MI4
Schedule Communication between XC100 and MI4
254 Byte
254 Byte
In the folowing the schedule for establishing the communication between the XC100 and the MI4 will be explained. For further information like e.g. pin assignment of the CAN-connector we recommend the application note:
AN2700I06G: MI4 Operator panel coupling XC100 via CANopen.
Extensive information about all feature of handling the MI4 configurator are contained in the documentation:
AWB-C 27-1294 GB: MI4-CFG-1-GB Configuration Software
Both items can be downloaded from the the service pages of the Moeller homepage (www.Moeller.net).
Schutzvermerk nach DIN 34 beachten
The Communication function block XC100-MI4
2465.bin
usi:NodeID
usi_ADRNewDataReady
ui_ADRIndex
usi_ADRSubindex
x_WriteINT32
usi_WriteOffset
usi_WriteNr
T_TimeOutTransSDO
2
%IB3
%IW4
%B6
TRUE
1
254
Schedule Communication between XC100 and MI4
1
Panel Setup
Start the MI4 configurator and select the correct MI4-device in the menu
Project-> Panel Setup.
Schedule Communication between XC100 and MI4
Select communication driver
Under Project -> Configure controller the driver CANopen FW Drv Ver. 4.03 – DLL Ver. 5.04 has to be activated.
2
Should only an older version of the driver (with lower version number) be available, the file Uplc107.dll has to be copied into the root directory of the MI4-configurat.
After that please return to the menu Project-> Configure controller and hit the button „refresh“ in order to be able to use the newly installed driver.
Schedule for coupling
Schedule Communication between XC100 and MI4
Controller setup
Hitting the button Controller Setup enables you to assigne the network address within the CANopen trunk for the MI4 device. Do not configure the buad rate for the network higher than 125kBaud ein, because that is the maximum the XC100 supports. For the Panel NodeID, i.e. the CANopen-bus address of the MI4, please assign the value 2.
3
Schedule Communication between XC100 and MI4
4
Data field
Now you can place e.g. numeric fields on the pages of the MI4 project, to be defined in the menu Insert -> Data fields -> Numeric / ASCII .
For the data exchenge between MI4 and Controller two data arrays with 254 double words each are available. The data arrays (Data Type) are called INT32_DB (addresses INT32-1 through INT32-254) and FLOAT_DB (addresses FLOAT-1 through FLOAT-254). As data format (Data Format) both arrays can be assigned the formats BIT, BYTE, WORD, WORD INV, DOUBLE WORD, FLOAT and FLOAT INV. Please take care of defining the numeric field large enough to hold the information (Field Dimensions -> Field Width), so that the number can be displayed completely. As data access please define (Read/Write), so that you can use the numeric field not only for the displaying of data but also for entering data.
Schedule for coupling
Schedule Communication between XC100 and MI4
5
Your MI4 configurator now should look like the picture below. Save your project with File -> Save
6
Press the green Enter - key of the MI4 for at least 3 seconds.
Schedule for coupling
Schedule Communication between XC100 and MI4
7
With the help of the cursor keys please select Config. Confirm your selection by pressing the Enter -key of the MI4.
8
Connect PC and MI4 and start the download of the project to the MI4.
Pages ... CONFIG
TIME ... EXIT
Schedule Communication between XC100 and MI4
9
Exit the MI4 configurator and start the XSoft. You can now create a new project with File -> New.
Select the target hardware (XC-CPU101-...).
Attention: On the tab Network functionality the option Support network variables must be activated. The corresponding entry has to be CAN.
10
Schedule for coupling
Schedule Communication between XC100 and MI4
11
12
Via Insert -> Additional libraries insert the following libraries from the directory Lib_CPU101:
3S_CanOpen_V22.lib, CanDrv_lib.lib,
SysLibCallback.lib, SyslibSem.lib.
Schedule Communication between XC100 and MI4
13
Also insert the Xsoft-APPEXP-MI4_CANopen.lib. This Library is attached to the application note and has to be copied into the library directory.
Below you can see the MI4NETCANOPENARR – function block which will facilitate the communication between the XC100 and the MI4 enormously.
Schedule for coupling
Schedule Communication between XC100 and MI4
14
Increase the settings of memory for the global variables
By default the memory size for global variables is set to one data segment. This may not be sufficient especially for the XC-CPU101-C64K-8DI-6DO. Please increase the number of data segments in Project ->Options -> Build at least to the value of 4.
Schedule for coupling
Schedule Communication between XC100 and MI4
15
Append the CAN master in the PLC configuration. Click on Configuration XC100.. -> Append CANMaster.
16
Now the CAN-Master has to be parametrized. If the menu Extras has the item „properties“ activated, the properties of the CAN-Master willl be displayed. On the TAB „CAN Parameters“ the baud rate has to be defined.
Attention: Baud rates exceeding 125000 Baud are not supported by the XC-CPU101, despite the fact that you are allowed to select them here.
In order to start the CAN-stations together with the cold or warm start od the PLC as well as after bus interruptions, the option „Autostart“ has to be activated. The activation of the option „DSP301 and DSP306“ enables you to connect and parametrize modular stations.
Schedule for coupling
Schedule Communication between XC100 and MI4
17
The input offset address must be odd .
(Reason: The data package sent by the MI4 device via CANopen contains a WORD data type in the middle, which must begin on an even address)
After appending the master module it has to be selected. After that the MI4 interface can be selected with the right hand mouse button menu or with the menu Insert -> Append device.
18
Schedule Communication between XC100 and MI4
19
The CAN parameters are not modified; the Node-ID remains on 2.
Schedule for coupling
Schedule Communication between XC100 and MI4
20
Enter the following minimal program. Delete all unused inputs and outputs of the function block.
With the help of pCANopenNode[0].nStatus you can find out if the MI4 is already in “operational Mode“. Data exchange may only commence then in order to avoid SDO transmission errors and an eventual breakdown of the communication.
Schedule for coupling
Schedule Communication between XC100 and MI4
After all those settings the project must be saved. Then select Project -> Clean all.
With this command all pieces of information concerning the latest download and the lastest compiling procedure will be erased. Then the project has to be recompiled with Project -> Rebuild all. Via Online -> Communication parameters the serial interface RS232 has to be selected. Please select the baud rate with with the XC-CPU101 was last connected.
21
22
Load the program to the controller with Online->Login. Modifgy e.g. the value in the data array dw_arr_INT[1]. You should be able to detect the changes on the MI4.
Schedule for coupling