<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Move value from array on timer</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a9d1ab5133/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a9d1ab5133/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/a9d1ab5133/</id><updated>2020-09-22T07:26:47.991000Z</updated><subtitle>Recent posts to Move value from array on timer</subtitle><entry><title>Move value from array on timer</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a9d1ab5133/?limit=25#8ebe" rel="alternate"/><published>2020-09-22T07:26:47.991000Z</published><updated>2020-09-22T07:26:47.991000Z</updated><author><name>cmu90</name><uri>https://forge.codesys.com/u/cmu90/</uri></author><id>https://forge.codesys.com93ea47949bc635fe38ea136491255ecd1b8950af</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;I'm currently working on a project which have lead to a few headaches, hopefully some kind soul can help me out!&lt;/p&gt;
&lt;p&gt;I am getting data from a laser which fills up an array once pr 500ms, from spot &lt;span&gt;[0]&lt;/span&gt; to [x].&lt;br/&gt;
The data needs to be datalogged, but that process uses a trigger which is limited to once pr second.&lt;br/&gt;
My question is; how to "move" the value from the array to an variable without it skipping an spot in the array.&lt;/p&gt;
&lt;p&gt;Open to suggestions!&lt;/p&gt;
&lt;p&gt;writing to array: &lt;br/&gt;
IF R_SLAG_OK THEN&lt;br/&gt;
F_FIFO_WRITE(cbData := SIZEOF(Value_Diff), pData := ADR(Value_Diff),&lt;br/&gt;
    cbBuffer := SIZEOF(arrLaserValueHistory), pBuffer := ADR(arrLaserValueHistory)&lt;br/&gt;
    ); &lt;br/&gt;
END_IF&lt;/p&gt;
&lt;p&gt;Thank you in advance, have a great day!&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>