Creating the on_delay element with the ability to generate code for it in the software

reza hakimi_20486
reza hakimi_20486 Altair Community Member
edited November 2023 in Community Q&A

Hello

In the psim software, the on_delay element is available, but the code is not generate for the element

How can this function be made with other elements, so that the software can also generate the code for it

 

image

 

 

Tagged:

Answers

  • NikosDimitrakopoulos
    NikosDimitrakopoulos
    Altair Employee
    edited November 2023

    Dear User,

    Many elements in the standard PSIM library can be used for code generation but not all!. In order to differentiate the elements in the standard library that can be used for code generation from the ones that can not, under Options >> Settings >> Advanced, if the option box "Show image next to elements that can be used for code generation" is checked, a small "CG" image will appear next to these elements that can be used for code generation.

    Upon inspecting the provided image, it is evident that the "Turn-on Time Delay (logic)" block is not supported for code generation. On the other hand, the "Unit Delay" block is compatible:


    image

     

    Of course, all the elements under the menu Elements >> Event Control and Elements >> SimCoder are available for code generation along with the standard library ones. You can follow more details on this by navigating to the Simcoder User Manual.pdf:

    image