IBM Support

PI68997: S-FUNCTION SCHEDULING ISSUE WITH RHAPSODY TIMERS

A fix is available

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Description:
    
    The customer is using timers in their Simulink integration, but
    the times are a mismatch to the Rhapsody timer. Here is their
    description:
    ----
    "In the attached model I am exporting a class with a
    statemachine as an s-function, and execute it in Simulink. The
    statemachine is triggered by a 20 ms timer, and it runs in
    Simulink with a sample time of 10 ms. The statemachine is simply
    flipping a variable from 0 to 1 and from 1 to 0 every 20 ms. I
    am tracing the value of the variable in Simulink. The
    expectation would be to have a periodic signal, having 2 '1' and
    2 '0' . Unfortunately, it seems that there are some anomalies in
    the sequence, and this suggests a problem in the way rhapsody
    timers are managed in the S-Function.
    
    Could you look at the model and clarify why the output does not
    match
    my expectations?
    
    The attached model shows an issue we have noticed in a
    production
    model, and it is impacting the completion of the SQA phase."
    ----
    
    They were asked to try to do a test using just Rhapsody, but
    could not find a way to accurately judge.
    
    ---
    "I don't know how to do a meaningful test in Rhapsody. In
    Simulink I notice the issue because I am comparing the Simulink
    time with the Rhapsody timer, and I can notice that there is a
    mismatch. If I just run it in Rhapsody, it is like trying to
    catch a time mismatch without having another time source to
    compare with.  "
    ---
    
    
    Environment:
    
    Rhapsody 8.1.3
    Simulink 2013B
    
    
    Attachment:
    
    
    
    Model attached
    
    Simulink model is in DefaultComponent/Default Config
    
    It is a very simple model; there is a S-Function with 1 output,
    sent to a block that logs the output. The output is the variable
    flipping between 0 and 1 every 20 ms.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Rhapsody users                                               *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * S-function scheduling issue with rhapsody timers.            *
    * Timer inaccuracy is caused by casting from double to integer *
    * value.                                                       *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • Fixed in Rhapsody 8.2 - The problem is fixed in
    Share\etc\SFunctionTemplates\C++\RhapSFuncTempl.cpp and
    Share\etc\SFunctionTemplates\C\RhapSFuncTempl.c files
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI68997

  • Reported component name

    TLOGIC RHAPSODY

  • Reported component ID

    5724V74RP

  • Reported release

    813

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-09-12

  • Closed date

    2016-12-05

  • Last modified date

    2016-12-05

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    TLOGIC RHAPSODY

  • Fixed component ID

    5724V74RP

Applicable component levels

  • R813 PSN

       UP



Document information

More support for: Rational Rhapsody

Software version: 8.1.3

Reference #: PI68997

Modified date: 05 December 2016