Announcement

Collapse
No announcement yet.

OnEvent handler-Serial communication- visigene environment

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

  • #46
    Thanks for the quick response :

    1- In regarding to the timer :-
    I add the following magic code:

    func refreshinc()
    img := file_LoadImageControl("WAF001~1.dat", "WAF001~1.gci", 0);
    gfx_Cls();
    img_Show(hndl,ALL);
    endfunc

    then I set the timer to call this function as following :-
    sys_SetTimer(TIMER0,100) ;
    sys_SetTimerEvent(TIMER0,refreshinc);

    Timer0 proprties as in the attached pic.

    but the timer is not triggered every 100 msec ? so if you can help in using a timer to do that will be great

    2- In regarding to fixing the original issue (that the objects keep dissapearing )
    I think I know why, I found a bug in the code [xxxxxxx.4DGenieS] that is produced by the geni objects which is in the
    updateobject () function. It has an IF statement that prevents the function to be executed when nothing had pressed. if we removed the IF statement then the objects will get updated continuously and they won't disappear . That being said, I tried to do that by opening the .inc file in notepad++ and save it but if I recompiled it gets over written, so is there a way to recompile with this line commented out just to test my theory ?

    3- in regarding to the serial handler , is it possible to copy the one already exist in the geni and paste it in the visi to use it?


    4- Last thing why when I use img_show(hndl,ALL) it redraw only the objects what about the string and the labels ?
    Attached Files
    Last edited by bemin; 23 January 2020, 11:02 PM.

    Comment


    • #47
      Hi,

      I will try to answer your questions but I may need to do more tests. Updating this often can lead to problems as this is all your display will be able to do so we might have to further analyse your original issue again.

      1. The img := file_LoadImageControl("WAF001~1.dat", "WAF001~1.gci", 0); shouldn't need to be called each time and it is likely that your 100msec isn't long enough to allow everything in the function to happen but I will do some test's. I assumed the disappearing objects occured over a longer period of time. I really need to pinpoint that problem

      2. This file is created in every compile so it will always overwrite what you have changed. This won't be the cause and is there to avoid re-drawing an object that hasn't changed state or value so that the display isn't busy re-drawing objects that don't need re-drawing but I can see how it would seem like a solution.

      3. It is possible to save your Genie project as a Visi project for you to look at how the Genie code works. With your open project, click on Save As and then change the Save as type to Visi Projects and give the project a different file name.

      4. The strings will not be populated with the string when it is redrawn, this would have to be entered again

      I will keep you update on the initial problem. It is likely to be something simple we are not noticing

      Best regards

      Paul

      Comment


      • #48
        Okay please, keep an eye on that.

        You said " 4. The strings will not be populated with the string when it is redrawn, this would have to be entered again"

        How can I do that programmaticallty

        Comment

        Working...
        X