adccommunitymod (AutomationDirect) asked a question.

More whacked P3K displayed data

Created Date: September 02,2017

Created By: kewakl

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

-- P3-550 FW 1.1.15.101 SW 1.10.2.2 I have Compare Strings and Compare Values instructions in a loop. I am comparing array elements using the current recipe and Current loop count. I am trying to test if recipe entries have changes. . SearchTrig +--------------------------------------------------- . C_000029 | For .----------------] _IsDirty_Loop . +--------------------------------------------------- . . So far, so good +------------------------------------------------------------------------------------------------- . | Compare Strings Equal C_000024 .----------------------------+ 1 . | Input 1 _LineItems_EDIT(1) . | Recipe 1 Line 1 . | Input 2 _Recipe_LineItems(1) . | Recipe 1 Line 1 . | Num Chars 50 . +------------------------------------------------------------------------------------------------- . . not so good +------------------------------------------------------------------------------------------------- . | Compare Strings Equal _LineItemEditActive .----------------------------+ 1 . | Input 1 _LineItems_EDIT( IsDirty_Loop) . There ARE NO K 's | K . in this data | Input 2 _Recipe_LineItems( _RecipeNumber),( IsDirty_Loop) . But we are displaying K 's | K . | Num Chars 50 . +------------------------------------------------------------------------------------------------- . . . not so good +------------------------------------------------------------------------------------------------- . | Compare Values Equal To _LineValueEditActive .----------------------------+ 0 . | Input 1 _LineValues_EDIT( IsDirty_Loop) . | K . We are displaying K 's | Input 2 _Recipe_LineValues( _RecipeNumber),( IsDirty_Loop) . for an S32 array entry | K . | Num Chars 50 . +------------------------------------------------------------------------------------------------- . . . . could be good +------------------------------------------------------------------------------------------------- . | Compare Strings Equal _LineUnitEditActive .----------------------------+ 1 . | Input 1 _LineUnits_EDIT( IsDirty_Loop) . | K . | Input 2 _Recipe_Units( _RecipeNumber),( IsDirty_Loop) . | K . | Num Chars 4 . +------------------------------------------------------------------------------------------------- . . . +--------------------------------------------------- . | Next .----------------------------+ . +--------------------------------------------------- . . SearchTrig . C_000029 .-----------------------------(RST) . Yes, I know that I have some naming convention issues, but as this is PoC, it is not a problem. Edits: Naming convention note Swapped Array dimension params for debugging before initial post, so I fixed that! Thought all of these issues were fixed in 2.4.4.1 - hmm. seems not. ---------------------------------------Further edits resolve my issue. It was NOT a problem with V2.4.4.1


  • adccommunitymod (AutomationDirect)

    Created Date: September 02,2017

    Created by: kewakl

    --

    P3-550

    FW 1.1.15.101

    SW 1.10.2.2

    I have Compare Strings and Compare Values instructions in a loop. I am comparing array elements using the current recipe and Current loop count.

    I am trying to test if recipe entries have changes.

    . SearchTrig +---------------------------------------------------

    . C_000029 | For

    .----------------] _IsDirty_Loop

    . +---------------------------------------------------

    .

    . So far, so good +-------------------------------------------------------------------------------------------------

    . | Compare Strings Equal C_000024

    .----------------------------+ 1

    . | Input 1 _LineItems_EDIT(1)

    . | Recipe 1 Line 1

    . | Input 2 _Recipe_LineItems(1)

    . | Recipe 1 Line 1

    . | Num Chars 50

    . +-------------------------------------------------------------------------------------------------

    .

    . not so good +-------------------------------------------------------------------------------------------------

    . | Compare Strings Equal _LineItemEditActive

    .----------------------------+ 1

    . | Input 1 _LineItems_EDIT( IsDirty_Loop)

    . There ARE NO K 's | K

    . in this data | Input 2 _Recipe_LineItems( _RecipeNumber),( IsDirty_Loop)

    . But we are displaying K 's | K

    . | Num Chars 50

    . +-------------------------------------------------------------------------------------------------

    .

    .

    . not so good +-------------------------------------------------------------------------------------------------

    . | Compare Values Equal To _LineValueEditActive

    .----------------------------+ 0

    . | Input 1 _LineValues_EDIT( IsDirty_Loop)

    . | K

    . We are displaying K 's | Input 2 _Recipe_LineValues( _RecipeNumber),( IsDirty_Loop)

    . for an S32 array entry | K

    . | Num Chars 50

    . +-------------------------------------------------------------------------------------------------

    .

    .

    .

    . could be good +-------------------------------------------------------------------------------------------------

    . | Compare Strings Equal _LineUnitEditActive

    .----------------------------+ 1

    . | Input 1 _LineUnits_EDIT( IsDirty_Loop)

    . | K

    . | Input 2 _Recipe_Units( _RecipeNumber),( IsDirty_Loop)

    . | K

    . | Num Chars 4

    . +-------------------------------------------------------------------------------------------------

    .

    .

    . +---------------------------------------------------

    . | Next

    .----------------------------+

    . +---------------------------------------------------

    .

    . SearchTrig

    . C_000029

    .-----------------------------(RST)

    .

    Yes, I know that I have some naming convention issues, but as this is PoC, it is not a problem.

    Edits:

    Naming convention note

    Swapped Array dimension params for debugging before initial post, so I fixed that!

    Thought all of these issues were fixed in 2.4.4.1 - hmm. seems not. ---------------------------------------Further edits resolve my issue. It was NOT a problem with V2.4.4.1

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: September 02,2017

    Created by: kewakl

    Datatable info for initial post

    The forum automatically makes this data into a table. I changed font for alignment

    This array is STRING type. It will contain the String Names for chemicals in the recipes.

    I will section it up into individual recipes as required.

    The displayed data is only for development.

    . Tagname Value Edit

    _Recipe_LineItems(1),(1)

    Recipe 1 Line 1

    Recipe 1 Line 1

    _Recipe_LineItems(1),(2)

    Recipe 1 Line 2

    Recipe 1 Line 2

    _Recipe_LineItems(1),(3)

    Recipe 1 Line 3

    Recipe 1 Line 3

    _Recipe_LineItems(1),(4)

    Recipe 1 Line 4

    Recipe 1 Line 4

    _Recipe_LineItems(1),(5)

    Recipe 1 Line 5

    Recipe 1 Line 5

    _Recipe_LineItems(1),(6)

    Recipe 1 Line 6

    Recipe 1 Line 6

    _Recipe_LineItems(1),(7)

    Recipe 1 Line 7

    Recipe 1 Line 7

    _Recipe_LineItems(1),(8)

    Recipe 1 Line 8

    Recipe 1 Line 8

    _Recipe_LineItems(1),(9)

    Recipe 1 Line 9

    Recipe 1 Line 9

    _Recipe_LineItems(1),(10)

    Recipe 1 Line 10

    Recipe 1 Line 10

    This is the PARCEL of data for recipe number 1.

    Again, The displayed data is only for development.

    . Tagname Value Edit

    _LineItems_EDIT(2)

    Recipe 1 Line 2

    _LineItems_EDIT(3)

    Recipe 1 Line 3

    _LineItems_EDIT(4)

    Recipe 1 Line 4

    _LineItems_EDIT(5)

    Recipe 1 Line 5

    _LineItems_EDIT(6)

    Recipe 1 Line 6

    _LineItems_EDIT(7)

    Recipe 1 Line 7

    _LineItems_EDIT(8)

    Recipe 1 Line 8

    _LineItems_EDIT(9)

    Recipe 1 Line 9

    _LineItems_EDIT(10)

    Recipe 1 Line 10

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: September 02,2017

    Created by: kewakl

    Datatable info for initial post

    The forum automatically makes this data into a table. I changed font for alignment

    This array is STRING type. It will contain the String Names for chemicals in the recipes.

    I will section it up into individual recipes as required.

    The displayed data is only for development.

    . Tagname Value Edit

    _Recipe_Values(1),(1)

    11

    11

    _Recipe_Values(1),(2)

    22

    22

    _Recipe_Values(1),(3)

    33

    33

    _Recipe_Values(1),(4)

    44

    44

    _Recipe_Values(1),(5)

    55

    55

    _Recipe_Values(1),(6)

    66

    66

    _Recipe_Values(1),(7)

    77

    77

    _Recipe_Values(1),(8)

    88

    88

    _Recipe_Values(1),(9)

    99

    99

    _Recipe_Values(1),(10)

    1010

    1010

    This is the PARCEL of data for recipe number 1.

    Again, The displayed data is only for development.

    . Tagname Value Edit

    _LineValues_EDIT(1)

    11

    0

    _LineValues_EDIT(2)

    22

    0

    _LineValues_EDIT(3)

    33

    0

    _LineValues_EDIT(4)

    44

    0

    _LineValues_EDIT(5)

    55

    0

    _LineValues_EDIT(6)

    66

    0

    _LineValues_EDIT(7)

    77

    0

    _LineValues_EDIT(8)

    88

    0

    _LineValues_EDIT(9)

    99

    0

    _LineValues_EDIT(10)

    1010

    0

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: September 02,2017

    Created by: kewakl

    Datatable info for initial post

    The forum automatically makes this data into a table. I changed font for alignment

    This array is STRING type. It will contain the String Names for chemicals in the recipes.

    I will section it up into individual recipes as required.

    The displayed data is only for development.

    . Tagname Value Edit

    _Recipe_Units(1),(1)

    A

    A

    _Recipe_Units(1),(2)

    B

    B

    _Recipe_Units(1),(3)

    C

    C

    _Recipe_Units(1),(4)

    D

    D

    _Recipe_Units(1),(5)

    E

    E

    _Recipe_Units(1),(6)

    F

    F

    _Recipe_Units(1),(7)

    G

    G

    _Recipe_Units(1),(8)

    H

    H

    _Recipe_Units(1),(9)

    J

    J

    _Recipe_Units(1),(10)

    K

    K

    . ^

    . + THIS is the source of the K in the initial post.

    . If I change this tag, the compare instructions display the contents of this tag after the loop is enabled.

    This is the PARCEL of data for recipe number 1.

    Again, The displayed data is only for development.

    . Tagname Value Edit

    _LineUnits_EDIT(1)

    A

    _LineUnits_EDIT(2)

    B

    _LineUnits_EDIT(3)

    C

    _LineUnits_EDIT(4)

    D

    _LineUnits_EDIT(5)

    E

    _LineUnits_EDIT(6)

    F

    _LineUnits_EDIT(7)

    G

    _LineUnits_EDIT(8)

    H

    _LineUnits_EDIT(9)

    J

    _LineUnits_EDIT(10)

    K

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: September 02,2017

    Created by: kewakl

    Follow up: If I unroll the loop, I can get this to work and display correctly.

    If I open in V2.4.4.1, problem is gone.

  • adccommunitymod (AutomationDirect)

    Created Date: September 03,2017

    Created by: kewakl

    I though that all issues with the initial post were resolved when I switched to 2.4.4.1. No - it seems.

    I still have this: (with some edits from above to make MaxRecipes and Recipe_MaxLength things easier to handle)

    . SearchTrig +---------------------------------------------------

    . C_000029 | For

    .----------------] _MaxRecipeSteps _IsDirty_Loop

    . | 11 11

    . +---------------------------------------------------

    .

    . +--------------------------------------------------------------------------------------------------

    . | Compare Strings

    .----------------------------+ Input 1 _LineUnits_EDIT( _IsDirty_Loop) Equal To _NO_LineUnitEditActive

    . | M 1

    . Somehow, M = F | Input 2 _Recipe_Units( _RecipeNumber),( _IsDirty_Loop)

    . | F

    . | NumChars 4

    . +--------------------------------------------------------------------------------------------------

    .

    .

    . +---------------------------------------------------

    . | Next

    .----------------------------+

    . +---------------------------------------------------

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: September 03,2017

    Created by: kewakl

    { "data-align ": "none ", "data-size ": "large ", "data-attachmentid ":107895}

  • adccommunitymod (AutomationDirect)

    Created Date: September 03,2017

    Created by: kewakl

    I thought that the issues were resolved with V2.4.4.1. No. EDIT: I found my error. Noted in text at the bottom of this post.

    I have this issue

    { "alt ": "Click image for larger version Name:\tcmps.png Views:\t1 Size:\t92.3 KB ID:\t107897 ", "data-align ": "none ", "data-attachmentid ": "107897 ", "data-size ": "thumb "}

    But hey, I can attach again! Just tested/verified this morning.

    What I am attempting to do is compare all entry values of the current recipe to the STORED values to determine a change. --- IsDirty

    With this change detection, I can prompt for a reload/save/cancel.

    The For loop instruction loops through the recipe line-items.

    The Compare instructions use the CURRENT RECIPE NUMBER _RecipeNumber and the CURRENT LINE ITEM INDEX _IsDirty_Loop (as indexes to arrays) to check if the items match.

    If the items DO NOT match, SET a bit that indicates that a specific instruction match failed (edits active).

    Outside the loop, I check the specific instruction match fails to indicate a dirty (edits pending) recipe form.

    The disabled rung was a HARD-CODED array index example to prove that the data was accurate - and that v1.10 was failing to get the job done.

    EDIT: I used the same tag as the result in the last two String Compare instructions!

    I used a new tag pair for the RecipeName edit check and this problem is gone!

    The SAVE prompt works!

    ---no frogs were hurt during the development of this recipe system.

    Expand Post