Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

NVM measurement w/ external control-> data all zeros

Post Reply
Posts: 1
Joined: November 17th, 2015, 2:46 pm
Country: United States

NVM measurement w/ external control-> data all zeros

Post by alelias01 » November 17th, 2015, 3:02 pm


I'm trying to use the NVM modules thru external control via KXCI.

code looks something like this:

EX nvm ReramSweep(...)
GN Vforce 100

However the query(GN...) always returns an array of all zeros.

I read in another message thread that this is do to a buffer being cleared because the data is somehow being sent to KITE before I can read it.
(module works fine in KITE)

Is there any way to modify the existing nvm modules so that this buffer isn't cleared?


Kenneth P
Keithley Applications
Keithley Applications
Posts: 212
Joined: October 25th, 2010, 1:31 pm
Country: United States

Re: NVM measurement w/ external control-> data all zeros

Post by Kenneth P » December 21st, 2015, 6:46 am

Hello Alex,

In order to modify an existing library, it is necessary that your 4200 have a C compiler option. If you can access KULT without returning an error, you already have the compiler option. If not, you will need to install one. You can obtain a compiler from Tektronix/Keithley or install one yourself. You need to use Microsoft Visual Studio Professional 2012 or 2013. KULT will not work with newer versions.
Also, there are a number of external references in the NVM library that may complicate compiling a new version of this library. The best approach is to manually copy the library to another location on the C drive and modify the existing library.
I am not quite sure about the output array being cleared because it is first sent to KITE. KITE should not be running if you are going to use KXCI. There may be another issue related to this condition rather than what you've noted.

Vince W
Keithley Applications
Keithley Applications
Posts: 108
Joined: September 22nd, 2010, 12:27 pm
Country: United States

Re: NVM measurement w/ external control-> data all zeros

Post by Vince W » January 30th, 2017, 5:24 pm

Hi. I know it has been a long time since you inquired originally, but I saw the post and thought I'd explain what is happening.

The nvm library provided on the 4200-SCS does not support using KXCI. reramSweep() in the nvm library does not return data to the output array variables (Vforce, Imeas, Time) passed in the function argument list. Instead, it passes data only using the PostDataDoubleBuffer() function. PostDataDoubleBuffer() only returns data to the KITE data sheet. As Ken P said, KITE is not running when you are using KXCI to control the instrument, so no data is returned to output variables.

As Ken P described earlier, you will need the MS Visual Studio C/C++ Compiler on your system. This is product 4200-COMPILER from Keithley/Tektronix.

To create your own version of the reramSweep() function:
  1. make a copy of reramSweep.c to a new folder, for example C:\tmp
  2. rename ALL instances of "reramSweep" in the C file to a new function name <yourfn>
  3. rename reramSweep.c to the same new function name <yourfn>.c
  4. open a command window and make the new folder you created the current directory
  5. start the Keithley Message Console by typing the command msgcon
  6. type the command kultcopy <yourfn>, the new function name above
  7. watch the Keithley Message Console window - it should show that your new library module compiled, but you will likely have linker "unresolved external" errors
  8. open KULT, open the library you just created: File->Open Library-><yourfn>
  9. select Options->Library Dependencies ... and select nvm
  10. The Build tab near the bottom of the screen should show "No Errors/Warnings Reported, Library Build was Successful"
  11. Now you can modify the <yourfn>.c file to output date to the Vforce, Imeas, and Time arrays.
Add code to <yourfn>.c where you see PostDataDoubleBuffer(...) to fill the output arrays.
For example, for Vforce, after the line which says PostDataDoubleBuffer("Vforce", resetDVForce, numresetpts);
add the lines

Code: Select all

for( j=0; j<numresetpts; j++ )
      Vforce[j] = resetDVForce[j];
And to continue the array, after the line which says PostDataDoubleBuffer("Vforce", setDVForce, numresetpts);
add the lines

Code: Select all

for( j=0; j<numresetpts; j++ )
      Vforce[j+numresetpts] = setDVForce[j];
Create the similar code for Imeas and Time output variables.

Then rebuild the library by opening the library and modified module in KULT and selecting Options->Compile and Options->Build Library.
A Greater Measure of Confidence

Post Reply

Return to “4200-SCS Semiconductor Parameter Analyzer”

Who is online

Users browsing this forum: No registered users and 3 guests