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.

Loadandrunscript in the nonvolatile memory

Use this forum for questions about Keithley Test Script Builder software.
Post Reply
sebbastiannn
Posts: 2
Joined: November 23rd, 2021, 5:56 am
Country: Germany

Loadandrunscript in the nonvolatile memory

Post by sebbastiannn » November 23rd, 2021, 7:22 am

Hello :D

I would like to save my Lua script in nonvolatile memory on the Keithley 2614B.
I am using a Keithley 2614B (connected via USB) and wanted to do this via the TSB Software. The system was switched from a 2601B to 2614B.
For the measurements on the old keithley everything was controlled via Labview and it needs the "hysteresis" function (see Lua script), but I just can't get it into memory.... :?
When I put the script into the TSB I get the Error:
2003, EndScript without LoadScript
-285, TSP syntax error at line 1: `=' expected near `Hysteresis'.


I tried to google this but I only found out that in TSB itself you don't have to use loadandrunsscript. However, in the Keithley 2600B manual I found this:
1. Load a script (see Create and load a script (on page 6-3)).
2. Send the command scriptVar.save("/usb1/filename.tsp"), where scriptVar is the
variable referencing the script and filename.tsp is the name of the file
Means that I have to use loadscript, if not I get the error that it doesn't know the script name.
The script itself should be correct, because the same was used before on the old Keithley 2601B to measure :| .
In the code itself is still missing the Hysterese.save() but at the moment it doesn't even work like that haha

This is definitely something simple i'm missing, I hope you have some advice :D

Code: Select all


loadandrunscript Hysterese
function HystereseV(startv, stopv, stepv, points)
htable = {}
count = 0
if startv < stopv then
while count < points do
htable[count + 1] = startv + stepv * count
count = count + 1
end
while count < points * 2 do
up = count - points
htable[count + 1] = stopv - stepv * up
count = count + 1
end
else
while count < points do
htable[count + 1] = startv - stepv * count
count = count + 1
end
while count < points * 2 do
up = count - points
htable[count + 1] = stopv + stepv * up
count = count + 1
end
end
smua.trigger.source.listv(htable)
end
endscript


sebbastiannn
Posts: 2
Joined: November 23rd, 2021, 5:56 am
Country: Germany

Re: Loadandrunscript in the nonvolatile memory

Post by sebbastiannn » November 24th, 2021, 7:31 am

Hey :)
I found out that the command loadandrunscript is used when you want to feed the script with usb stick.
I will try this tomorrow i hope it works.
But I would still be interested in what changes I would have to make to the script, that I could save it via the TSB software directly to the Keithley without using a USB stick (just personal intrested) :D

Andrea C
Keithley Applications
Keithley Applications
Posts: 1659
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: Loadandrunscript in the nonvolatile memory

Post by Andrea C » December 3rd, 2021, 7:16 am

Hello,

To load your script from Test Script Builder tool, use the Run Configurations for the TSP Project in the navigator.
Here I do very simple beep script:
TSB_2600B_Load_Script_to_Memory.PNG
TSB for loading script to instrument memory
TSB_2600B_Load_Script_to_Memory.PNG (50.97 KiB) Viewed 57 times
Here you can see the result on the instrument NVMemory. Use Load button; navigate to scripts. Scroll to your script and press enter.
This loads to the runtime memory and makes available for execution.
Press Run button to execute it.
TSB_2600B_Loaded_Script.PNG
Instrument front panel
TSB_2600B_Loaded_Script.PNG (28.6 KiB) Viewed 57 times
Last: from the instrument console, you can remove scripts:
TSB_2600B_Delete_Script_from_Memory.PNG
TSB for removing scripts from instrument memory
TSB_2600B_Delete_Script_from_Memory.PNG (20.27 KiB) Viewed 57 times
Andrea

Post Reply

Return to “Test Script Builder”

Who is online

Users browsing this forum: No registered users and 1 guest