Hello I campbell, I didn't make this test . what I want to do : 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). So , i will use Fb_init() to make dynamic allocation of x elements (as usual in POO ). I think it's possible , isn't it ?
Thank's i-campbell But i got error C0249 even with compilation directive 😨 ------ Processus de compilation entamé : application : CODESYS_Control_Win_V3_x64.Application ------- Affecter un type à un code... [ERREUR] Test_divers: FB_Init CODESYS_Control_Win_V3_x64: Logique API: Application: Robot: C0249: La création d’un tableau avec __NEW n’est pas autorisée pour les types définis par l'utilisateur La compilation est terminée -- 1 erreurs, 3 avertissements : aucun téléchargement possible
Thanks you i-campbell !! the way you give me was the right way and I can compile using dynamic allocation( with __new operator ) But , it seem's it's no possible to create un array of personal object by this way ? if i declare : TYPE MyObject : STRUCT id :DINT ; i_Number :INT ; sz_genotype :STRING ; sz_Plug :STRING ; sz_scenario_WS :STRING ; sz_scenario_SS :STRING ; f_weight_vide :REAL ; f_weight_Ref :REAL ; f_weight_before :REAL ; f_weight_after :REAL ; END_STRUCT END_TYPE I can't write pMyObject...
Hello this error is between engineering talk and runtime tall as IDE give the error on what appears to be an runtime problem. 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 ? thank in advance
Hello 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 ? thank in advance
Have a look here https://support.industry.siemens.com/cs/document/42014088/programming-an-opc-ua-net-client-with-c-for-the-simatic-net-opc-ua-server?dti=0&lc=en-WW
Hello Have a look here : https://support.industry.siemens.com/cs/document/42014088/programming-an-opc-ua-net-client-with-c-for-the-simatic-net-opc-ua-server?dti=0&lc=en-WW I used excel file provided with Schneider TM241 and it works fine
another screen copy