Choosing and selecting library blocks

In order to simulate your own schematics, CASPOC provides many different components. All the components are divided into three groups: Circuit, Blocks and Library. In the previous tutorials, we already talked about how to use Circuit and block components. This tutorial, we will focus on library blocks and introduce their categories. The library block includes all the components built by Circuits or Blocks. Understanding the library categories is very important so that users can easily find out some complex library blocks they need without rebuilding it by themselves. Each library block provides several parameters which depend on the theorems or certain existing models. Users can also customize their own library block in CASPOC by defining the labels and export directions. We will show one example in this tutorial in the end.

The categories of library blocks

The library blocks in CASPOC are located in the tree view of Components/library. Unfold the tree view and find the category list as below. Besides “AdvancedElectricalDrives” is the collection of the using components in the two books “Fundamentals of Electrical Drives” (ISBN: 978-1-4020-5503-4) and “Advanced Electrical Drives” (ISBN: 978-94-007-0179-3), all the others are put according to their properties. We will explain them one by one.

<br>Click to close the image <br>Click to close the image <br>Click to close the image <br>Click to close the image <br>Click to close the image

The contents of the library blocks

In CASPOC, users can use project manager to manage the using library blocks. Unfold the tree view of “PROJECT” behind “Components”. Go to PROJECT/Schematic/Main Schematic which is the current schematic we're using. Because we have not put any library block in the workscreen, there is only the main schematic.

<br>Click to close the image

Go to Components/Library/PowerConverters/Inverters3phase/Inverter. Left-click the inverter and release your mouse button. Choose a suitable place and left-click to put the inverter in the workscreen.

<br>Click to close the image

Currently we can still see the main schematic in the schematic. Left-click the button in the right of the search button to refresh the tree view (or click View/Refresh TreeView in the menu bar).

<br>Click to close the image

Then unfold the tree view of “PROJECT/Schematic" and find out the library block “INVERTER1” which is in the workscreen now.

<br>Click to close the image

Left-click the INVERTER1, we can see the content of the library block shown in the right workscreen. The background of the library content is different from the main schematic in order to identify the different workscreens.

<br>Click to close the image

You can go back to the main schematic by left-clicking “Main schematic” (step 1). Then right-click the library block “INVERTER1” to see its property window (step 2).

<br>Click to close the image

In the property window, click the button “Edit” and we can also see the content of the library block which was shown in PROJECT/Schematic/INVERTER1. Here we can see the file name is INVERTER.LIB. (Note that .lib is the standard file extension of library block in CASPOC.)

<br>Click to close the image

Compare the model parameters of the library block to its content. We can find all the model parameters are read by MPARSETALL (the component for setting all model parameters) in the right side. And in the left side, there is the circuit with 11 exports (see the blue, green, and pink arrows) which can connect to other components in CASPOC. We will practice how to use in the fourth part of this tutorial.

<br>Click to close the image

Besides the model parameters, we can also find other settings of the library block: Set the display picture (step 1) and rotate the library (step 2). If you don't understand the function of the library block, you can click the button “Help Lib” (step 3) to launch a pop-up window (Quick online help) and a html page.

<br>Click to close the image

Folder, File name, *.lib & *.csi

Close the property window of the library block and save this schematic in C:\CASPOC2009\Samples. Then we will see the filename of this schematic is *.csi. (Note that the standard file extension of schematic is .csi). Remember that the file extension .lib stands for library block in previous part.

<br>Click to close the image

Go to C:\CASPOC2009\ and we can find two folders “Library” and “Samples” which is used for library blocks and schematics respectively. All the library blocks (.lib) are located in the folder “Library” and classified according to their properties. We already introduced the categories in the first part of this tutorial. As well as the folder “Samples”, all the schematics are located here and classified according to their properties. In CASPOC, we use the same categories in “Library” and “Samples” so that users can easily refer to the corresponding samples according to any certain library block.

<br>Click to close the image

Go to C:\CASPOC2009\Library\PowerConverters\Inverters3phase\ (the same path while we select inverter from Components/Library/PowerConverters/Inverters3phase). And find out “Inverter.lib” and “Inverter.bmp”. The two files include the main configuration for the library block Inverter. Inverter.lib specifies the circuit, the components and their corresponding parameters. Inverter.bmp provides the icon display for Inverter.lib in CASPOC workscreen.

<br>Click to close the image

Create your own library block

Now we can practice one example to know how to build your own library block in CASPOC. Left-click an inductor in Components/Circuit/RLC/L and release your mouse button. Left-click in the workscreen as below, then do the same step to put a capacitor from Components/Circuit/RLC/C.

<br>Click to close the image

Connect the inductor and the capacitor by the following steps.

<br>Click to close the image

Right-click the anode of the inductor (step 1) and enter the label “IN_A” (step 2). Click OK (step 3).

<br>Click to close the image

Do the same steps with the other three nodes as below and give them labels “IN_B”, “OUT_A” and “OUT_B”. Click OK in each window after typing the label.

<br>Click to close the image

Right-click the node “IN_A” again, now we can find the option of export direction behind the label name. Set the export direction of node IN_A to left, and click OK. As well as the other three nodes, the export directions of node “IN_B”, “OUT_A” and “OUT_B” are left, right and right respectively.

<br>Click to close the image

After specifying the export directions, we can see a flag around the node according to its direction (step 1). Then go to Edit/Export Library (step 2).

<br>Click to close the image

Select Yes or No depending on your need. Select “Yes” is to save only the selection part. Select “No” is to save all.

<br>Click to close the image

The Export library function will detect all the export labels in this schematic as below (step 1). You can also give a title and description to this library in following blank spaces. Click “Export” button to export the library (step 2) and go to C:\CASPOC2009\Library (step 3). Create a new folder (step 4) and name “user” (step 5). Then save this schematic in the folder “user” and name “LC” (step 6).

<br>Click to close the image

Go back to CASPOC software, and click “Create a new schematic” (step 1). Click the button “Refresh tree view” (step 2). Go to Components/Library/user/ (step 3) and find the library LC which we created just now. Left-click the library block LC and release your mouse button (step 4). Click the workscreen to put the LC library block as below (step 5). Currently we have not set the picture for LC, the default drawing only shows label name on the icon.

<br>Click to close the image

Click “Refresh tree view” again (step 1) and go to PROJECT/Schematic/LC1 (step 2). Left-click LC1 (step 3) and see the content of LC1 in the right side (step 4).

<br>Click to close the image

Then we make a drawing picture for LC.lib. Go go C:\CASPOC2009\Library\user and add a new bmp file with the filename LC. Note that the filename of the drawing picture has to be the same as the library block. You can simply draw the bmp file in Microsoft Paint or any other kind of software.

<br>Click to close the image

Make sure that your bmp file is in the same folder with your library block. Then go to CASPOC software and click again the LC library block. Now you can easily find the differences after adding the bmp file. Right-click the library block, you will find originally the picture setting of the previous LC is Labels and Block. Now the new setting is Bitmap and Block. You can also design your own drawing by writing a .vec file.

<br>Click to close the image
© 2024 CASPOC, All rights reserved. Home   |   Terms and Conditions   |   Legal   |   Export Compliance   |   Privacy Policy   |   Site Map