Skip to main content

Cumulocity Aggregated Payload Measurement Fragment Limitations for IDE Scripts

Comments

3 comments

  • Franziska Gültig

    Hi Sean Thomas,

    I’m moving this over to a support ticket, as it should help connect you with the right team members who can assist further.

    To clarify, could you specify which features come from which source? When you mention “IDE scripts,” are you referring to the Flexy Basic scripts within the Basic IDE interface, or something within Cumulocity?

    If you’re referring to Flexy Basic scripts, it would be helpful if you could share a sample of the code for reference and testing.

    Additionally, adding screenshots to illustrate the issue or feature request would help the support team address it more effectively. (Pictures say more than a thousand words ;-D)

    br

    i.A. Franziska Gültig

    Thank you!

    0
  • Sean Thomas

    Thanks, I am referring to Flexy Basic Scripts.  Here is an example of a working script:

    TSET 1,60
    TSET 2,1
    ONTIMER 1, "GOTO upload"
    ONTIMER 2, "GOTO counter"
    COUNTER:
    AI1total@ = AI1@ + AI1total@
    //AI2total@ = AI2@ + AI2total@
    END
    UPLOAD:
    AI1total@ = AI1total@ / 60
    //AI2total@ = AI2total@ / 60
    AI1total60@ = AI1total@
    //AI2total60@ = AI2total@
      IF (AI1total60@ < 0.1) THEN
        AI1total60@ = 0
      ELSE
        AI1total60@ = AI1total@
      ENDIF
    GOTO reset
    END
    RESET:
    cokecharLN2_3@ = AI1total60@
    AI1total@ = 0
    //AI2total@ = 0
    END

    And the working Tag Set Screenshot:

    To ingest the data into Cumulocity in the same measurement fragment, we add "ewon/" as a prefix to the Tag Name.  Adding this prefix does not meet the rules of the basic code as a set. The end of the variable does not register the full name as ewon/AItotal60@. Here is a place in the code where that happens:

    0
  • Franziska Gültig

    Hi Sean,

    Thanks for the clarifications!

    The team has proposed a solution in the ticket—does that work for you? Are you able to access the ticket to review it? 

    Best regards,

    i.A. Franziska Gültig

     

    instead of accessing tags using the @ suffix in Basic, you can also use the GETIO and SETIO commands to get and set them even if they have slashes in the name. For example

    SETIO "ewon/tagname1", 16
    PRINT GETIO "ewon/tagname1"

    The tag name is inside "" whitch makes a "/" just another sign and not programming....

    0

Please sign in to leave a comment.