<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Can't figure out how to "save" a value of a variable</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/bc35095d65/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/bc35095d65/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/bc35095d65/</id><updated>2020-02-27T23:00:52.153000Z</updated><subtitle>Recent posts to Can't figure out how to "save" a value of a variable</subtitle><entry><title>Can't figure out how to "save" a value of a variable</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/bc35095d65/?limit=25#f798" rel="alternate"/><published>2020-02-27T23:00:52.153000Z</published><updated>2020-02-27T23:00:52.153000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com35c0eb3d89441366aafb221c58c578e23f99aa73</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;jos is talking about the sequence of the blocks the AND is now 3 and should be 0&lt;br/&gt;
this is done automatically check order (after right clicking.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Can't figure out how to "save" a value of a variable</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/bc35095d65/?limit=25#8cec" rel="alternate"/><published>2020-02-27T23:00:47.630000Z</published><updated>2020-02-27T23:00:47.630000Z</updated><author><name>wicing</name><uri>https://forge.codesys.com/u/wicing/</uri></author><id>https://forge.codesys.come754e051a7a1c8b76186a59b97132da56eb3fb2f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I don't really think I need to store the total pulses. The meter itself keeps track of the total energy-consumption. That's enough for me. Here I just want to see consumption/pruduction for the moment.&lt;br/&gt;
The variables "Konsumption" and "Produktion" is the variables for the digital inputs that "listen" for pulses.&lt;br/&gt;
I am sorry, but I still don't understand how to change the sequence the blocks are calculated. Can you give an example?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Can't figure out how to "save" a value of a variable</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/bc35095d65/?limit=25#a2e9" rel="alternate"/><published>2020-02-27T23:00:46.031000Z</published><updated>2020-02-27T23:00:46.031000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com7c0a366061ec54190287c78319ad36891980d8b0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;jos is talking about a command to change in which sequence all the blocks are calculated.&lt;br/&gt;
I am missing more software like a trigger when you receive a pulse, and oke you can use the time between pulses for the actual, however you will also need to store the total pulses.&lt;br/&gt;
if you also store the starttime and the actual time you can get a average of power.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Can't figure out how to "save" a value of a variable</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/bc35095d65/?limit=25#7d4c" rel="alternate"/><published>2020-02-27T23:00:44.409000Z</published><updated>2020-02-27T23:00:44.409000Z</updated><author><name>wicing</name><uri>https://forge.codesys.com/u/wicing/</uri></author><id>https://forge.codesys.comc5af22fc473305d58a1220e0eb301fb85d9a870e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm not sure I understand what you mean. In which order should they be executed?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Can't figure out how to "save" a value of a variable</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/bc35095d65/?limit=25#f16c" rel="alternate"/><published>2020-02-27T23:00:39.923000Z</published><updated>2020-02-27T23:00:39.923000Z</updated><author><name>josepmariarams</name><uri>https://forge.codesys.com/u/josepmariarams/</uri></author><id>https://forge.codesys.com9d2d0ed35b265b2fe7c7e5f606352e9f7a32fd2e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;arrange the execution order of the elements of cfc.&lt;/p&gt;
&lt;p&gt;Enviat des del meu Aquaris M5.5 usant Tapatalk&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Can't figure out how to "save" a value of a variable</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/bc35095d65/?limit=25#755f" rel="alternate"/><published>2020-02-27T23:00:38.308000Z</published><updated>2020-02-27T23:00:38.308000Z</updated><author><name>wicing</name><uri>https://forge.codesys.com/u/wicing/</uri></author><id>https://forge.codesys.comf3a734ba06ea717408f3798dd08749b9d57ddf55</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;By the way, the variables connected to the ENO-connectors are not in use. They are only leftovers from a Little experiment.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Can't figure out how to "save" a value of a variable</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/bc35095d65/?limit=25#a890" rel="alternate"/><published>2020-02-27T23:00:33.819000Z</published><updated>2020-02-27T23:00:33.819000Z</updated><author><name>wicing</name><uri>https://forge.codesys.com/u/wicing/</uri></author><id>https://forge.codesys.com37c2d1eaabab66fd9aaf5bda925990d4da3acb40</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
I have a programming problem (CFC) that I can't figure out how to solve.&lt;br/&gt;
As a part of the program for my house, I want to integrate pulses from an energy-meter. The energy-meter has two outputs, that I want to connect to to two digital inputs on my Wago 750 PLC to get info about how much Power that's imported or exported from my household.&lt;br/&gt;
The meter has a pulse-factor of 100 pulses per kWh. I thought that if I instead of counting pulses over a fixed time-period rather Count the time between pulses I get a much faster  and more accurate momentary Power consumption/export monitoring. I later on want to use this to Control a waterheater while I have an over-production of Power on my solar panels.&lt;/p&gt;
&lt;p&gt;Then, to my problem:&lt;/p&gt;
&lt;p&gt;See the attached Picture, I can't get "momentan_konsumption" and "momentan_produktion" (momentary consumption/pruduction) to stay at the calculated value.&lt;br/&gt;
I am trying to calculate the elapsed time from the TON-blocks to a momentary Power-consumption/production by converting time to dword, divide 36 000 000 by the elapsed time in miliseconds and hopefully get a momentary Power-value in watts. With the conditions on the EN-connectors I hoped that the calculation should only be done with an elapsed time anything else than 0 so that the calculation couldn't be resetted right away.&lt;/p&gt;
&lt;p&gt;Can you see any obvious faults?&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: codesys.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2513"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>