-
-
May 21, 2021 at 8:27 ampingSubscriber
Hi everyone
I have downloaded and installed ANSYS SCADE Suite Version Student 2021 R1. I created a simple operator called "opr_and_gate" which consists of just two boolean inputs, a boolean output and an AND gate.
I was able to use KCG to generate a number of files in a folder named "KCG". Among these files are "opr_and_gate.c" and "opr_and_gate.h".
I want to imtegrate this C Code generated by KCG into a software application. Therefore, I wrote a bare C program to include "opr_and_gate.h", and saved it in the "KCG" folder. When I tried to compile it, I got the error below:
kcg_types.h:168:10: fatal error: kcg_assign.h: No such file or directory
168 | #include "kcg_assign.h"
Please help me understand what is the purpose of "kcg_assign.h", and in this case, whether it can just be a blank file.
I got the following from the SCADE manual, but still don't understand what it means.
QUOTE:
The kcg_assign macro must be provided either through the -user_config option mechanism or through a kcg_assign.h file. The macro is used by the generated C code to perform low-level copy of non-scalar data. It uses the C memcpy library function for simulation purposes and has to be redefined by users according to final target environment.
UNQUOTE
Thanks.
May 25, 2021 at 7:41 amChristianSchraderAnsys EmployeeHi The standard version of kcg_assign.h can be found here in your SCADE install folder (adapted to your version/install path): C:\Program Files\ANSYS Inc\vXYZ\SCADE\SCADE\include\C. The only thing the file does is define the kcg_assign macro to map to memcpy as available in standard C API for Windows.
In order to recognize your code properly, I would recommend the following:
Have KCG folder only contain the generated C code
Have your own code folder side by side to the KCG folder in the project directory.
Make a copy of kcg_assign.h into your source folder
Adapt the include paths of your compiler where necessary
With that setup you should be good to go.
Best regards Christian
Viewing 1 reply thread- You must be logged in to reply to this topic.
Ansys Innovation SpaceBoost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
Trending discussions- What are the OpenGL drivers supported by SCADE Display KCG?
- How to get event from Arinc
- What are the target supported to integrate SCADE Suite generated code?
- How does Medini calculate FITs based on mission profile?
- Command or tool to extract information about input and output data associated to a specific node
- What are the OS supported by SCADE products for installation?
- SCADE – FMU file
- Integrating C Code generated by KCG in Software Application
- ANSYS SCADE: The map iterator explained
- What is the most efficient way of implementing a FOR LOOP in SCADE Suite
Top Contributors-
7272
-
4248
-
2899
-
1374
-
1322
Top Rated Tags© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-