adccommunitymod (AutomationDirect) asked a question.

Cmore Recipe Database Editing from event tag and not recipe call ?

Created Date: June 30,2016

Created By: veeru612

**** 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.****

Hi, I am fairly new to this PLC environment and I come from a .NET background. I am trying to refurbish an old code and loved the concept of recipe in the Cmore. I have lot of columns in the recipe sheet and it's a pain to navigate through the recipe call object. I was wondering if there is a way to edit the elements in the database from a text box button instead of calling the recipe sheet. I want to find an alternative way of editing a recipe database than the attached pic. thanks, Veeru


  • adccommunitymod (AutomationDirect)

    Created Date: June 30,2016

    Created by: veeru612

    Hi,

    I am fairly new to this PLC environment and I come from a .NET background.

    I am trying to refurbish an old code and loved the concept of recipe in the Cmore. I have lot of columns in the recipe sheet and it's a pain to navigate through the recipe call object. I was wondering if there is a way to edit the elements in the database from a text box button instead of calling the recipe sheet.

    I want to find an alternative way of editing a recipe database than the attached pic.

    thanks,

    Veeru

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: June 30,2016

    Created by: a agnone

    That would be a cool idea if possible.

  • adccommunitymod (AutomationDirect)

    Created Date: June 30,2016

    Created by: HMI Eng

    You can make the cells in the Recipe sheet tag based and then use the tag in a Numeric or Text Entry object.

  • adccommunitymod (AutomationDirect)

    Created Date: June 30,2016

    Created by: veeru612

    HMI Eng : That's a neat idea but then if I have 100 rows and 30 columns, I need to create 100x30 tags which is easy to do by exporting and importing elements and then use excel. But I also need to create 100 screens if I have to create an edit option for the user. I was just wondering if there is an easier way to do all this like I can give a row number, column number by 2 tags to deal with editing.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: June 30,2016

    Created by: kewakl

    I don't like using hmi recipes. One more layer of going online and finding/changing.

    If the screen goes bonkers, and the latest series of recipe changes are NOT currently backed up, you lose that.

    You could use ONE screen with abstract tags that are referenced by RECIPE number.

    On load, copy the hard recipe tags to the abstract tags . on recipe save copy abstract tags to hard recipe tags .

    I don't know your plc, so I will use click naming.

    In cmore have a screen with your recipe editor.

    Recipe Number DS100

    abstract tags

    Time DS101

    Temp DS102

    Pressure DS103

    Cycles DS104

    Recipe 1 2 3

    hard recipe tags

    Time DS111 DS121 DS131

    Temp DS112 DS122 DS132

    Pressure DS113 DS123 DS133

    Cycles DS114 DS124 DS134

    On recipe load (ex. recipe 1 =>> DS100 = 1)

    Do math to calc offset into recipe table

    Math DS99=(DS100-1) + 111 where 111 is the start of the recipe tables --- arbitrarily picked for this demo

    Copy DS to DS101 copies DS111 to DS101

    increment ds99

    Copy DS to DS102 copies DS112 to DS102

    increment ds99

    Copy DS to DS103 copies DS113 to DS103

    increment ds99

    Copy DS to DS104 copies DS114 to DS104

    the destination can also be calculated, but for 4 tags, it is a bit much

    when the recipe is edited on the screen,

    compare DS101 to DS of Time

    compare DS102 to DS of Temp

    compare DS103 to DS of Pressure

    compare DS104 to DS of Cycles

    if anything is different, then a changes has happened, enable SAVE and LOAD buttons

    On Load button,reload do the above math/copy to reload original values

    On Save button, do reverse math to copy edited values to the recipe table at calculated valueoffsets

    If this is interesting, let me know. I can post the snippets of a CLICK program that I have that has 50 recipes with 7 parameters AND 15 or 16 character RECIPE NAMES.

    I don't want to post the code required for retaining the TXT values cause it is big and ugly--but it works.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: June 30,2016

    Created by: veeru612

    kewakl - Thank you so much for a detailed explanation. I am using Do-More. I thought about this approach but felt it would be lil painful - use tags in the PLC and store data instead of doing it in the HMI. On screen load, use the recipe index and create a look up table of sorts (I did similar thing like you mentioned regarding the memory address for easy programming). C-More has a nice recipe database management with retentive internal tags, it would be unfair if they just left it like that. Thanks for your idea, I would probably use your approach unless there is an easier way out with C-More. Please post the code, I would love to take a look and would adapt it for my work.

    I have just started doing things in PLC, I find it a bit tedious to do For-loop in a separate task in do-more, doing a FIFO was easy- DoMore has lot of nice tools, C-More seems to have them too but I haven't been comfortable with it yet.

    Thank you so much again,

    Regards,

    Veeru

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: July 01,2016

    Created by: kewakl

    I'll have to post as image, I cannot attach files. I guess I'm special .

    I'll add rung comments following each image (I may want to update/explain a rung comment better.) I cannot edit posts with images. I get locked out for 10 minutes.

  • adccommunitymod (AutomationDirect)

    Created Date: July 01,2016

    Created by: kewakl

    Rung comments to follow image.

    Rung1

    The math in this section is explicit.

    The values that remain hard-coded are not combined, so that the VALUES can remain understandable.

    eg.

    ( ( ( DS920 - 1 ) * 16 ) + 100 + 1 )

    DS920 is the recipe manager - current recipe number

    recipe name storage begins at TXT101

    -1 provides a ZERO-OFFSET into the TXT table

    16 is the length of the recipe name storage

    100 is the offset of the recipe name storage in the TXT table

    1 provides an offset to the correct TXT register

    Note that MATH 100 + 1 is maintained as separate values so that indexing through each recipe name's characters can be done without handling the +1 / -1 - We may want to make these value into variable (tag) names later.

    ASSUME:

    DS920 = 5

    Recipe Name Length = 16

    Recipe Names start at TXT101 (100 + 1)

    ( ( ( 5 - 1 ) * 16 ) + 100 + 1 )

    ( ( ( 4 ) * 16 ) + 100 + 1 )

    ( ( 64 ) + 100 + 1 )

    ( 164 + 1 )

    ( 165 )

    Thus TXT165 is the start of the recipe name for recipe 5.

    Rung 5 limit recipe scrolling from 1 to 50 with wrap-around

    Rung 7 detect recipe number has changed

    (This is NOT a recipe setting change detection!!!)

    Rungs 2/3 allow cycling through recipes on CMORE. I also can select by NUMBER of the recipe on CMORE.

    Rungs 5/6 limit recipe number to 1-50 - my limit. I used 16 TXT characters for each recipe name 16 * 50 = 800(out of 1000). I had to have some working TXT registers, so 16 chars and 50 recipes was a good trade-off.

    Using the method described here, it is just as easy to have 50 recipes as it is to have 3, so I went full-bore and allowed 50. If I need less, I can limit the '50 ' in rung 6 and change the limit on the Numeric Entry object in CMORE.

    Expand Post
10 of 30