• Diff for "siemens_cp1616/Tutorials/SINAMICS S120 - Runtime"
Differences between revisions 5 and 6
Revision 5 as of 2015-11-08 21:52:23
Size: 1405
Comment:
Revision 6 as of 2015-11-09 20:57:04
Size: 5183
Comment:
Deletions are marked like this. Additions are marked like this.
Line 28: Line 28:
TODO This tutorial teaches you how to run IO Controller wrapper in comination with User Node, monitor and check the results. We recommend using additional computer connected to X127 Ethernet port of SINAMICS S120 Control unit for easier monitoring and testing of PROFINET communication.
Line 30: Line 30:
{{attachment:STARTER_topology.png||height="450",width="750"}} == Run the launch file ==
If you have completed all configuration steps as describer in previous tutorials it is time to run existing launch file:
Line 32: Line 33:
TODO {{{
roslaunch siemens_cp1616_sinamics_s120_tutorial siemens_cp1616_sinamics_s120_tutorial.launch
}}}
If initialization succeded, you should notice red error indicators on both PLC and CP1616 turn off and get the following terminal output:

{{{
[ INFO] [1447012600.608580433]: CP1616: Number of input modules: 2
[ INFO] [1447012600.608712340]: CP1616: Number of output modules: 2
[ INFO] [1447012600.608976244]: Input Data Array: [Total size: 28 bytes]
[ INFO] [1447012600.609101169]: I512-515 cu_input_topic [4 bytes]
[ INFO] [1447012600.609215920]: I516-539 drive_1_input_topic [24 bytes]
[ INFO] [1447012600.609337639]: Output Data Array: [Total size: 28 byte]
[ INFO] [1447012600.609454864]: Q512-515 cu_output_topic [4 bytes]
[ INFO] [1447012600.609569135]: Q516-539 drive_1_output_topic [24 bytes]
[ INFO] [1447012600.673885980]: Openning CP1616 in IO_controller mode: done
[ INFO] [1447012600.676558793]: IO_controller mode change request-> OPERATE:
[ INFO] [1447012600.685698690]: Changing IO_controller mode: done
[ INFO] [1447012604.789913418]: IO Controller ready, communication started
}}}
NOTE: If initialization fails and return errors, please check if ''yaml'' config file meets the hardware configuration (addresses, sizes). If nevertheless errors still occurs please refer to original siemens cp1616 documentation.

== Check CP1616 Webserver ==
If you have configured webserver in TIA Portal project, you can connect to CP1616 LAN Port and monitor CP state through Webserver interface. If initialization succedded, CP1616 should report "OPERATE".

{{attachment:SINAMICS_webserver.jpg||height="596",width="753"}}

== Monitor topics ==
First use rostopic list command line tool to get the list of all active topics:

{{{
$ rostopic list
}}}
For this tutorial example, rostopic list should return:

{{{
/cu_input_topic
/cu_output_topic
/drive_1_input_topic
/drive_1_output_topic
/rosout
/rosout_agg
}}}
With default configuration, CP buffers are updated and synchronized with data on topics every 10ms. Using ''rostopic hz'' command line tool check if "''drive_1_input_topic" '' is updated regularly.

{{{
average rate: 99.983
        min: 0.009s max: 0.010s std dev: 0.00042s window: 99
average rate: 99.999
        min: 0.009s max: 0.010s std dev: 0.00043s window: 199
average rate: 99.996
        min: 0.009s max: 0.010s std dev: 0.00043s window: 299
}}}
Average rate of ''drive_1_output_topic'' in this example is approximately 0.2, since our tutorial node publishes data every 5 seconds. But synchronization with CP buffers still happens every 10ms.

== STARTER Diagnostics ==
Using additional Windows computer allows you to monitor PROFINET communication while running CP1616 application on the Linux machine. To monitor data transmitted from CP1616 into SINAMICS S120 Control unit, use STARTER commisioning tool.

"Communication" -> "Recieve direction" label shows telegram data coming from CP1616's User node. You can see that in this case all the data are being transmitted properly.
Line 36: Line 94:
TODO "Communication" -> "Transmit direction" label shows telegram data being sent to CP1616 User node.
Line 40: Line 98:
TODO DIagnostics -> Control/Status word is very convenient tool to monitor actual state of the drive:
Line 44: Line 102:
TODO If everything works properly you should see your drive moving. In this particular example half a turn to both sides in the endless loop with 5 second delay.

