This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WEBENCH® Tools/UCC28722: Error while adding model in TINA

Part Number: UCC28722

Tool/software: WEBENCH® Design Tools

Got this Error at the time of adding a new macro in TINA for UCC28722.I am using the Spice model  UCC28722_TRANS.lib file (downloaded from TI's website). What this error is and how I can solve this?

  • Hello Arun,

    Thank you for your interest in the UCC28722 flyback controller.

    I did a web search on "Redeclaration of identifier error" and the results show some errors associated with C, C++ and JavaScript. Since the error appears after adding the macro, it strongly indicates that the problem is in the macro, not the TI model.

    I am unfamiliar with these languages, however, the search results suggest that a function or variable that was declared in your macro code may be duplicating or changing the declaration of an existing name ("ONE_SHOT") to a new declaration.  Please check your macro for this possibility.
    It is also possible that this name already occurs within the TI model.

    The solution may be as simple as giving it a different name in your macro, such as "ONE_SHOT_A" or something.

    Regards,
    Ulrich

  • How can I give different name in my macro?

  • Arun,

    I suggest to make copies of your existing TINA file and macro and then make changes to the copies instead of your originals so that you do not lose the existing files if something goes wrong.

    I suggest to edit the copy of your existing macro and change any name called "ONE_SHOT" within the macro to a new name of your choice, then save the new macro.

    Then, delete the existing macro from the copy of your TINA model and insert your new macro instead.  Then, run your model with new macro to see if the problem goes away. 

    Regards,
    Ulrich

  • I changed all  "ONE_SHOT" with  "ONE_SHOT_A" and got

  • Hello Arun,

    I'm sorry that did not fix the problem.  I am assuming that you renamed the one-shot in your macro only and did not rename all one-shots within the entire TINA file.

    If you remove the macro from the TINA file, does it run normally?  If so, then the problem is still in the macro.

    At this point I will need to pass this issue to others with more experience in TINA modeling and macros. I'll reply again as soon as I am able.

    Regards,
    Ulrich

  • Hello Arun,

    I'm sorry it took so long for me to get back to you on this issue.

    Here is what was found:

    It looks like the subcircuit "one_shot" is declared twice in the larger model. This should not be done in any Spice simulator.

    The initial declaration starts at line 884:

    And the redeclaration starts at line 936:

    If you delete the second one, it will probably eliminate the error.

    Regards,
    Ulrich