Model 4200A-SCS Parameter Analyzer Reference Manual Section 8: Keithley User Library Tool (KULT)4200A-901-01 Rev. C / February 2017 8-29Entering the VSweep user-module codeIn the module code-entry area, enter the C code below for the VSweep user module. Open the KULTdialog box to full screen view to simplify code entry./* VSweep module--------------Sweeps through specified V range & measures I, using specified number of points.Places forced voltage & measured current values (Vforce and Imeas) in outputarrays.NOTE For n increments, specify n+1 array size (for both NumIPoints and NumVPoints).*/double vstep, v; /* Declaration of module internal variables. */int i;if ( (Vstart == Vstop) ) /* Stops execution and returns -1 if */return( -1 ); /* sweep range is zero. */if ( (NumIPoints != NumVPoints) ) /* Stops execution and returns -2 if */return( -2 ); /* V and I array sizes do not match. */vstep = (Vstop-Vstart) / (NumVPoints -1); /* Calculates V-increment size. */for(i=0, v = Vstart; i < NumIPoints; i++) /* Loops through specified number of *//* data points. */{forcev(SMU1, v); /* LPTLib function forceX, which forces a V or I. */measi(SMU1, &Imeas[i]); /* LPTLib function measX, which measures a V or I. *//* Be sure to specify the *address* of the array. */Vforce[i] = v; /* Returns Vforce array for display in UTM Sheet. */v = v + vstep; /* Increments the forced voltage. */}return( 0 ); /* Returns zero if execution Ok.*/Continue with Entering the VSweep user-module parameters (on page 8-30).