Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

creating links between page connectors and SPICE blocks

Solved!
Go to solution

I'm having difficulties creating links between page connectors and their relevant SPICE block nodes.  I've imported .cir files as arbitrary spice blocks into multisim, (for the AD8334 VGA/LNA).  I then proceeded to look up each of the netlist's relevant node names and named each on page connector after these.  However it was suggested that I then assign a net with the corresponding net names to any wire following each connection.  This method seemed to be successful up until I wanted to connect a number of pins of the device (on page connectors) to a shared voltage supply or ground.  By doing this I am then forced to combined the connected nets which causes the nets on multiple connectors to only be named after one of the relevant nodes.  In short the question I'm asking is does naming just the on page connector after its relevant node in a netlist establish the connection or is it essential to assign connecting wires to a net of the same name?  If the latter is the case then how can I solve this shared net connections problem?  Any advice would be appreciated.  Many thanks, Robert 

0 Kudos
Message 1 of 4
(5,434 Views)

Dear Robert


Thank you for posting your question onto the forums.  My understanding of the question is that you are importing a .cir file as arbitrary SPICE blocks into MultiSim, but because some of the names of the On-page connectors are duplicated (e.g. "Ground"), the netlists are merging i.e. not automatically assigning them as say "Ground-1" and "Ground-2", rather making them the same "Ground" connector.  If I am not correct is it possible for you to post your code, the .cir file or some screen shots to clarify the issue you are having.

 

I was able to find this white paper ( https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YG0ACAW&l=en-US ) "Importing a SPICE Netlist for Simulation in NI Multisim", which has a little tutorial on what I believe you are attempting to do, so please check this out and let me know if you find this helpful.

 

My first impressions are that you will have to change your naming convention.  You get naming conflicts in most languages and Multisim is no different (the classic example is calling a temporary variable "pi" - the computer gets confused).  By using generic terms such as "Ground" problems may arise, so be specific and use e.g. "Ground_AD8334" if you mean the ground of your specific component.

 

I hope this helps.

 

Kind Regards,

Robert Ward
Applications Engineer, NI
0 Kudos
Message 2 of 4
(5,399 Views)

Dear Robert,

Thanks very much for your reply, unfortunately the link you sent as the original guide I looked at previously.  I've attached a copy of my circuit with scope outputs so you can see the LNA is not achieving its 19dB amplification.  I've also included the total netlist which includes both the LNA and VGA components of the AD8334 as well as the additional application components I've added to the schematic.  From the screenshot you can see I've shown each of the nets within the schematic (also notice I have indexed the additional components and nets from 100 as to not incur any discrepancies with the imported netlists).  In your message you have described defining grounding nets separately, would this not cause some kind of grounding errors within the simulation?  Maybe from seeing the screen shot my issue may seem clearer, for example if you see how I've setup the VPSL and ENBL nets to be connected to separate 5V sources, allowing the nets to remain in the netlist.  However when grounding the COMM an COML connections their respective nets are automatically switched to the ground net 0.  Even though this is essentially what I want to happen I am concerned with the COMM and COML nets disappearance from the netlist, as this implies they are no longer linked with the COMM and COML nets from the imported netlists and therefore the corresponding pins on the imported AD8334 device.

Any further advice would be greatly appreciated,

Regards,

Robert

0 Kudos
Message 3 of 4
(5,395 Views)
Solution
Accepted by topic author rjames09

Hi Robert,

 

I briefly looked through the netlist and you are not going to get the right simulation results.  The component U1 and U2 is model and not a circuit netlist, so instead of using the Arbitrary SPICE block; I suggest you create a custom component and add these SPICE models; you can then save the component to your database and use it like other parts inside Multisim.  If you don't know how to create a custom component have a look at this tutorial: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YH5fCAG&l=en-US. The nice thing about creating a component is you don't have to worry about how other parts are connected to the model U1 and U2; Multisim will take care of that for you.  

 

If want to use the arbitrary SPICE block, you have to understand the SPICE netlist syntax.  A SPICE model begins with a ".subckt" or ".model" statement and for subcircuit the model must end with an ".ends" statement.  If you have some programming knowledge, think of subcircuit as a function or a subroutine.  Whenever you want to use a function in your program, you have a call the function and this is the same in SPICE.  When you copied the model to the arbitrary spice, the model is part of the circuit netlist but you did not add a command to call those models so they are not part of the simulation. 

 

To call a subcircuit model in SPICE, this is the syntax:

Xref Node1 node2 node3  Model_name

 

Any line beginning with “X” is to call a sub-circuit model, the next part “ref” is reference name and it could be anything you want but the reference can only be used once in a netlist.  The next part is the node order, in this case there are three nodes; this part depends on your model.  The last thing is the model name.  So, to call the “ENBL” model which inside U1, you need to add this statement in your netlist:

.X1 LNA LMD INH VPSL LON LOP COML COMM BK

 

Download a SPICE manual online, it will provide a more comprehensive description than what I provided.  

 

I highly recommend you create a custom component it is much easier to work with.  The only time you should use the arbitrary block is when you found a circuit net list online in an article and you want to analyzie that circuit without rebuilding it in Multisim, this is when you can copy/paste the netlist into the arbitrary block and use the analysis to analyze the circuit.

Tien P.

National Instruments
0 Kudos
Message 4 of 4
(5,378 Views)