Simcoder C block

Altair Forum User
Altair Forum User
Altair Employee
edited August 2023 in Community Q&A

Hi everyone, hope if anyone in this forum has used the simcoder C block to let me know if I can use it just as the simlified C block and also if I can use the variables 't' and 'delt' which refer to time and time step in this block because when I started using this block I found problems even with simple functions like ''if'.
I look forward to your help.

Tagged:

Answers

  • Rhonda_20369
    Rhonda_20369 New Altair Community Member
    edited August 2023

    The variables "t" and "delt" are defined for PSIM simulation.

    "t" is the time axis for simulation. "delt" is the time step size for computer to make calculations.

    In a real-time target, those variables do not exist. 

    Therefore, you cannot use "t" and "delt" in SimCoder C block. 

    For Simplified C block, if this block is not used for simulation only so it is not in the code generation section, you may use those two variables.