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.
Many spice models I try to import into TINA and create a macro for I get this error. Error loading library; File is Empty!. The files are not empty and not encrypted. Here is an example:
* Library of Vishay 1 Mbd high speed optocouplers
* Copyright VISHAY, Inc. 2016 All Rights Reserved.
*
* Symbol Pin -> Model Node
* A 1
* K 2
* E 3
* C 4
* B 5
* VCC 6
.SUBCKT 6N136 DA DK QE QC QB VCC
DIN DA 9 DT8811VB
VT 9 DK 0
CIO DA QC 0.6e-12
QOUT QC QB QE QF290D
RFX QB QE 1e6
Hd T1 0 VT 800 ;I-V
Rdly1 T1 T2 0.1
Cdly1 T2 0 1P
Gdly1 VCC QB VALUE {-2E-7 + 5e-6*V(T2) -1.7e-8*V(T2)*V(T2)}
.MODEL DT8811VB D
+ IS=4.5E-18 N=1.40 RS=3.8
+ BV=3.000e+000 IBV=0.5e-006 XTI=4
+ EG=1.52436 CJO=18E-12 VJ=0.75 M=0.5 FC=0.5
.MODEL QF290D NPN
+ IS=2.691e-016 NF=1.000e+000 ISE=6.586e-018
+ NE = 1.082e+000 BF = 176 BR = 1.000e+000
+ IKF = 7.300e-003 VAF = 1.000e+002 VAR = 2.800e+002
+ EG = 1.110e+000 XTI = 1.068e+000 XTB = 0.000e+000
+ RC = -1e+000 RB = 2.500e+001 RE = 40
+ CJE = 2.500e-012 MJE = 1.740e-001 VJE = 1.250e-001
+ CJC = 7.24e-012 MJC = 2.573e-001 VJC = 1.100e-001
.ENDS 6N136
**==================================================================*
* Note: *
* Altough models can be a useful tool in evaluating device *
* performance, they cannot model exact device performance *
* under all conditions, nor are they intended to replace *
* breadboarding for final verification! *
* *
* Models provided by VISHAY Semiconductors GmbH are not *
* as fully representing all of the specifications and operating *
* characteristics of the semiconductor product to which the *
* model relates. *
* The models describe the characteristics of typical devices. *
* In all cases, the current data sheet information for a given *
* device is the final design guideline and the only actual *
* performance specification. *
* VISHAY Semiconductors does not assume any liability arising *
* from the model use. VISHAY Semiconductors reserves the right to *
* change models without prior notice. *
**==================================================================*
Hello Steven,
Please direct your question to DesignSoft/TINA using this support page www.tina.com/technical-support/
I contacted design soft support and so far they said they were able to create the macro but no solution for me. I gave them this model because it is actually one of the ones I am having trouble with. the one above actually worked.
* Library of DC Input Phototransistor Output Optocoupler Darlington_10mA
* Copyright VISHAY, Inc. 2018 All Rights Reserved.
*
* ==== Darlington_10mA ====
* A = diode anode
* K = diode cathode
* C = BJT collector
* E = BJT emitter
*$
.SUBCKT 4N32 A K C E PARAMS: REL_CTR=1
D1 A D DIRED ;IRED
Vsense D K 0 ;IF Current sense
Hd R 0 Vsense 1 ;I-V
Rd R T 30K
Cd T 0 0.1n
Rdummy B 0 4G
Q1 C B E [E] QBJT ;phototransistor
* V-I
Gpcg C B TABLE ;Photodetector {(IC vs IF) / Q1 BF}
+ {1.37*REL_CTR*(V(T)**1.658*exp(limit(4.3-60*V(T),-50,50))*
+ ((4*10**(-9)*(REL_CTR**6))-(7*10**(-7)*(REL_CTR**5))+(5*10**(-5)*(REL_CTR**4))-(0.0015*(REL_CTR**3))+
+ (0.023*(REL_CTR**2))-(0.155*(REL_CTR))+2.2261)/100)}
+ (0,0) (10,10)
.model DIRED D IS=1P N=1.948621 BV=6 IBV=10U
+ CJO=18.8P EG=1.424 TT=500N
.model QBJT NPN IS=3.64P BF=100 NF=1.193293 BR=10 TF=13N TR=550n
+ CJE=5.16P CJC=18P VAF=65 ISS=0 CJS=7.74p
.ends
*$
**==================================================================*
* Note:
* Although models can be a useful tool in evaluating device performance,
* they cannot model exact device performance under all conditions, nor
* are they intended to replace breadboarding for final verification.
* Models provided by VISHAY Semiconductors GmbH (“Vishay”) do not represent
* all of the specifications and operating characteristics of the product to
* which the model relates. The models attempt to describe the characteristics
* of typical products. The current data sheet information for a given
* product represents the final design guideline and includes actual
* performance specifications. The accuracy, reliability and compatibility
* of models provided by Vishay are not guaranteed or warranted in any way
* and Vishay disclaims liability of any kind whatsoever, including, without
* limitation, liability for quality, performance, merchantability and fitness
* for a particular purpose arising out of the use, or inability to use a model.
* Vishay reserves the right to change models without prior notice.
* The products described herein, including the model and any results produced
* using the model, are subject to the specific disclaimers set forth at www.vishay.com/doc?91000.
**===================================================================
Hi Steven,
Thanks for the update. Please continue to work with TINA/DesignSoft Support on this issue. Unfortunately, a TI Device Model is not involved for one of our design teams to look at and your question seems best suited for the platform developer.
Hello again Steven,
Please let me know if you don't get resolution to your issue by working with DesignSoft and I will contact them on your behalf.
Hey Steven,
If you haven't already, check out this thread where another customer had a very similar issue that was resolved https://e2e.ti.com/support/tools/sim-hw-system-design/f/234/t/658430
Steven,
Here is another FAQ post that could be helpful https://e2e.ti.com/support/tools/sim-hw-system-design/f/234/t/692613
Jeff,
I was able to get macro wizard to work. I opened the .lib model in notepad ++ and copied and pasted the model text into a new blank file and save under another name. This is why design soft support was able to run the macro wizard without getting an empty file error. Because I copied and pasted the model in the email to them. I have downloaded a number of models from other manufacturers that have this problem. It seems there is some hidden character in the model that prevents TINA from opening it but this character is not copied. Try it. Go to Vishay.com and download the model for the 4N32 which is called Darlington_10mA. try to run macro wizard on the Darlington_10mA.lib model. If you get file empty error open it in textpad++ and copy the text to another new file. Try macro wizard on the new file.
Regards,
Steven Fierro
Hi Steven,
I think you are right about the hidden characters causing the error. I opened a dialog with Tech Support at Design Soft and they seem to agree. I'll give it a try myself as well and should have more by Tuesday, 1/7.
Hello Steven,
I downloaded the 4N32 SPICE Model and ran the TINA Macro Wizard using the .lib which resulted in the file empty error. I then opened the .lib file using Notepad, ,copied the contents to a new Notepad file and saved as Test.lib. I then ran the TINA Macro Wizard successfully using Test.lib, confirming your results. This seems like a workable solution but I'm uncertain if it will work for all SPICE models from all vendors since we are unable to verify what and where the hidden characters are in the various SPICE files.