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.

LabView and 2651a handshaking

Model 2651A
Post Reply
shoverbj
Posts: 8
Joined: February 26th, 2014, 1:25 pm
Country: United States

LabView and 2651a handshaking

Post by shoverbj » February 26th, 2014, 1:40 pm

I have altered the Lua voltage sweep code to perform a test on a my DUT. The code runs the sweep and then uses the print(*some_variable*) to display results of the test and also saves the read buffers. All this works beautifully through TSP Express or TSB Embedded.

Since this 2651a unit will be used as an end-of-line test fixture, I wanted to create a user friendly control screen through LabView. I am able to get LabView to run the code either through just sending it a finaltest.run() (the "finaltest" script is stored on the 2651a) or by just sending it the entire script from LabView. The issue that I am having is that LabView will stop running before the 2651a has completed it's sweep and given the results. Is there a vi somewhere that has a "script still running" boolean that can be used in a while loop? I've looked and am not finding anything. The script doesn't run for an exact amount of time everytime, so it's not like I could just put a "this many seconds" delay on it.

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

Re: LabView and 2651a handshaking

Post by Andrea C » February 27th, 2014, 4:15 am

Hello,

You could use the status subsystem to raise an SRQ when the sweep is completed. Use LabVIEW and VISA VIs to wait for request for service (RQS).

Attached is a LabVIEW ver 2010 example for loading a script that performs a sweep and programming 2600A or 2600B to assert SRQ when sweep is completed.

Andrea
Attachments
26xxA_Load_Run_Script_with_SRQ_VSweep.vi
LabVIEW ver 2010 voltage sweep with SRQ
(64.72 KiB) Downloaded 1202 times

shoverbj
Posts: 8
Joined: February 26th, 2014, 1:25 pm
Country: United States

Re: LabView and 2651a handshaking

Post by shoverbj » March 3rd, 2014, 9:58 am

Thank you Andrea, that code helped lead me in the right direction.

My next problem, is that this SMU will be put into a production environment where it will need to have some safety features.

I am having difficulty figuring out how to send the unit an "abort" call (with a simple front panel button) while it is currently running the sweep script. I guess, do you have any suggestions on how to "override" what the SMU is currently doing in order to cancel the sweep. I would ideally like to abort the script, turn off the output, and reset the SMU, I can do all this in a separate script, but LabView seems to want to complete the current action (the sweep) before polling the abort button.

shoverbj
Posts: 8
Joined: February 26th, 2014, 1:25 pm
Country: United States

Re: LabView and 2651a handshaking

Post by shoverbj » March 3rd, 2014, 2:04 pm

Currently I have a case structure that contains is triggered by a boolean button. Fed into the case structure is the output of the initialize SMU vi and on the output of the case structure is close SMU vi. Inside the true is the abort smu vi and inside the false case is basically the code provided above. This still does not abort the sweep.

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

Re: LabView and 2651a handshaking

Post by Andrea C » March 4th, 2014, 5:16 am

If you use LabVIEW's highlight execution feature (on wiring diagram window), I think you will see that once the Wait for RQS vi is entered, the code execution sits there and waits. It will not process any other inputs.

If you examine the implementation of the Wait for RQS, you'll see that it is using the VISA Read Status Byte.

You could replace the blocking Wait for RQS with some logic that loops until you read the expected value from the status byte OR you have pushed your abort button.

In the example I had posted, the Operation Summary Bit (OSB) will go to logic 1 state when the sweep is complete. This OSB is bit 7 in the status byte, so loop until you get value of 128 from the VISA Read STB.

Alternately, take a look at the output enable feature of the 2651A. If you give your operator a hardware switch, they could directly interrupt the 2651A if using the output enable feature.

Post Reply

Return to “2651A High Current SourceMeter”

Who is online

Users browsing this forum: No registered users and 1 guest