Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

custom visualization control (elements)

smarmiroli
2020-10-26
2020-10-27
  • smarmiroli - 2020-10-26

    I need to generate controls with a particular aspect, I realize that there are many problems with existing controls, how can I generate custom controls?
    BR
    Stefano Marmiroli

     
  • Morberis

    Morberis - 2020-10-26

    That depends on what you need or want to do...

    Do you want to make use of the generic elements in the visualization editor to make custom items, like turning a rectangle into a button, an indicator 'light', or to display variables?

    Or do you want to make custom elements like this 7 segment display?

    Then you might need to contact the sales department for the Visu Element Toolkit, reference for that is below

    https://forge.codesys.com/forge/talk/Engineering/thread/3fd19459ff/

    You might want to check out some of the example projects on the forge to see how they built up custom elements using the vanilla tools. Maybe you can do what you want, maybe you can't. Maybe also check out the Codesys Help page or some tutorials to get a better idea.

     

    Last edit: Morberis 2020-10-26
  • smarmiroli - 2020-10-26

    for the moment I would be satisfied with having an input variable that could load an image id, however, making the dialog box for loading images appear at the assign parameter time in the project.
    thanks

    P.S.
    what do you mean with "contact the sales department" ?

     
  • smarmiroli - 2020-10-26

    ..also using an input variable to define with and height..

     
  • Morberis

    Morberis - 2020-10-26

    You can do all of those things, but I need to look into changing the width and height with variables...

    To contact the sales department there is a button at the bottom of the codesys store page. The My Question button at the top would probably also work. I do believe Visu Element Toolkit is not particularly cheap though, but I don't know.

    The first thing to check is that when you are looking at the properties tab for a visualization element that you have advanced or expert mode enabled. It's a little check box at the top next to 'filter', 'sort by', and 'sort order'.

    The first way is to just make an element invisible and make another element visible. This can be pretty seamless and allows you to have wildly different elements appear or disappear.

    To see how to change a displayed image dynamically check out this page from the codesys help webpage. So to do this you'll need a variable that has the image ID and then a UI to change that variable.

    I'm not sure what you mean by "making the dialog box for loading images appear at the assign parameter time in the project".

    To change the width, height an element... I will have to take a look at tomorrow. At first glance that might not be possible. You can scale but that doesn't let you change the width or height independently. Maybe someone like @eschwellinger could advise you on that.

     

    Last edit: Morberis 2020-10-26
    • smarmiroli - 2020-10-27

      the advanced mode check is enabled

       

      Last edit: smarmiroli 2020-10-27
    • smarmiroli - 2020-10-27

      I also believe that Visu Element Toolkit is not particularly cheap, but I will try your suggestions and see what I can do
      BR

       
  • m.prestel - 2020-10-27

    You can always create a visualization, implement everything you need there and reference this visu in a frame

     
    • smarmiroli - 2020-10-27

      I tried but I was unable to make these variables settable in the dialog box for assign parameter in the project at the time of the visu implementation, please note that I am building a library and that users will only have these variables available to adjust the visualization properties
      BR

       
      • m.prestel - 2020-10-27

        I am sorry but I do not get your problem.

        Could you elaborate?

        Best regards,
        Marcel

         
        • smarmiroli - 2020-10-27

          ok.
          Of course , if you make a library, the user can only view the input and or output data of the visualization page, this variable are settable in the dialog box for assign parameter at the project time, what if i wont the user to be able to change an image? you have to put the image ID as input of the visualization page .. so the user must be guided to load the image from the imagepool he prefer..
          BR

           
          • m.prestel - 2020-10-27

            So your problem is that there is not input assistance if you want to reference an image?

             
            • smarmiroli - 2020-10-27

              more or less , this is one of the many problem..
              I would like also hide some properties from the end user and instead would like the user to have some other property available as input but this could be considered a later problem.. not input assistance for reference an image is a good starting

               
            • smarmiroli - 2020-10-27

              more or less , this is one of the many problem..
              I would like also hide some properties from the end user and instead would like the user to have some other property available as input but this could be considered a later problem.. input assistance for reference an image is a good starting

               

              Last edit: smarmiroli 2020-10-27
              • m.prestel - 2020-10-27

                I noted your use case.

                Best regards,
                Marcel

                 
                πŸ‘
                1

Log in to post a comment.