pages IHM staubli

  • Hi guys, I wanted to see if you know if it is possible to have several pages in the HMI, for example, a button in TP that allows changing the HMI screen in the same program. I searched a lot and didn't find a way.
    Another question, I need to generate a random number, but I can't, would there be any function or other measure to obtain a random number in the staubli robot software?

  • Hello,

    On SP1 (CS8 / before SRC7), you need to clear the display (cls()) and rewrite the new page.

    On SP1 (CS8 / SRC7.xx.xx) you can have different page and change with Userpage(scVariable) (scVariable is Screen type)

    On SP2 (CS9) you can create as much as you want with SRS in Interface. You can create menu and change with Userpage("PageName").


    I never us, in robot's program, random Number. Can you explain us why you need this function ?

    Have a good day...

  • Yes you can have multiple user page and change from one to another one by using a button for exemple.
    You can parametrize this button to call a program. In this program you can use UserPage("Path/of/the/page/pagename") as Galet said, to change your current page to another one.

  • To answer your second question (Random number generation) :


    Staubli provides a function $rand() in the "Expansion" add-on :


    (s7.3.1+) num $rand(), num $rand(num seed)

    This instruction returns a pseudorandom number n with 0<=n<1. The seed argument reset the pseudorandom sequence. This allows computations to be repeated


    I never used it, so can't tell you if it works well.


    Greetings.


    Seb

Advertising from our partners