PSPICE to LabView Tutorial



PSPICE to LabView Tutorial

1. Open Cadence: Design Entry CIS XL (PSPICE program).

2. Click on New Project, select Analog or Mixed A/D, name it relating to the project, and save it somewhere you can find easily (important for integrating it to LabView).

[pic]

3. Select Create a Blank Project and a blank schematic page will appear.

4. Press “P” for the parts window and select SOURCE. Then click on VPULSE (source we will be using to generate our clock signals).

[pic]

5. Place the VPULSE part on the schematic.

[pic]

6. For this example we set the source to these values:

[pic]

7. After setting the values and adding wires and grounding the source, select PSpice and New Simulation Profile. Name the simulation appropriately and then Create it.

8. After you press Create, a simulation settings window will open up. Select the Analysis type as Time Domain (Transient). For this example, we will set the “Run to Time” as 10us and “Maximum step size” as 0.1us.

[pic]

9. Before we click on OK, go to the Data Collection Tab and check the Save data in the CSDF format (.CSD) box (important for LabView). After that, then click apply and OK.

[pic]

10. You are now ready to run the simulation, but before doing so (not necessary but handy) select the Voltage marker and place it on the top wire of the source.

[pic]

11. After doing that, press Run (the triangle pointing to the right).

[pic]

12. Once it finishes running, your plot should look this:

[pic]

Now it is time to incorporate this signal into LabView.

13. Open up LabView Signal Express 3.0 by going into start->programs-> National Instruments->LabView Signal Express->LabView Signal Express 3.0

14. Your initial screen should look something like this:

[pic]

15. From this screen, click on Add Step (top left corner below File, there is “+” symbol before it) and this window will appear.

[pic]

16. On this window, click on Load/Save Signals and select Load from SPICE. A box like this should appear.

[pic]

17. Double click that Load from SPICE box and this window should appear:

[pic]

18. From this window we will be importing the PSPICE signal we made earlier. First on the File and Signal Selection, select Pspice.

[pic]

19. Now press the import file path button (the opened folder) and go to where you saved your simulation files (what we did in step 2). You will see a .csd file under whatever you called your simulation (step 7). After you select the .csd file, click OK.

[pic]

*For this example, I called my simulation Profile name simclock.

[pic]

* The .csd file that we will be incorporating.

20. Now that we have incorporated the PSPICE signal we made earlier, we will be selecting the appropriate voltage to send (the .csd file is an output file of the simulation and will gather everything from the schematic therefore we will need to select the correct voltage). The nice thing about this window is that it shows you what the output as we select a signal. In this example, we will be selecting as shown in the screen capture.

[pic]

20. After we select this PSpice signal, we will need to add another step before sending this to the DIO board. Right click the Pspice signal name (it’s the name below Load from Spice), then go to Send To->Processing->Analog Signals->Convert to Analog to Digital. *PSpice generates analog values, thus we will need to convert it into a digital waveform using the LabView processing tool.

[pic]

21. After clicking the Convert to Analog to Digital, this window and a new step will appear:

[pic]

22. On this window, we will be altering our signal to get the correct digital signal we should be seeing. First on the Analog Full Scale(pk-pk) section, go up to 6.7v (it is initially clipping because we set our signal to go from -3.3v to 3.3v, which is 6.6v Vpp, therefore we need a Analog Full Scale >6.6v otherwise the data will clip). Then Set the Resolution to 1 bit.

[pic]

23. After setting those values, we will be adding the Generate signals step (you can right click on the blank white space below the 2 steps we added or you can also click add step).

[pic]

24. After we select Line Output, we will see the Add Channels To Task Window.

[pic]

*Now this window is applicable to only the computer in our senior project room (first floor, 9-141). It will most likely be different if you did this tutorial on your laptop or another computer because the devices have not been added to the Supported Physical Channels list. To add devices to this list, refer to the Measurement and Automation program (there are plenty of documentation for that program).

25. Click on Dev2 (this is our simulation board; I believe the real one is Dev1). And select port0/line0.

[pic]

26. Once we select OK, this window and step will appear:

[pic]

27. From the window, go to Acquisition mode and select Continuous Samples, for Samples to Read: 6.4k, and for Rate:10Mhz. (The samples to read and rate is the specifications for our DIO board). After you set these specs., if you go look at the DAQmx generate Box (left hand side), the digital waveform signal (the one we made from pspice and processed) should be there.

[pic]

28. Now we are going to add our final step: Acquire Signals.

[pic]

29. After we click on Line input, it is similar to the Generate signals step. We do everything the same, except select port0/line1 because port0/line0 is being used by the output.

[pic]

30. A similar window will appear, and we set the specifications to the same as the Generate signals one (Continuous Samples, 6.4K, 10M).

[pic]

[pic]

31. We now have finished with all the steps and we are ready to run the simulation If you haven’t already, save the project. After that press Run and Then press stop after 5 seconds.

[pic]

[pic]

32. After pressing Stop, we can now view the results of our simulation.

33. Go to Data View and a window shown here should appear.

[pic]

34. In these displays we can show various plots of our signals. For this example, we will be showing the PSPICE signal, what the board will be outputting (DAQmx Generate), what it is receiving (DAQmx Acquire).

35. First add the PSPiCE Signal on the Display just for reference and practice. Click on the Load from Spice Box and drag it into the display window.

[pic]

The signal we generated should appear.

[pic]

36. We can also add other signals onto this same graph as well, just by doing the same thing we did for step 35.

37. Now we would like too display the Digital Waveform processed from the analog PSPICE signal. Just drag the digital waveform onto the display window and a new display will appear as well as our signal.

[pic]

This digital waveform will appear and that is the clock signal the DIO will be sending to our data acquisition system.

38. The last display will show what the DIO board will receive from the data acquisition system. We will drag the DAQmx acquire box onto the display window.

[pic]

Since this is just a simulation the signal we receive are just signals the DIO created.

39. THE END!

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download