<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to error c0265 </title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/94ca4cb3ad/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/94ca4cb3ad/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/94ca4cb3ad/</id><updated>2021-07-20T15:26:42.830000Z</updated><subtitle>Recent posts to error c0265 </subtitle><entry><title>error c0265 </title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/94ca4cb3ad/?limit=25#6781" rel="alternate"/><published>2021-07-20T15:26:42.830000Z</published><updated>2021-07-20T15:26:42.830000Z</updated><author><name>pach30</name><uri>https://forge.codesys.com/u/pach30/</uri></author><id>https://forge.codesys.com4c638a11e96b68588daf761556fec1b5fcada6b6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello I campbell,&lt;/p&gt;
&lt;p&gt;I didn't make this test .&lt;br/&gt;
what I want to do :&lt;br/&gt;
    Create an object (in real life a machine ) with a number variable (from 400 to 750) of element .Each element has his own carateristics (so my DUT). &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;So&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="n"&gt;will&lt;/span&gt; &lt;span class="n"&gt;use&lt;/span&gt;  &lt;span class="n"&gt;Fb_init&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;make&lt;/span&gt; &lt;span class="k"&gt;dynamic&lt;/span&gt; &lt;span class="n"&gt;allocation&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="n"&gt;elements&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;usual&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;POO&lt;/span&gt; &lt;span class="p"&gt;).&lt;/span&gt;

&lt;span class="n"&gt;I&lt;/span&gt; &lt;span class="n"&gt;think&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="s1"&gt;'s possible , isn'&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>error c0265 </title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/94ca4cb3ad/?limit=25#7fe7" rel="alternate"/><published>2021-07-16T14:28:54.499000Z</published><updated>2021-07-16T14:28:54.499000Z</updated><author><name>i-campbell</name><uri>https://forge.codesys.com/u/i-campbell/</uri></author><id>https://forge.codesys.com1583b460bc48ce47b63d620888b23381afa9853a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;interesting. does it work if you use a function block instead of a dut?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>error c0265 </title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/94ca4cb3ad/?limit=25#e29d" rel="alternate"/><published>2021-07-16T14:23:04.177000Z</published><updated>2021-07-16T14:23:04.177000Z</updated><author><name>pach30</name><uri>https://forge.codesys.com/u/pach30/</uri></author><id>https://forge.codesys.com37a26f05816d2fd46a255915cc365f6c76a432a6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank's i-campbell&lt;/p&gt;
&lt;p&gt;But i got error C0249 even with compilation directive 😨&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;            ------ Processus de compilation entamé : application : CODESYS_Control_Win_V3_x64.Application -------&lt;/span&gt;
&lt;span class="err"&gt;            Affecter un type à un code...&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;span&gt;[ERREUR]&lt;/span&gt;        Test_divers: FB_Init &lt;a class="" href="../Ligne%203,%20colonne%201%20(Impl)"&gt;CODESYS_Control_Win_V3_x64: Logique API: Application: Robot&lt;/a&gt;: C0249:  La création d’un tableau avec __NEW n’est pas autorisée pour les types définis par l'utilisateur&lt;br/&gt;
                La compilation est terminée -- 1 erreurs, 3 avertissements : aucun téléchargement possible&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>error c0265 </title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/94ca4cb3ad/?limit=25#657e" rel="alternate"/><published>2021-07-16T13:53:36.970000Z</published><updated>2021-07-16T13:53:36.970000Z</updated><author><name>i-campbell</name><uri>https://forge.codesys.com/u/i-campbell/</uri></author><id>https://forge.codesys.com3f4bc86b528567a2eecc23add0d7c2837a6a6baa</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;MyObject must be a FUNCTION_BLOCK or DUT decorated with the attribute&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;{attribute 'enable_dynamic_creation'}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://help.codesys.com/webapp/_cds_operator_new;product=codesys;version=3.5.17.0" rel="nofollow"&gt;https://help.codesys.com/webapp/_cds_operator_new;product=codesys;version=3.5.17.0&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>error c0265 </title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/94ca4cb3ad/?limit=25#20cc" rel="alternate"/><published>2021-07-16T12:04:19.395000Z</published><updated>2021-07-16T12:04:19.395000Z</updated><author><name>pach30</name><uri>https://forge.codesys.com/u/pach30/</uri></author><id>https://forge.codesys.com32d202223ce1cf0ba91f9a065316eda51574e552</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks you i-campbell !!&lt;br/&gt;
the way you give me was the right way and I can compile using dynamic allocation( with __new operator ) &lt;/p&gt;
&lt;p&gt;But , it seem's it's no possible to create un array of personal object by this way  ? &lt;/p&gt;
&lt;p&gt;if i declare : &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;TYPE MyObject :&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;STRUCT&lt;br/&gt;
    id              :DINT ;   &lt;br/&gt;
    i_Number        :INT ;    &lt;br/&gt;
    sz_genotype     :STRING ; &lt;br/&gt;
    sz_Plug         :STRING ; &lt;br/&gt;
    sz_scenario_WS  :STRING ; &lt;br/&gt;
    sz_scenario_SS  :STRING ; &lt;br/&gt;
    f_weight_vide   :REAL ;   &lt;br/&gt;
    f_weight_Ref    :REAL ;   &lt;br/&gt;
    f_weight_before     :REAL ;   &lt;br/&gt;
    f_weight_after  :REAL ;   &lt;br/&gt;
END_STRUCT&lt;br/&gt;
END_TYPE&lt;/p&gt;
&lt;p&gt;I can't write &lt;/p&gt;
&lt;p&gt;pMyObject : pointer of MyObject &lt;/p&gt;
&lt;p&gt;....&lt;/p&gt;
&lt;p&gt;pMyobject := __new( Myobject,avalue) ; &lt;/p&gt;
&lt;p&gt;what a shame !!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>error c0265 </title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/94ca4cb3ad/?limit=25#81c5" rel="alternate"/><published>2021-07-15T17:15:08.242000Z</published><updated>2021-07-15T17:15:08.242000Z</updated><author><name>i-campbell</name><uri>https://forge.codesys.com/u/i-campbell/</uri></author><id>https://forge.codesys.coma515b8a145bdbdc172dbcbba5d273a3ecb6cb896</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;do you mean with the __new operator?&lt;br/&gt;
The size is defined by right clicking the application and selecting properties, then going to the Application Build Options tab.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>error c0265 </title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/94ca4cb3ad/?limit=25#5bcb" rel="alternate"/><published>2021-07-15T12:00:34.470000Z</published><updated>2021-07-15T12:00:34.470000Z</updated><author><name>pach30</name><uri>https://forge.codesys.com/u/pach30/</uri></author><id>https://forge.codesys.com34e639348cf7eb5a18a344fa6ea1a2217d05ff52</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;this error is between engineering talk and runtime tall as IDE give the error on what appears to be an runtime problem.  &lt;/p&gt;
&lt;p&gt;Playing with dynamic allocation on Codesys Win64 PLC , I get this error C0265 (not enough memory). My PC has 16 Go Ram , so enough I think . Is it a way to increase the memory allocated to Win 64 PLC ?&lt;/p&gt;
&lt;p&gt;thank in advance&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>