LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

keithley 2200 list mode

Hello,

 

I am trying to create a list and send it to the power supply Keithley 2200

 

This code should creates a list of  5 items and trigger OUTPUT

 

Ke2200_WriteString(instrumentHandle, "TRIG: SOUR BUS");
Ke2200_WriteString(instrumentHandle, "LIST: STEP 5\n");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:MODE CONT");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:COUT 2");

Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:VOLT 1, 2V");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:VOLT 2, 2V");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:VOLT 3, 5V");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:VOLT 4, 6V");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:VOLT 5, 1V");

Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:CURR 1, 5A");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:CURR 2, 5A");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:CURR 3, 3A");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:CURR 4, 1A");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:CURR 5, 3A");


Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:WIDTH 1, 0.001S");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:WIDTH 2, 0.001S");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:WIDTH 3, 0.001S");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:WIDTH 4, 0.001S");
Ke2200_WriteString(instrumentHandle, "SOURCE:LIST:WIDTH 5, 0.001S");

Ke2200_WriteString(instrumentHandle, "SOURCE:LIST: SAV 3");
Ke2200_WriteString(instrumentHandle, "OUTPUT ON");
Ke2200_WriteString(instrumentHandle, " "SOURCE:FUNC:MODE LIST");
Ke2200_WriteString(instrumentHandle, ""*TRG");

 

 

There is no errors, but the code doesn't work. Any idea why???

 

THANKS in advance

0 Kudos
Message 1 of 6
(4,685 Views)

Hello,

 

Some questions:

Do you use the GPIB bus to communicate with the instrument?

Do you use the NI-VISA library to communicate with the instrument ?

Do you test the communication (*IDN?) with the instrument with MAX (Measurement and Automation Explorer) ?

 

Your code:

I don't see the function to initialize the communication K2200_Init (...) --> The instrumentHandle variable is a valid Handle ?

What are the error code returned by the functions Ke2200_WriteString: error = Ke2200_WriteString(instrumentHandle, "TRIG: SOUR BUS");

 

There are some syntax error in your code (regarding the doc Example 3 List Mode.pdf downloadedd from the Keithley Web site:

Line 1: character : is missing between SOURCE and BUS

Ke2200_WriteString(instrumentHandle, "TRIG: SOUR BUS"); ==> Ke2200_WriteString(instrumentHandle, "TRIGGER: SOURCE:BUS"); 

Line 2:

Ke2200_WriteString(instrumentHandle, "LIST: STEP 5\n"); ==> Ke2200_WriteString(instrumentHandle, "SOURCE:LIST: STEP 5"); 

The 2 last lines: some " to delete...

 

Best regards.

 

 

0 Kudos
Message 2 of 6
(4,655 Views)

Hello jm73,

 

Thanks for your reply

 

Do you use the GPIB bus to communicate with the instrument?

-I use both GPIB and USB it depends on the user preference.

 

Do you use the NI-VISA library to communicate with the instrument ?

-Yes

 

Do you test the communication (*IDN?) with the instrument with MAX (Measurement and Automation Explorer) ?

 

-Yes, and it works correctly

 

The 2 last lines: some " to delete...

-That was a mistake while writing the post  🙂 

 

What are the error code returned by the functions Ke2200_WriteString: error = Ke2200_WriteString(instrumentHandle, "TRIG: SOUR BUS");

- No error code

 

0 Kudos
Message 3 of 6
(4,645 Views)

I don't know the exact commands but you need to set the trigger count to the number of point s in the list and then to tell the instrument to go with a ":int" command

 

0 Kudos
Message 4 of 6
(4,629 Views)

Hello cymrieg,

 

I checked the commands list reference, there isn't anything that does that " trigger count to the number of points" 

 

0 Kudos
Message 5 of 6
(4,620 Views)

This is from page 5-6 of the current reference manual for the 2280. I don't think you want to set the arm layer to Bus trigger though.

 

*RST

:SENS:CONC:NPLC 1

:LIST1:VOLT "1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0"

:LIST1:CURR "2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0"

:LIST1:DWEL "3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0"

:LIST:SAVE:INTE 1

:LIST:RCL 1

:ARM:SOUR BUS

:TRIG:SOUR IMM

:TRIG:COUN 10

:TRIG:SAMP:COUN 10

:TRAC:CLE

:TRAC:FEED:CONT NEXT

:TRAC:FEED SENS

:TRAC:POIN 100

:LIST:STAT ON

:INIT

*TRG

*WAI

:TRAC:DATA? "READ,SOUR"

 

 

0 Kudos
Message 6 of 6
(4,598 Views)