<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Function Block - Error C0006</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/55b62e99d3/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/55b62e99d3/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/55b62e99d3/</id><updated>2020-02-27T13:48:03.136000Z</updated><subtitle>Recent posts to Function Block - Error C0006</subtitle><entry><title>Function Block - Error C0006</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/55b62e99d3/?limit=25#082d" rel="alternate"/><published>2020-02-27T13:48:03.136000Z</published><updated>2020-02-27T13:48:03.136000Z</updated><author><name>nothinrandom</name><uri>https://forge.codesys.com/u/nothinrandom/</uri></author><id>https://forge.codesys.com7859ff41c5c8c7c13ad79b7c96b2f6380bfd3446</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'd say just double click on the error next time. The IDE typically brings you to the exact line where it think it has encountered a fault.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Function Block - Error C0006</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/55b62e99d3/?limit=25#1906" rel="alternate"/><published>2020-02-27T13:48:03.077000Z</published><updated>2020-02-27T13:48:03.077000Z</updated><author><name>Joan M</name><uri>https://forge.codesys.com/u/joan-m/</uri></author><id>https://forge.codesys.com4d7bb907ac1bbea202b6d6109990aa54335d7088</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;See the error itself:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[ERROR]&lt;/span&gt; Test: HR_Of_DT &lt;a class="" href="../Line%206%20(Decl)"&gt;Device: PLC Logic: Application&lt;/a&gt;: C0006: 'END_VAR' expected instead of ''&lt;/p&gt;
&lt;p&gt;HR_OF_DT, 6th line on the declaration section. END_VAR is missing.&lt;/p&gt;
&lt;p&gt;Of course END_VAR is not missing, but this is due the way compilers handle the check stage.&lt;br/&gt;
If you are not ending the line using a semicolon then the next line belongs to the current one and therefore END_VAR is understood not as the reserved statement it is but as part of your declarations...&lt;/p&gt;
&lt;p&gt;There are codes that can be found in the help system, there are other codes that force you to understand what you are doing...&lt;/p&gt;
&lt;p&gt;A good tip is to search at the line it tells you and before as the error can be in a previous line but the compiler can't say it...&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Function Block - Error C0006</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/55b62e99d3/?limit=25#f904" rel="alternate"/><published>2020-02-27T13:48:03.023000Z</published><updated>2020-02-27T13:48:03.023000Z</updated><author><name>Mfleming79</name><uri>https://forge.codesys.com/u/mfleming79/</uri></author><id>https://forge.codesys.com9f811d39e2995bd1523b7b87b5d79bbd2e7a4818</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This fixed it thanks! &lt;/p&gt;
&lt;p&gt;On a side note, is there any reference materials for error codes? I had zero luck searching the web and the Codesys manual.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Function Block - Error C0006</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/55b62e99d3/?limit=25#1d66" rel="alternate"/><published>2020-02-27T13:48:02.967000Z</published><updated>2020-02-27T13:48:02.967000Z</updated><author><name>Joan M</name><uri>https://forge.codesys.com/u/joan-m/</uri></author><id>https://forge.codesys.com6e834807a2f1d200da2f92570904f9911cdeca85</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Missing semicolon after Hour_Of_DT : INT&lt;/p&gt;
&lt;p&gt;Hope this helps...&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Function Block - Error C0006</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/55b62e99d3/?limit=25#dc46" rel="alternate"/><published>2020-02-27T13:48:02.899000Z</published><updated>2020-02-27T13:48:02.899000Z</updated><author><name>Mfleming79</name><uri>https://forge.codesys.com/u/mfleming79/</uri></author><id>https://forge.codesys.com4e2143fa9a36899273f7bf03a07cea8a92702b50</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;New to Codesys and expect that this is a syntax error. Tried to use the Oscat FB lib but the FB's do not have an output to them for some strange reason (maybe someone could help me here as well). From here I tried to build a new function but I get C0006 errors for the Var designation text. The text I wrote is as follows.&lt;/p&gt;
&lt;p&gt;FUNCTION HR_Of_DT : INT&lt;br/&gt;
VAR_INPUT&lt;br/&gt;
    XDT: DATE_AND_TIME;&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;VAR_OUTPUT&lt;br/&gt;
    Hour_Of_DT : INT&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;The specific errors I have are as follows.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[ERROR]&lt;/span&gt;         Test: HR_Of_DT &lt;a class="" href="../Line%206%20(Decl)"&gt;Device: PLC Logic: Application&lt;/a&gt;: C0006:  'END_VAR' expected instead of ''&lt;br/&gt;
&lt;span&gt;[ERROR]&lt;/span&gt;         Test: HR_Of_DT &lt;a class="" href="../Line%207%20(Decl)"&gt;Device: PLC Logic: Application&lt;/a&gt;: C0006:  ';, :=, REF=, ( or [' expected instead of 'END_VAR'&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>