No announcement yet.

Newbie help - no events?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Newbie help - no events?

    Hello all,
    I just bought one of the Gen4 units to trial as a replacement for another HMI (Nextion). However, when I try to add events to objects using ViSi Genie...I have no options on most objects. Some of them do have a "report message" option, but that is it. Is this a defect or is there an "add event" option somewhere that I am not finding? I feel sure this is something

    edit: Once I posted, I did find other objects with more events. I am just trying to add a simple event to a primitive...or maybe have the option to trigger an event when clicking a picture.

    edit: I am just looking to handle touch events on objects in code. Is this inherent?
    Last edited by Bogaat; 7 October 2017, 07:25 AM.

  • #2

    Welcome to the Forum.

    You will find more events become available the more you add to a form. eg. If you add an LedDigits object and then a Slider object, the LedDigits event will be shown in the Slider events.

    The way in which you can have a picture you can click on is to add a User Button and use you picture as an image for the button.

    I hope this helps

    Best regards



    • #3 is all about the Magic options. I didn't see those until I enabled the Pro trial. Suggestion: Disable the Pro controls on the free version...don't hide them! When I first tried Genie last year, I thought it worthless. I assumed I needed to write 4dgl...which I did not have time for. I see now that I just needed to go Pro to get the features I required. I do find it odd that you can't handle simple touch events in the free version. Is the free version even usable? It just frustrated me and did not provide a step towards purchasing.


      • #4
        I think you are completely missing what Genie is about.

        You don't need PRO to handle simple touch events.

        Please review some of the app notes, so that you understand what genie is and what it can do.


        Genie does everything for you, you only need PRO (Magic) if you want to do very complex stuff.

        It's far, far easier than Nextion (and the touch is reliable and accurate)


        • #5
          First, thank you for the response and the examples. Here are two simple examples that maybe you wouldn't mind assisting with. I am trying to set this screen up as an HMI on Debian controlled by my C++ program. I am not worried about code specifics...just if I need the Pro version or not.
          1) Draw two primitive circle on screen. When the user touches one of the two, I am able to listen for that event in my code and know which one was selected.
          2) Simple form with an image for a background. User touches the screen. I listed for the release event in my code and then change to a new form.

          After seeing magic touch/release/etc, I assumed that Pro would be needed to accomplish these tasks?


          • #6

            Sorry to answer your question with another question. I see that you will communicating via serial using your debian c++ program. Will you want to be drawing the primitives using commands from your program and then looking for a touch response in an area of the screen that matches the primitive that has been drawn.

            There are 2 serial programming environments you can use Visi-Genie and Serial SPE. As you are adding a host and writing your own code it might be worth looking at the Serial SPE environment also. Both versions will need no coding on the display side.

            The Serial command manual can be found here

            You can try the Serial SPE environment by starting a Serial project and Click on Tools followed by Serial Commander

            Best regards



            • #7
              I would prefer to use Visi-Genie. Doesn't make sense to send all of that chatter over serial given my screens are static minus sensor readings. I have looked at examples and it seems straight forward. Just wondering if I will need Pro or not to take advantage of the scenarios mentioned above. Thanks!


              • #8

                Visi-genie was developed to make the best use of the graphic/widget abilities of the display and give the user a platform which is quick and easy to develop and structured in a way that errors can't be made by say allowing a button to be linked to a gauge as the gauge expects a value rather than a state etc.

                But at the same time there are many features that can be used like adding images to buttons etc to give the ability of clicking on a image to change a form etc. Primitives are usually used at design time when creating a form and in Visi-genie cannot be modified at runtime. All touch functions, which are accurate and reliable, are assigned to the object that has touch capability eg buttons, switches and sliders and are handled automatically by the genie environment. This serves 2 purposes, 1 it gives the user the ability to simply add a button which is handled without any additional user code. 2 prevents the user from defining a touch region that would conflict with an object with touch ability.

                The added features of Pro allow the user to add code to Genie to take it beyond its designed use and allows for different use of primitives at runtime and also for extended touch function just as you would in Visi, so for your example, drawing 2 primitive circles at runtime and checking for a touch response in the area of the drawn circle, is beyond the normal use of Visi-genie and would require the use of the Pro features.

                The 4 programming environments allow for all features of the display to be utilized without the need for a Pro license. Most users base their projects on the available programming environments and I have seen some excellent Visi-genie applications created without the Pro features.

                There are other ways you can achieve the circle at different locations by again using a UserButton with the circle as the graphic image and if the likely position of the circle is known then this can be placed on multiple forms and the forms switched to represent the form with the required circle position.

                I hope this helps

                Best regards



                • #9
                  Still a bit confused. Yes or No answer for this question...Can I listen for a touch event in my code coming from objects (button, form, etc) created in the non-Pro version of Visi-Genie?


                  • #10
                    Yes, if you set the the event to Report Message

                    Click image for larger version

Name:	reportmessage.png
Views:	170
Size:	17.6 KB
ID:	59977
                    Attached Files


                    • #11
                      If you are using Genie you can query for a touch on an input object (button, slider, knob, etc.) without using a 'report message'.

                      If you are using SPE you can query for a touch on an any object, or indeed just the screen itself.

                      The PRO version is not needed for either.

                      I'm not sure what you are meaning by 'all that chatter', what you have described is rather simple.

                      But, to change forms you don't even need to use 'report message', Genie can do it without any help at all.

                      Consider the attached, a simple 3 form program with a meter and a gauge.

                      To control that all your code needs to do is write to the meter and the gauge, the form swapping is totally controlled by Genie.

                      Load that into your display and manipulate it using the GTX tool and see what you need to send to the display to make it work.

                      PRO is, again, not required.

                      Perhaps you are trying to see Genie as being like some other language you have used in the past, it isn't much of the housekeeping is done automatically.
                      Attached Files