-
-
December 21, 2023 at 8:28 pmDaniel SolanoSubscriber
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?
-
December 23, 2023 at 6:05 amJair GonzalezAnsys 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
-
January 25, 2024 at 3:58 pmBenjamin DescorpsAnsys 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.
-
- The topic ‘How to include text values for constants in SCADE’ is closed to new replies.
-
1191
-
513
-
488
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.