Showing results 1 to 9 of 9

Thread: Function and scripts

  1. #1
    Join Date
    06.07.2020
    Posts
    6

    Default Function and scripts

    I have a pop up Image with some pushbottoms, eachone writes a different number in the same  variable A; now i need more pushbottoms (to write more numbers) so i copy the pop up with all pushbottoms  changing their functions  and scripts (just the value written). The result is that all new pushbottoms write the same number in the variable A. Someone could tell me where i'm wrong, please?

    (Zenon 6.22) 

  2. #2
    Join Date
    10.12.2007
    Posts
    235

    Default AW: Function and scripts

    Did you configure all the functions properly and link them to the right buttons? Maybe you are always calling the same picture with the same functions.
    Click and hold the right mousbutton (=RMB) on a free space of the popup screen during RT (showing name of the picture), if the screen is ok, check the functions on your pushbuttons by click and hold RMB (showing function name). If screen and functionnames seem ok, check the values in your SetValue Functions.

  3. #3
    Join Date
    06.07.2020
    Posts
    6

    Default Re: AW: Function and scripts

    Thanks mst
    To check the values in the SetValue Functions I see just this: from "Functions" i have for each pushbuttom 1 Script with 3 functions, for example pushbottom1: 

     setValue--VariabileA--20
     setValue--VariabileB--ON
     close image.

    Is it this all i can Check?



  4. #4
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    917

    Default Re: Function and scripts

    when you link with a button not a function but a script, then in the background, the zenon Editor automatically creates a new, additional function calling this script an links this additional function with the button. So it only looks that button is linked with a script, but in real - in both cases the button is linked with some function.

    Are your buttons then linked with different functions calling different scripts?

  5. #5
    Join Date
    06.07.2020
    Posts
    6

    Default Re: Function and scripts

    Thanks
    ursulak and all
    As you can see the attached screenshots, each pushbottoms has different parameter;
    It seems that the variable written has a limit , but i cheked and it doesn t

    I really don t know how to solve it

    For mst
    Later i'll try on RT


    Attached Thumbnails Attached Thumbnails scelta_ricetta2.bmp   scelta_ricetta2_2.bmp   scelta_ricetta2_3.bmp  

  6. #6
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    917

    Default Re: Function and scripts

    your screenshots are from Editor set to use language I do not understand, so i'm not able to guess what settings you show. For publishing screenshots switch Editor to English.
    The relevant things are button property 'function', then this function calling script, and this script. If I right understand your use case, than by each button it should be another function calling another script.
    Last edited by ursulak : 5th August 2020 at 12:05

  7. #7
    Join Date
    06.07.2020
    Posts
    6

    Default Re: Function and scripts

    Here switched to english

    Thanks!
    Attached Thumbnails Attached Thumbnails scelta_ricetta2.bmp   scelta_ricetta2_2.bmp   scelta_ricetta2_3.bmp   scelta_ricetta2_4.bmp   scelta_ricetta2_5.bmp  

    scelta_ricetta2_6.bmp  

  8. #8
    Join Date
    10.12.2007
    Posts
    235

    Default AW: Function and scripts

    Looks like you have only Variables linked to the buttons but no functions to call the scripts. (You can use a button to directly switch a binary variable without function).
    If you want to execute a script you must not link a variable and make the button a switch

  9. #9
    Join Date
    06.07.2020
    Posts
    6

    Default Re: Function and scripts

    OK I think it is solved; i 've found the same function, for all pushbottom, launched from limit2 propriety of a variable; later i'll try on RT

    Thanks

Similar Threads

  1. Function scripts can not delete
    By skywalker in forum zenon Supervisor
    Replies: 3
    Last Post: 16th February 2016, 10:05
  2. Function/ scripts can not be deleted
    By skywalker in forum zenon Supervisor
    Replies: 0
    Last Post: 22nd January 2016, 06:43
  3. VB scripts for WindowsCe platforms
    By martinw in forum zenon Operator
    Replies: 1
    Last Post: 12th June 2012, 13:21
  4. VBA scripts by alarms events
    By captain in forum VBA
    Replies: 2
    Last Post: 14th August 2008, 09:30
  5. Renaming scripts loses the link at the function
    By markclemens in forum zenon Supervisor
    Replies: 0
    Last Post: 3rd August 2007, 07:23

Tags for this Thread

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •