<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to INTERN ASSIGN nicht bei Arrays!?</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/6ed62c5cf6/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/6ed62c5cf6/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Deutsch/thread/6ed62c5cf6/</id><updated>2020-02-28T19:21:27.806000Z</updated><subtitle>Recent posts to INTERN ASSIGN nicht bei Arrays!?</subtitle><entry><title>INTERN ASSIGN nicht bei Arrays!?</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/6ed62c5cf6/?limit=25#df77" rel="alternate"/><published>2020-02-28T19:21:27.806000Z</published><updated>2020-02-28T19:21:27.806000Z</updated><author><name>Erik Böhm</name><uri>https://forge.codesys.com/u/erik-boehm/</uri></author><id>https://forge.codesys.com5b9c2ce9827a74eb15bab4a296e0ec803d644d9f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Ob das ein Problem darstellt, kann ich dir auch nicht sagen. Ich schreib ja den Compiler nicht...&lt;/p&gt;
&lt;p&gt;Gruß&lt;/p&gt;
&lt;p&gt;Erik&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>INTERN ASSIGN nicht bei Arrays!?</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/6ed62c5cf6/?limit=25#35dd" rel="alternate"/><published>2020-02-28T19:21:19.507000Z</published><updated>2020-02-28T19:21:19.507000Z</updated><author><name>Sara</name><uri>https://forge.codesys.com/u/sara/</uri></author><id>https://forge.codesys.com1ac43de3379c3968f6bd1c13fb3e89db1c050d94</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;na, die müssen schon dieselbe Größe haben!&lt;/p&gt;
&lt;p&gt;so was würde ja auch nicht in einem CoDeSys-Baustein gehen.&lt;/p&gt;
&lt;p&gt;Aber mir ist auch schon aufgefallen, dass Anweisungen in der Visu nicht syntaktisch geprüft werden, was ich auch schade finde.&lt;/p&gt;
&lt;p&gt;Stellt das Prüfen denn ein Problem dar?&lt;/p&gt;
&lt;p&gt;Grüße&lt;/p&gt;
&lt;p&gt;Sara&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>INTERN ASSIGN nicht bei Arrays!?</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/6ed62c5cf6/?limit=25#b66c" rel="alternate"/><published>2020-02-28T19:21:16.530000Z</published><updated>2020-02-28T19:21:16.530000Z</updated><author><name>Erik Böhm</name><uri>https://forge.codesys.com/u/erik-boehm/</uri></author><id>https://forge.codesys.com790a6b4f95b6427fc995b7c6658c780c36e58213</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Sara&lt;/p&gt;
&lt;p&gt;Ob das schön wäre sei mal dahingestellt...&lt;/p&gt;
&lt;p&gt;Was wäre denn, wenn deine beiden Arrays nicht die selbe Größe haben ???&lt;/p&gt;
&lt;p&gt;Ich kenne keine Programmiersprache in der so was zugelassen ist.&lt;/p&gt;
&lt;p&gt;Gruß&lt;/p&gt;
&lt;p&gt;Erik&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>INTERN ASSIGN nicht bei Arrays!?</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/6ed62c5cf6/?limit=25#c004" rel="alternate"/><published>2020-02-28T19:21:08.345000Z</published><updated>2020-02-28T19:21:08.345000Z</updated><author><name>Sara</name><uri>https://forge.codesys.com/u/sara/</uri></author><id>https://forge.codesys.com5f57ceede27a0122fafa90db6ccc038b8a3849c5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Erik,&lt;/p&gt;
&lt;p&gt;schade schade. Das wäre mal ein schönes feature...&lt;/p&gt;
&lt;p&gt;Danke!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>INTERN ASSIGN nicht bei Arrays!?</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/6ed62c5cf6/?limit=25#62d8" rel="alternate"/><published>2020-02-28T19:21:05.322000Z</published><updated>2020-02-28T19:21:05.322000Z</updated><author><name>Erik Böhm</name><uri>https://forge.codesys.com/u/erik-boehm/</uri></author><id>https://forge.codesys.com290462bb2df09b31d2429713828eef17ca675ef8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;oder eben per Button ein Flag setzen, das dann eine Schleife startet.&lt;/p&gt;
&lt;p&gt;if bClearArray then&lt;/p&gt;
&lt;p&gt;FOR i:=1 to 7 do&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;PLC_PRG&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;array1&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PLC_PRG&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;array2&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_FOR&lt;/p&gt;
&lt;p&gt;bClearArray := false;&lt;/p&gt;
&lt;p&gt;end_if&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>INTERN ASSIGN nicht bei Arrays!?</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/6ed62c5cf6/?limit=25#2b60" rel="alternate"/><published>2020-02-28T19:20:56.690000Z</published><updated>2020-02-28T19:20:56.690000Z</updated><author><name>Erik Böhm</name><uri>https://forge.codesys.com/u/erik-boehm/</uri></author><id>https://forge.codesys.com233445fac546ce751bbf2316812a98e2873c387a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo&lt;/p&gt;
&lt;p&gt;Da hast du wohl Recht, das geht nicht für komplette Arrays.&lt;/p&gt;
&lt;p&gt;Im Quellcode übrigens auch nicht.&lt;/p&gt;
&lt;p&gt;Die Lösung sieht so aus:&lt;/p&gt;
&lt;p&gt;INTERN ASSIGN PLC_PRG.array1&lt;span&gt;[1]&lt;/span&gt; := (PLC_PRG.array2&lt;span&gt;[1]&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;INTERN ASSIGN PLC_PRG.array1&lt;span&gt;[2]&lt;/span&gt; := (PLC_PRG.array2&lt;span&gt;[2]&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;INTERN ASSIGN PLC_PRG.array1&lt;span&gt;[3]&lt;/span&gt; := (PLC_PRG.array2&lt;span&gt;[3]&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;usw...&lt;/p&gt;
&lt;p&gt;Gruß Erik&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>INTERN ASSIGN nicht bei Arrays!?</title><link href="https://forge.codesys.com/forge/talk/Deutsch/thread/6ed62c5cf6/?limit=25#34c3" rel="alternate"/><published>2020-02-28T19:20:53.718000Z</published><updated>2020-02-28T19:20:53.718000Z</updated><author><name>Sara</name><uri>https://forge.codesys.com/u/sara/</uri></author><id>https://forge.codesys.com4c40096a9d36227e3dd9b485613bb89dbd286577</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo ihr,&lt;/p&gt;
&lt;p&gt;ich möchte einen Button implementieren, der, sobald er gedrückt wird, ein Array zurücksetzt.&lt;/p&gt;
&lt;p&gt;Dazu habe ich beim Element Konfigurieren von dieser Schaltfläche unter Eingabe -&amp;gt; Programm ausführen folgendes geschrieben:&lt;/p&gt;
&lt;p&gt;INTERN ASSIGN PLC_PRG.array1 := (PLC_PRG.array2)&lt;/p&gt;
&lt;p&gt;(array1 : ARRAY&lt;span&gt;[1..7]&lt;/span&gt; OF BOOL; (&lt;em&gt;array 2 ebenso&lt;/em&gt;) )&lt;/p&gt;
&lt;p&gt;Sobald ich das teste, läuft es aber nicht (egal ob simuliert oder über die PLCWinNT).&lt;/p&gt;
&lt;p&gt;Wieso?&lt;/p&gt;
&lt;p&gt;Probier ich folgendes:&lt;/p&gt;
&lt;p&gt;INTERN ASSIGN PLC_PRG.array1&lt;span&gt;[1]&lt;/span&gt; := (PLC_PRG.array2&lt;span&gt;[1]&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;so läuft es - halt nur für die erste Stelle.&lt;/p&gt;
&lt;p&gt;Geht INTERN ASSIGN generell nicht für komplette Arrays? Das wäre sehr schade. Wie könnte man das vielleicht anders implementieren?&lt;/p&gt;
&lt;p&gt;Danke für eure Hilfe.&lt;/p&gt;
&lt;p&gt;Grüße&lt;/p&gt;
&lt;p&gt;Sara&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>