<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Some recipe values storing with extra characters</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fddb82beff/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fddb82beff/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/fddb82beff/</id><updated>2021-04-26T05:11:42.558000Z</updated><subtitle>Recent posts to Some recipe values storing with extra characters</subtitle><entry><title>Some recipe values storing with extra characters</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fddb82beff/?limit=25#0bb0" rel="alternate"/><published>2021-04-26T05:11:42.558000Z</published><updated>2021-04-26T05:11:42.558000Z</updated><author><name>m.prestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.com2380db538347b4c11498737975513cc8ed0d21b2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hey,&lt;br/&gt;
4.1.0.0 is the lib version&lt;br/&gt;
You can always simply split the string apart at the # and use the first index.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Some recipe values storing with extra characters</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fddb82beff/?limit=25#5543" rel="alternate"/><published>2021-04-23T15:17:46.399000Z</published><updated>2021-04-23T15:17:46.399000Z</updated><author><name>TPTSys</name><uri>https://forge.codesys.com/u/tehthoams/</uri></author><id>https://forge.codesys.com0152b5ccf3a836f2fc077816b2c8a47d529a9046</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Marcel,&lt;/p&gt;
&lt;p&gt;Thank you, i see how the value is the exact binary value now.&lt;/p&gt;
&lt;p&gt;I am not familiar with Recipes 4.1.0.0, is this a library?&lt;br/&gt;
Is there a way i can implement this option in my project?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Some recipe values storing with extra characters</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fddb82beff/?limit=25#6b28" rel="alternate"/><published>2021-04-22T14:45:35.024000Z</published><updated>2021-04-22T14:45:35.024000Z</updated><author><name>m.prestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.com16a979bc54d7be3f8115427429222babd8157113</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hey,&lt;br/&gt;
The values appended are the exact binary value.&lt;/p&gt;
&lt;p&gt;With Recipes 4.1.0.0 this value can be skipped from being created with the compiler define RECIPE_GENERATE_SIMPLE_STRINGREAL.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Some recipe values storing with extra characters</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fddb82beff/?limit=25#c6c1" rel="alternate"/><published>2021-04-22T14:08:19.189000Z</published><updated>2021-04-22T14:08:19.189000Z</updated><author><name>TPTSys</name><uri>https://forge.codesys.com/u/tehthoams/</uri></author><id>https://forge.codesys.com62f656ee0a5e6291f92c2ba76981b5f47eee49b3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Certain values of real type variables show extra characters in the recipe.  The extra characters are also present in the recipe text file.  As far as I can see, despite the strange extra characters the values save and restore properly, but it is causing some concern.&lt;/p&gt;
&lt;p&gt;Has anyone had a similar problem?  Is there a way to solve this?&lt;/p&gt;
&lt;p&gt;For example:&lt;br/&gt;
The value 0.9 saves as 0.9F16#E666666H-6&lt;br/&gt;
The value 0.99 does something similar.&lt;br/&gt;
the value 1.9 does something similar&lt;br/&gt;
the value 2.9 saves and displays properly.&lt;/p&gt;
&lt;p&gt;There are some other values that do this too, though most store properly.&lt;br/&gt;
Using RecipeManCommands function block to load and save recipes.&lt;br/&gt;
The arrays which hold the recipe values are defined like this:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="nt"&gt;in&lt;/span&gt; &lt;span class="nt"&gt;global&lt;/span&gt; &lt;span class="nt"&gt;variable&lt;/span&gt; &lt;span class="s2"&gt;"rec"&lt;/span&gt;
    &lt;span class="nt"&gt;Cmd&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;RecipeManCommands&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;ActiveRecipeDef&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;STRING&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="s1"&gt;'RecipeDef01'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;  &lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="nt"&gt;The&lt;/span&gt; &lt;span class="nt"&gt;current&lt;/span&gt; &lt;span class="nt"&gt;active&lt;/span&gt; &lt;span class="nt"&gt;recipe&lt;/span&gt;
    &lt;span class="nt"&gt;ActiveRecipeIndex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;INT&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;0&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;   &lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="nt"&gt;The&lt;/span&gt; &lt;span class="nt"&gt;index&lt;/span&gt; &lt;span class="nt"&gt;of&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;current&lt;/span&gt; &lt;span class="nt"&gt;active&lt;/span&gt; &lt;span class="nt"&gt;recipe&lt;/span&gt;
    &lt;span class="nt"&gt;sRecipeNames&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;ARRAY&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="bp"&gt;..&lt;/span&gt;&lt;span class="nx nx-Member"&gt;max_recipes&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt; &lt;span class="nt"&gt;OF&lt;/span&gt; &lt;span class="nt"&gt;STRING&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;    &lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="nt"&gt;Array&lt;/span&gt; &lt;span class="nt"&gt;of&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;recipe&lt;/span&gt; &lt;span class="nt"&gt;names&lt;/span&gt;
    &lt;span class="nt"&gt;sRecipeVariableNames&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;ARRAY&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="bp"&gt;..&lt;/span&gt;&lt;span class="nx nx-Member"&gt;max_Variables&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt; &lt;span class="nt"&gt;OF&lt;/span&gt; &lt;span class="nt"&gt;STRING&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;   &lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="nt"&gt;Array&lt;/span&gt; &lt;span class="nt"&gt;of&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;recipe&lt;/span&gt; &lt;span class="nt"&gt;variable&lt;/span&gt; &lt;span class="nt"&gt;names&lt;/span&gt;
    &lt;span class="nt"&gt;sRecipeValues&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;ARRAY&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="bp"&gt;..&lt;/span&gt;&lt;span class="nx nx-Member"&gt;max_variables&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt; &lt;span class="nt"&gt;OF&lt;/span&gt; &lt;span class="nt"&gt;STRING&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;  &lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="nt"&gt;Array&lt;/span&gt; &lt;span class="nt"&gt;that&lt;/span&gt; &lt;span class="nt"&gt;stores&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;recipe&lt;/span&gt; &lt;span class="nt"&gt;values&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Code to save the current PLC values to the recipe:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;resultSaveRecipe&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Cmd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ReadAndSaveRecipe&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;RecipeDefinitionName&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ActiveRecipeDef&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;RecipeName&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;sRecipeNames&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;rec.ActiveRecipeIndex&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Code that loads the recipe values from the recipe storage to the display arrays&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;        &lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;resultGetRecipeValues&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Cmd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;GetRecipeValues&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;RecipeDefinitionName&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ActiveRecipeDef&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;RecipeName&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;sRecipeNames&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;rec.ActiveRecipeIndex&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;pStrings&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;ADR&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;sRecipeValues&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt;&lt;span class="nt"&gt;iStartIndex&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;0&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;iSize&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;max_Variables&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;iStringLength&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;80&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;resultGetRecipeVariableNames&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Cmd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;GetRecipeVariableNames&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;RecipeDefinitionName&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ActiveRecipeDef&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;RecipeName&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;sRecipeNames&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;rec.ActiveRecipeIndex&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;pStrings&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;ADR&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;sRecipeVariableNames&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt;&lt;span class="nt"&gt;iStartIndex&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;0&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;iSize&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;rec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;max_Variables&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Project Info:&lt;br/&gt;
Codesys Version 3.5.16.40 64bit&lt;br/&gt;
RecipeManagement 3.5.16.40&lt;br/&gt;
Recipe Storage Textual&lt;br/&gt;
Using Comma separator&lt;br/&gt;
Recipe Management in the PLC&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>