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.

call user's functions and send parameters

Use this forum for questions about Keithley Test Script Builder software.
Post Reply
Christopher
Posts: 1
Joined: April 15th, 2011, 6:46 am
Country: France

call user's functions and send parameters

Post by Christopher » April 15th, 2011, 7:45 am

Hi,
I’m using a Keithley 3706 leading via GPIB bus by software written with C++ language.
I’m using the KPCI-488LP/LPA diagnostic tool software to test scripts calling from PC.
I have a script with some functions using parameters.
function order_choice(sensor_number, a, b, c, d)

if ((c == 0) and (d == 0)) then order_1(sensor_number, a, b)
else
if ((c ~= 0) and (d == 0)) then order_2(sensor_number, a, b, c)
else
if (d ~= 0) then ordre_3(sensor_number, a, b, c, d)
end
end
end

end

My functions run correctly when I use this function in the same script file:
function test ()
order_choice (1, 101.1890, 0.3881,0 ,0 )
order_choice (1, 101.4165, 0.3725, (2.18*10^(-4)), 0)
order_choice (1, 101.3647, 0.3787, (1.39*10^(-5)), (1.95*10^(-6)))
end

test()



My goal is to delete this last function ( test() ) and call directly the function order_choice(v,w,x,y,z) from KPCI-488LP/LPA diagnostic tool software.
Can I call the function order_choice with parameters directly from KPCI-488L diag tool software :?:

thank you for your help

Gabriele V
Keithley Applications
Keithley Applications
Posts: 38
Joined: November 2nd, 2010, 6:51 am
Country: Italy

Re: call user's functions and send parameters

Post by Gabriele V » April 19th, 2011, 7:14 am

Hello Christopher,

Almost any function present in your script can be called from external software and of course you can call functions that require parameters.

This is the best way to integrate your 3706 with software like Labview.

What you have to remember is to run first the script that contain the function you are calling.

Best Regards

Gabriele

Gabriele Vittori
Application Engineer
Keithley Instruments (Italy)

Post Reply

Return to “Test Script Builder”

Who is online

Users browsing this forum: No registered users and 1 guest