Manuals >User's Guide >Creating and Running Macros
Print version of this Book (PDF file)
prevnext

Computations with Data Sets

Like Transforms using the Program function (Programs), Macros can apply a variety of operators and functions to data sets. However, it is more difficult for Macros to access the data sets. This is because Macros are further removed from the data sets, which exist inside Setups, alongside Programs. As is discussed in Using Data from Another Setup. Programs can readily access data sets in another Setup by preceding the data set's name with the name of its Setup, as in rgummel/vb. (This data set is an Input appearing in the bjt_npn.mdl model file.) Simpler still is the case where a Program accesses a data set in the same Setup. In this case it can access an Input named vb just by using its name. For example:

PRINT max(vb)

Since Macros are not inside the Setups, they must fully specify the names of data sets that they use. A leading "/" character must be used. In a Macro, the previous PRINT statement needs to be written as follows:

PRINT max(/npn/dc/rgummel/vb)

Within a currently executing Macro or Transform, the notation for relative path (../ and ../..) can be used when accessing a data set in another DUT or Setup.


Note


Some of the functions in the IC-CAP Function List will not execute within a Macro, although they would succeed in a Program. These functions depend on being able to determine the number of points per curve in a Setup. This is generally because they operate on a single curve in a data set (or on each curve separately). Example: If you use the derivative function in a Macro, the following error box message will appear:

Cannot perform derivative function because points per curve cannot be determined. This function must be done inside a Setup.

The other functions with this limitation are these: correlation, fit_line, circlefit, and linfit. Starting with IC-CAP 2006B addon3, a new derivative function called derivative2 is available, which can be called from a macro by passing in the number of points as an additional argument. See derivative2 for more information. To use the classic derivative or the other functions mentioned during the execution of a Macro, these functions might be placed within dedicated Transforms inside Setups, which the Macro can Perform via the iccap_func command.



prevnext