Announcement

Collapse
No announcement yet.

C-more Programming Software, Parametric Object Instantiation

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts


  • C-more Programming Software, Parametric Object Instantiation

    Greetings,
    I need to recreate a set of objects and their layout several times in the same project. Is there a way to parametrically instantiate objects and/or screens in C-more?

    A simplified example: I have a set of pumps, P-100 through P-xxx, that each need the same on-screen controls (enable/disable, auotmatic/manual, setpoint/output command, etc). I'd like to make this a modal dialog that appears when the user presses the pump object.

    I can image one way to do this would be to define a set of objects as a template and then prefix all the tags used in that set with some label (i.e. "SETPOINT" becomes "P-100 SETPOINT").

    I've read through the documentation for User Library objects, but it isn't clear if there's a way one can add a prefix to all tags used in a set of objects other than manually editing them through the UI. Needless to say, this would be a tedious and error-prone task.

    Is there a way to import object parameters from a CSV file? Maybe a scripting system that lets me programatically switch tags on an object at runtime in response to some UI event?

    I'm sure I'm not the only person with this kind of application, and I'd love to know how others have solved this problem.

    Thanks,
    Bill


  • #2
    depending on which plc you're using you can export your tags to csv. then import to cmore. create your template screen using those tags. all tags would need to be individually created in the plc software and then exported.
    Last edited by quaizywabbit; 08-17-2018, 02:42 PM.

    Comment



    • #3
      quaizywabbit, is there a way to change all the tags at once, or does one have to manually edit each object through the edit dialog?

      Comment



      • #4
        Originally posted by crashkopf View Post


        A simplified example: I have a set of pumps, P-100 through P-xxx, that each need the same on-screen controls (enable/disable, auotmatic/manual, setpoint/output command, etc). I'd like to make this a modal dialog that appears when the user presses the pump object.


        very similar to recipes. you create a working set (all the buttons or whatnot for each pump, which are arrays or groups of arrays of differing types working from a single index) you use an index to tell the plc which pump youre referring to. sorry it didnt dawn on me what you were trying to do at first
        Last edited by quaizywabbit; 08-17-2018, 03:03 PM.

        Comment



        • #5
          Originally posted by crashkopf View Post
          quaizywabbit, is there a way to change all the tags at once, or does one have to manually edit each object through the edit dialog?
          usually easier in excel btw which plc are you using?

          Comment



          • #6
            Originally posted by quaizywabbit View Post

            usually easier in excel btw which plc are you using?
            Productivity 2000.

            Comment



            • #7
              Do all pumps need to be displayed at the same time-- or do you wish to select a pump to view/modify.

              I know of a total of ZERO capability for prefixing or parameterizing objects in cmore.
              If you need to put ONE pump object on the screen and then select a pump to view/mod, that can be done.
              Last edited by kewakl; 08-17-2018, 03:32 PM.

              Comment



              • #8
                Originally posted by quaizywabbit View Post

                very similar to recipes. you create a working set (all the buttons or whatnot for each pump, which are arrays or groups of arrays of differing types working from a single index) you use an index to tell the plc which pump youre referring to. sorry it didnt dawn on me what you were trying to do at first
                Interesting idea! I hadn't thought to handle this sort of input multiplexing in the PLC. I'll see if I can come up with a scheme to make it work.

                Comment



                • #9
                  Originally posted by kewakl View Post
                  Do all pumps need to be displayed at the same time-- or do you wish to select a pump to view/modify.

                  I know of a total of ZERO capability for prefixing or parameterizing objects in cmore.
                  If you need to put ONE pump object on the screen and then select a pump to view/mod, that can be done.
                  The screens are divided by subsystem or process loop, each screen displaying a part of the plumbing and instrumentation diagram. Some subsystems have multiple pumps, while others have just one. Since most pumps need the same controls it would be desirable to create a uniform interface, both from the standpoint of the operator and the programmer.

                  I've made a modal dialog with controls that pops up when the operator presses the pump on the diagram. I could make one for each pump, but it would be a lot of data entry, and I'm sure I'd miss a tag here or there.

                  Comment



                  • #10
                    Attached is an example project which I hope can roughly demonstrate what I'm trying to do.

                    Note: the forum software rejects attachments with the ".eap9" file extension, so I put it in a .zip archive.
                    Attached Files

                    Comment



                    • #11
                      Will you only have that ONE dialog that will point to a specific pump?
                      If so, you can make arrays of pump properties.
                      In that PAC, make the Pump bitmap button tag copy a number (that equates to the specific pump) to an array index - pointer.



                      Instead of all the above blather, how about a demo project? - I used your project for ideas.
                      I do not have a P2 or an EA9, so I opted for a P3 and EA7-T6.
                      You can translate it to your hardware. If you have questions, ask.
                      [EDIT] reference to my blathering
                      Attached Files
                      Last edited by kewakl; 08-17-2018, 10:05 PM.

                      Comment



                      • #12
                        The pump buttons toggle. If you make changes and either press CANCEL or toggle the pump editor off, you lose the edits.
                        If you make changes and press Okay, the edits stick TO THE SELECTED PUMP.
                        If you just touch the individual pump buttons, you can view them - one after another - without entering the editor and exiting the editor to select another pump.

                        Do as you wish with anything I posted in this zip file. (anyone else, also)
                        If you do use it, post a screenshot or two. thanks

                        Comment



                        • #13
                          I do have a version that indicates if any parameter(s) of the selected pump has changed.
                          Also if there exists multiple screens of pumps, you can navigate through those screens.
                          After the parameters of the pumps is determined, the screen dialog built and the pac program tested, adding more screens of pumps is just that, adding more screens. Not more pac code.
                          Attached Files

                          Comment



                          • #14
                            Originally posted by kewakl View Post
                            I do have a version that indicates if any parameter(s) of the selected pump has changed.
                            Also if there exists multiple screens of pumps, you can navigate through those screens.
                            After the parameters of the pumps is determined, the screen dialog built and the pac program tested, adding more screens of pumps is just that, adding more screens. Not more pac code.
                            Very nice! I greatly appreciate your taking my issue on as your weekend project. I feel I owe your one or more of your beverage of choice for your gracious assistance.

                            Comment



                            • #15
                              Originally posted by crashkopf View Post

                              Very nice! I greatly appreciate your taking my issue on as your weekend project. I feel I owe your one or more of your beverage of choice for your gracious assistance.
                              You are welcome. Please, if you can, post a screenshot of the cmore in action.
                              I implemented what quaizywabbit suggested in post 4. (all the buttons or whatnot for each pump, which are arrays or groups of arrays of differing types working from a single index)
                              That is the way I would abstract things in a cmore.

                              In case you missed it in the '_dirty' version, touch the empty field between the popup title and the [Enable | Disable] and [Automatic | Manual] buttons.
                              NAME your pump. Save with [Okay] Ensure that the PumpNames string array is retentive.

                              Comment

                              Working...
                              X