!

(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

SINAMICS S120 - Runtime

Description: This tutorial teaches you how to run PROFINET communication and check the results

Keywords: SIEMENS, CP1616, PROFINET, IO Controller, SINAMICS, Runtime

Tutorial Level: INTERMEDIATE

This tutorial teaches you how to run IO Controller wrapper in comination with User Node, monitor and check the results. We recommend using additional computer connected to X127 Ethernet port of SINAMICS S120 Control unit for easier monitoring and testing of PROFINET communication.

Run the launch file

If you have completed all configuration steps as describer in previous tutorials it is time to run existing launch file:

roslaunch siemens_cp1616_sinamics_s120_tutorial siemens_cp1616_sinamics_s120_tutorial.launch

If initialization succeded, you should notice red error indicators on both PLC and CP1616 turn off and get the following terminal output:

[ INFO] [1447012600.608580433]: CP1616: Number of input modules: 2
[ INFO] [1447012600.608712340]: CP1616: Number of output modules: 2
[ INFO] [1447012600.608976244]: Input Data Array: [Total size: 28 bytes]
[ INFO] [1447012600.609101169]: I512-515 cu_input_topic [4 bytes]
[ INFO] [1447012600.609215920]: I516-539 drive_1_input_topic [24 bytes]
[ INFO] [1447012600.609337639]: Output Data Array: [Total size: 28 byte]
[ INFO] [1447012600.609454864]: Q512-515 cu_output_topic [4 bytes]
[ INFO] [1447012600.609569135]: Q516-539 drive_1_output_topic [24 bytes]
[ INFO] [1447012600.673885980]: Openning CP1616 in IO_controller mode: done
[ INFO] [1447012600.676558793]: IO_controller mode change request-> OPERATE:
[ INFO] [1447012600.685698690]: Changing IO_controller mode: done
[ INFO] [1447012604.789913418]: IO Controller ready, communication started

NOTE: If initialization fails and return errors, please check if yaml config file meets the hardware configuration (addresses, sizes). If nevertheless errors still occurs please refer to original siemens cp1616 documentation.

Check CP1616 Webserver

If you have configured webserver in TIA Portal project, you can connect to CP1616 LAN Port and monitor CP state through Webserver interface. If initialization succedded, CP1616 should report "OPERATE".

SINAMICS_webserver.jpg

Monitor topics

First use rostopic list command line tool to get the list of all active topics:

$ rostopic list

For this tutorial example, rostopic list should return:

/cu_input_topic
/cu_output_topic
/drive_1_input_topic
/drive_1_output_topic
/rosout
/rosout_agg

With default configuration, CP buffers are updated and synchronized with data on topics every 10ms. Using rostopic hz command line tool check if "drive_1_input_topic" is updated regularly.

average rate: 99.983
        min: 0.009s max: 0.010s std dev: 0.00042s window: 99
average rate: 99.999
        min: 0.009s max: 0.010s std dev: 0.00043s window: 199
average rate: 99.996
        min: 0.009s max: 0.010s std dev: 0.00043s window: 299

Average rate of drive_1_output_topic in this example is approximately 0.2, since our tutorial node publishes data every 5 seconds. But synchronization with CP buffers still happens every 10ms.

STARTER Diagnostics

Using additional Windows computer allows you to monitor PROFINET communication while running CP1616 application on the Linux machine. To monitor data transmitted from CP1616 into SINAMICS S120 Control unit, use STARTER commisioning tool.

"Communication" -> "Recieve direction" label shows telegram data coming from CP1616's User node. You can see that in this case all the data are being transmitted properly.

STARTER_communication.png

"Communication" -> "Transmit direction" label shows telegram data being sent to CP1616 User node.

STARTER_communication_out.png

DIagnostics -> Control/Status word is very convenient tool to monitor actual state of the drive:

STARTER_diagnostics.png

If everything works properly you should see your drive moving. In this particular example half a turn to both sides in the endless loop with 5 second delay.

Wiki: siemens_cp1616/Tutorials/SINAMICS S120 - Runtime (last edited 2015-11-24 21:21:13 by FrantisekDurovsky)