<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Recipe Management</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ae1f628cd8/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ae1f628cd8/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/ae1f628cd8/</id><updated>2020-02-27T14:35:46.885000Z</updated><subtitle>Recent posts to Recipe Management</subtitle><entry><title>Recipe Management</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ae1f628cd8/?limit=25#df44" rel="alternate"/><published>2020-02-27T14:35:46.885000Z</published><updated>2020-02-27T14:35:46.885000Z</updated><author><name>balajimct</name><uri>https://forge.codesys.com/u/balajimct/</uri></author><id>https://forge.codesys.comfe40b6afeb5aa9054e3a205a98e838f8da532a2b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Matteo,&lt;/p&gt;
&lt;p&gt;I think your structure is like this&lt;/p&gt;
&lt;p&gt;Struct&lt;br/&gt;
Rec_Name : String;&lt;br/&gt;
Var1 : Int&lt;br/&gt;
.&lt;br/&gt;
.&lt;br/&gt;
Varn : Int&lt;br/&gt;
End_Struct&lt;/p&gt;
&lt;p&gt;Once if you are entering the new value to receipe name then you can run the loop in the first element and you can find the string is there or not&lt;br/&gt;
if it is there then the instance will be having the value, with the help of the instance value move all the values in the present to required array&lt;/p&gt;
&lt;p&gt;I think some codesys library contains this function TBL_RDWR, This function will do all this operations&lt;/p&gt;
&lt;p&gt;If you want code then you can mail me to the below ID&lt;br/&gt;
 e &lt;a class="" href="mailto:balajimct@gmail.com"&gt;balajimct@gmail.com&lt;/a&gt; e &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Recipe Management</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ae1f628cd8/?limit=25#bb3c" rel="alternate"/><published>2020-02-27T14:35:46.381000Z</published><updated>2020-02-27T14:35:46.381000Z</updated><author><name>Info123</name><uri>https://forge.codesys.com/u/info123/</uri></author><id>https://forge.codesys.comd4c571b7e1e3dbde642c6a1fb3b5b5cdcd79d167</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I'm trying to work with Recipe Management on Codesys V3.&lt;br/&gt;
I showed 3s example to start ("RecipeDemo").&lt;/p&gt;
&lt;p&gt;The RecipeManCommands.GetRecipeNames or .SetRecipeValues accept pointer to array of string as parameter.&lt;/p&gt;
&lt;p&gt;I use an array of string to read recipe name or save values, but i need convert one by one my parameter to array of string.&lt;/p&gt;
&lt;p&gt;I have a struct composed by different parameter and I have to convert Type_to_string.&lt;/p&gt;
&lt;p&gt;Is there a function to put values of a struct in array of string and the opposite?&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;Mystruct&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;INT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="c1"&gt;--&amp;gt;int_to_string()             array[0] = '100'&lt;/span&gt;
&lt;span class="n"&gt;Mystruct&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BOOL&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;TRUE&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="c1"&gt;--&amp;gt;bool_to_string()        array[1] = 'TRUE'&lt;/span&gt;
&lt;span class="n"&gt;Mystruct&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;c&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;STRING&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'TEST'&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nb"&gt;array&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'TEST'&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;My struct --&amp;gt; array of string --&amp;gt; recipe file.&lt;/p&gt;
&lt;p&gt;For the moment I use a pointer of byte to point on the first element of my instance of struct, and I move the pointer in base of type of data to copy data from array of string to my struct.&lt;br/&gt;
I have an other problem, when I read an Integer value by my array of string I read the ASCII character corrispondent (for example char= 'W' int value = 87).&lt;br/&gt;
Is possible to convert the ascii character to value code?&lt;/p&gt;
&lt;p&gt;Thank to all for your reply.&lt;br/&gt;
Matteo&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>