Controlling RS232 (Keithley 2000) via IGOR

It is just a general question, because I have setup a measurement tool using a Keithley 2000 including Scanner Card (10 channels). It works quite fine, but only on Windows 7...no errors on this system. I transferred the IGOR software on a XP machine and there I have gotten a full crash of the system (I am not sure if IGOR crashes or if WinXP crashes) after arbitrary measurement steps.

Does anybody of you have an idea about the compatibility of the VDT on XP and Win 7.

Attached a snippet of the code using the VDT:

The waste time part is just a workaround to assure, that the Keithley accept the command.

CMD= "VDTClosePort COM7"
Execute CMD
T0=ticks
do
    //Waste the time
while(ticks<T0+Waste2)
CMD="VDTWrite/O=5/Q \"*CLS\""
Execute CMD
T0=ticks
do
    //Waste the time
while(ticks<T0+Waste2)
CMD="VDTWrite/O=5/Q \"*RST\""
Execute CMD
T0=ticks
do
    //Waste the time
while(ticks<T0+Waste2)
CMD= "VDTWrite/O=5/Q \":TRAC:FEED:CONT NEV\""
Execute CMD
T0=ticks
do
    //Waste the time
while(ticks<T0+Waste2)
CMD= "VDTWrite/O=5/Q \":ROUT:OPEN:ALL\""
Execute CMD
T0=ticks
do
    //Waste the time
while(ticks<T0+Waste2)
CMD="VDTWrite/O=5/Q \":ROUT:CLOS (@\"+num2str(Channel)+\")\""
Execute CMD
T0=ticks
do
    //Waste the time
while(ticks<T0+Waste2)
CMD="VDTWrite/O=5/Q \"READ?\""
Execute CMD
T0=ticks
do
    //Waste the time
while(ticks<T0+Waste)
CMD="VDTRead/O=5/Q Value"
Execute CMD
Quote:
Does anybody of you have an idea about the compatibility of the VDT on XP and Win 7.

I know that I and many other people have successfully used VDT and the newer VDT2 on Windows XP.

If you can find the crash log it might provide a clue. For details execute:
DisplayHelpTopic "Crashes On Windows"


Also what version of Igor are you using? Try updating to the latest.

Also you might consider converting your code to VDT2 which does not require using Execute. For details:
DisplayHelpTopic "Changes in VDT2 Relative to VDT"

Good point...I will apply the VDT2.

Actually I have exchanged the OS of the measurement computer to Win 7 and no crash occurs...strange. Maybe it is depended to the internal drivers of the RS232 and the problem is not IGOR related. Such an effect I never revealed during my time with IGOR.

Do you have a 'smarter' idea for waiting than my waste time algorithm? I have tried to read the V_VDT status, but it won't work, because I require a waiting until finished...on the COM ports.

Thanks a lot
Raik


DrRaik wrote:
Do you have a 'smarter' idea for waiting than my waste time algorithm? I have tried to read the V_VDT status, but it won't work, because I require a waiting until finished...on the COM ports.


The Sleep operation is a possibility but the only practical difference is that it avoids hogging the processor. Other than that there's nothing that comes to mind right now.

I have no experience working with this instrument, but many instruments will send a reply to acknowledge successful receipt or execution of a command. In that case you can use VDTRead2 and have it block until a response is received, which tells you that the event of interest has occurred. But whether this is possible depends on the particulars of your instrument and the specifics of what you're trying to do.
I have no experience with the Keithley 2000, but I know that the 2400 source meters allowed you to configure internal registries so that a specific bit is set when the programed routine is finished. your code would then simply check this bit periodically. Perhaps the 2000 has something similar.