<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Ethercat processdata control</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d52d098956/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d52d098956/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/d52d098956/</id><updated>2020-02-27T13:51:06.996000Z</updated><subtitle>Recent posts to Ethercat processdata control</subtitle><entry><title>Ethercat processdata control</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d52d098956/?limit=25#5409" rel="alternate"/><published>2020-02-27T13:51:06.996000Z</published><updated>2020-02-27T13:51:06.996000Z</updated><author><name>zahoorahmed</name><uri>https://forge.codesys.com/u/zahoorahmed/</uri></author><id>https://forge.codesys.com98c0303f0e45dcd8c83698161b846f97eee22926</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;juhataipale hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
So, after reading manuals all over, I found what I need, but still not getting it to work...&lt;br/&gt;
So, in this case the dataflow between Master and Slave is CanOpen over EtherCAT ( CoE ).&lt;br/&gt;
Only way to change the value is to either set Startup value or Write the process data.&lt;br/&gt;
So, with codesys-package there comes this IODrvEtherCAT -library.&lt;br/&gt;
There is a function block "ETC_CO_SdoWRITE4" with which you can write values to process data.&lt;br/&gt;
ADS_kommu_block.JPG&lt;br/&gt;
So,&lt;br/&gt;
to delete the energy values of all channels manually enter 0004hex in index 0xFB00:01 &lt;br/&gt;
I enter following values to my CoE-writer:&lt;br/&gt;
xExecute = TRUE&lt;br/&gt;
xAbort = &lt;em&gt;empty&lt;/em&gt;&lt;br/&gt;
usiCom = 1 (&lt;em&gt;Number of Ethercat master&lt;/em&gt;)&lt;br/&gt;
uiDevice = 1005 (&lt;em&gt;Number of the slave device&lt;/em&gt;)&lt;br/&gt;
usiChannel = &lt;em&gt;empty&lt;/em&gt;&lt;br/&gt;
wIndex = 64256 (&lt;em&gt;FB00 -&amp;gt; decimal because datatype WORD&lt;/em&gt;)(should it be like this???)&lt;br/&gt;
bySubindex = 1&lt;br/&gt;
udiTimeOut = 500 (&lt;em&gt;ms&lt;/em&gt;)&lt;br/&gt;
abyData = 4 &lt;strong&gt;&lt;em&gt;*HOW TO WRITE THAT 0004hex here??&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; datatype should be ARRAY &lt;span&gt;&lt;span&gt;[1,,4]&lt;/span&gt;&lt;/span&gt; OF BYTE&lt;br/&gt;
usiDataLength = 2 &lt;/em&gt;?* datatype should be USINT&lt;br/&gt;
Do I need to do something else to get this work, like take some global variable from that  IODrvEtherCAT -library or something else.&lt;br/&gt;
//EDIT:wrong picture&lt;br/&gt;
-Juha&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hello Juha,&lt;/p&gt;
&lt;p&gt;I am new to CoDeSys. Can you please tell me how to access IODrvEtherCAT library through CoDeSys Engineering so that I can access the FB you mentioned.&lt;/p&gt;
&lt;p&gt;Thanks and Kind Regards&lt;br/&gt;
Zahoor&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Ethercat processdata control</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d52d098956/?limit=25#68db" rel="alternate"/><published>2020-02-27T13:51:06.866000Z</published><updated>2020-02-27T13:51:06.866000Z</updated><author><name>juhataipale</name><uri>https://forge.codesys.com/u/juhataipale/</uri></author><id>https://forge.codesys.com1b28eecb16af355464437945968640d452cb3bf9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;juhataipale hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
So, after reading manuals all over, I found what I need, but still not getting it to work...&lt;br/&gt;
So, in this case the dataflow between Master and Slave is CanOpen over EtherCAT ( CoE ).&lt;br/&gt;
Only way to change the value is to either set Startup value or Write the process data.&lt;br/&gt;
So, with codesys-package there comes this IODrvEtherCAT -library.&lt;br/&gt;
There is a function block "ETC_CO_SdoWRITE4" with which you can write values to process data.&lt;br/&gt;
ADS_kommu_block.JPG&lt;br/&gt;
So,&lt;br/&gt;
to delete the energy values of all channels manually enter 0004hex in index 0xFB00:01 &lt;br/&gt;
I enter following values to my CoE-writer:&lt;br/&gt;
xExecute = TRUE&lt;br/&gt;
xAbort = &lt;em&gt;empty&lt;/em&gt;&lt;br/&gt;
usiCom = 1 (&lt;em&gt;Number of Ethercat master&lt;/em&gt;)&lt;br/&gt;
uiDevice = 1005 (&lt;em&gt;Number of the slave device&lt;/em&gt;)&lt;br/&gt;
usiChannel = &lt;em&gt;empty&lt;/em&gt;&lt;br/&gt;
wIndex = 64256 (&lt;em&gt;FB00 -&amp;gt; decimal because datatype WORD&lt;/em&gt;)(should it be like this???)&lt;br/&gt;
bySubindex = 1&lt;br/&gt;
udiTimeOut = 500 (&lt;em&gt;ms&lt;/em&gt;)&lt;br/&gt;
abyData = 4 &lt;strong&gt;&lt;em&gt;*HOW TO WRITE THAT 0004hex here??&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; datatype should be ARRAY &lt;span&gt;&lt;span&gt;[1,,4]&lt;/span&gt;&lt;/span&gt; OF BYTE&lt;br/&gt;
usiDataLength = 2 &lt;/em&gt;?* datatype should be USINT&lt;br/&gt;
Do I need to do something else to get this work, like take some global variable from that  IODrvEtherCAT -library or something else.&lt;br/&gt;
//EDIT:wrong picture&lt;br/&gt;
-Juha&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Got it work, so maybe this can help someone...&lt;/p&gt;
&lt;p&gt;Remember to use trigger in execute input!&lt;br/&gt;
See photo below, how to proceed the rest.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: kirjoitus.JPG" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1918"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Ethercat processdata control</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d52d098956/?limit=25#6e2f" rel="alternate"/><published>2020-02-27T13:51:06.731000Z</published><updated>2020-02-27T13:51:06.731000Z</updated><author><name>juhataipale</name><uri>https://forge.codesys.com/u/juhataipale/</uri></author><id>https://forge.codesys.com21c9c7f6398f1b47e5e246340578f11f9be68351</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;So, after reading manuals all over, I found what I need, but still not getting it to work...&lt;/p&gt;
&lt;p&gt;So, in this case the dataflow between Master and Slave is CanOpen over EtherCAT ( CoE ).&lt;br/&gt;
Only way to change the value is to either set Startup value or Write the process data.&lt;/p&gt;
&lt;p&gt;So, with codesys-package there comes this IODrvEtherCAT -library.&lt;br/&gt;
There is a function block "ETC_CO_SdoWRITE4" with which you can write values to process data.&lt;/p&gt;
&lt;p&gt;So,&lt;br/&gt;
to delete the energy values of all channels manually enter 0004hex in index 0xFB00:01 &lt;/p&gt;
&lt;p&gt;I enter following values to my CoE-writer:&lt;br/&gt;
xExecute = TRUE&lt;br/&gt;
xAbort = &lt;em&gt;empty&lt;/em&gt;&lt;br/&gt;
usiCom = 1 (&lt;em&gt;Number of Ethercat master&lt;/em&gt;)&lt;br/&gt;
uiDevice = 1005 (&lt;em&gt;Number of the slave device&lt;/em&gt;)&lt;br/&gt;
usiChannel = &lt;em&gt;empty&lt;/em&gt;&lt;br/&gt;
wIndex = 64256 (&lt;em&gt;FB00 -&amp;gt; decimal because datatype WORD&lt;/em&gt;)(should it be like this???)&lt;br/&gt;
bySubindex = 1&lt;br/&gt;
udiTimeOut = 500 (&lt;em&gt;ms&lt;/em&gt;)&lt;br/&gt;
abyData = 4 &lt;strong&gt;&lt;em&gt;*HOW TO WRITE THAT 0004hex here??&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; datatype should be ARRAY &lt;span&gt;&lt;span&gt;[1,,4]&lt;/span&gt;&lt;/span&gt; OF BYTE&lt;br/&gt;
usiDataLength = 2 &lt;/em&gt;?* datatype should be USINT&lt;/p&gt;
&lt;p&gt;Do I need to do something else to get this work, like take some global variable from that  IODrvEtherCAT -library or something else.&lt;/p&gt;
&lt;p&gt;//EDIT:wrong picture&lt;/p&gt;
&lt;p&gt;-Juha&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: ADS_kommu_block.JPG" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1858"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Ethercat processdata control</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d52d098956/?limit=25#62fd" rel="alternate"/><published>2020-02-27T13:51:06.604000Z</published><updated>2020-02-27T13:51:06.604000Z</updated><author><name>juhataipale</name><uri>https://forge.codesys.com/u/juhataipale/</uri></author><id>https://forge.codesys.com39fa4d229313259028448ef8620b093177dbd923</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello all,&lt;/p&gt;
&lt;p&gt;This is maybe more ethercat-related, but I am sure someone here knows how to deal.&lt;/p&gt;
&lt;p&gt;I have a Beckhoff EL3403 -energymeter unit, working smoothly.&lt;br/&gt;
Just now I am having hard times, because I should work with the process data.&lt;/p&gt;
&lt;p&gt;For example:&lt;br/&gt;
The unit is counting energyconsumption by itself whenever running and saving result to its own persistent data bank.&lt;br/&gt;
Monitoring the value is easy, since it is one of the default variables in mapping list.&lt;/p&gt;
&lt;p&gt;But I want to reset the value from command and this should be done by "entering 0004hex to index 0xFB00:01.&lt;br/&gt;
What does this actually mean and how to proceed?&lt;/p&gt;
&lt;p&gt;Do I need to add this index to process data inputs to be able to map it and then set the value?&lt;br/&gt;
I already tried, but I was not succesful. (After download the bus is not going up) &lt;/p&gt;
&lt;p&gt;-Juha&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: request.JPG" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=1839"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>