Embedded Software

Embedded Software

Topics related to SCADE Suite, SCADE Display, SCADE One and more.

How to include text values for constants in SCADE

    • Daniel Solano
      Subscriber

      I need to use light sensor readings: (Lux) and time (ms). Extracted from a CSV (comma-separated values) file as a constant for Operator input. Is there any way to use this file as a text input in SCADE?

    • Jair Gonzalez
      Ansys Employee

       

       

      Hello,

      It is possible to create a textual declaration of the constant, just adjusting the file to met the scade language syntax, as shown in the figure below where the datain.scade file has the declaration of the const with name DATAIN, of type samples, equal to the values listed between brackets. 

       The datain.scade files had to be added to the const.etp project. 

      After the file insertion, the tool will check the textual declaration and will issue an error in the output window in case the syntax is not correct. By the way, it would be possible to write scade textual models following this procedure. For details, check the “SCADE Language Primer” that is found in the SCADE/help directory in your installation 

       

       

       

    • Benjamin Descorps
      Ansys Employee

      Importing array values from CSV format is possible from any single constant selected in SCADE Suite user interface. From the constant definition, use the command Import>Constant value from the contextual menu.

      When specifying matrix values in CSV format, use the list separator and the decimal symbol as specified in the regional settings of the machine to remain compatible with spreadsheet application format.

Viewing 2 reply threads
  • The topic ‘How to include text values for constants in SCADE’ is closed to new replies.