RobotStudio event

Functions not working in installed module

I moved a function to an installed module so it can be accessed by all tasks, and it appears to work correctly, but it always returns a value of FALSE even when it should be TRUE.
Are there any known issues of an installed function behaving this way?

Comments

  • This should not be the case...

    What Robotware version are you working on? RW5 or 4 (or older)

    I use "Shared" setting in controller/automatic loading of Modules to achieve the access from all tasks...

    regards
    Christian
  • I'm using the current release, 5.15.02.
    It is a module set to "shared" so that it is installed as a shared module, and any task CAN access it, but the function never returns true.
  • Ok, what does the function do - may you upload the code?
    regards
    Christian
  • It's not an issue with the code itself. The function works if it's not installed.

    FUNC bool Function(bool inOK)
    VAR bool bOK;
    bOK := FALSE;
    IF inOK = TRUE THEN
    bOK := TRUE;
    ELSE
    bOK := FALSE;
    ENDIF

    RETURN bOK;
    ENDFUNC
  • Christian_Goy
    Christian_Goy ✭✭
    edited August 2013

    I tried your code and it worked as expected... see attached pack&go including background task and T_Rob1 executing the function call and logging it to the operator output...

     

    result:

     

     

    image

     

    Please check again, and maybe you need to do a P-Start to reload the correct module into the controller, in case you started with a different one...

    And another topic: I only set "Shared" to YES, it's not allowed to set Installed to "YES" too - just in case....

    regards

    regards
    Christian