XITE DOES NOT RUN FROM LOCAL FILES


XITE must be run on a local host or website. It used HTTP protocol.


LATEST VALUE OF EVENTIN (IN SCRIPT) IS NOT AVAILABLE


You need to add a handler for the event and store the value in a local field.

Example


  DEF SCR_INTERLOCK Script

  {

    eventIn   SFBool    isCrankTimerActive


    eventIn   SFInt32   crankSpeed


    eventOut  SFBool    isDisable     IS  isNotCranking

    eventOut  SFBool    isCranking    IS  isCranking    


    eventOut  SFBool    isCranking1   IS  isCranking1

    eventOut  SFBool    isCranking2   IS  isCranking2

    eventOut  SFBool    isCranking3   IS  isCranking3

    eventOut  SFBool    isCranking4   IS  isCranking4


    field     SFInt32   crankSpeedLoc 4


    url "javascript:


      // store crack speed local (needed for X_ITE)


      function crankSpeed( i )

      {

        crankSpeedLoc = i

      }


      function isCrankTimerActive( act )

      {

        isCranking  =  act;     // to output of Proto for use in model

        isDisable   = !act;     // to disable touchsensors 


        if ( crankSpeedLoc == 1 ) { isCranking1 = act; return; }

        if ( crankSpeedLoc == 2 ) { isCranking2 = act; return; }

        if ( crankSpeedLoc == 3 ) { isCranking3 = act; return; }

        if ( crankSpeedLoc == 4 ) { isCranking4 = act; return; }


        // next code is only executed if very first crank is started with the Return key

        //------------------------------------------------------------------------------


        isCranking1 = act;

      }

    "

  }


Created with the Personal Edition of HelpNDoc: Easily create Qt Help files