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.

Trigger (bus) after a complete scan

Post Reply
CH2009
Posts: 8
Joined: October 13th, 2015, 11:01 am
Country: France

Trigger (bus) after a complete scan

Post by CH2009 » December 15th, 2015, 10:31 am

Hello

I have a DMM2701 with a multiplexing card 7706, my concern is that I would like to use the bus trigger to allow the dmm to perform another scan. First use a bus trigger which allow the dmm to perform a scan, then wait that all the scan is completed (several channels), read the data for the entire scan, and when the reading is finished, perform a new bus trigger etc... I would like to put the scpi commands in a loop. Currently I have time delay error if I do not insert a sufficient delay just after the after the command *TRG. If I use 2, 3, 4 or more channels, I would like avoid to every time change the delay value which depends if we use line synchronization, offset compensation, 2-wire or 4-wire resistances measurements ...etc

Thanks a lot

Below my code (it works but I would like avoid the delay):

viWrite(io,(ViBuf)"*TRG\n",5,&count);
Delay(0.3);


viWrite(io,(ViBuf)":TRAC:NEXT?\n",12,&count);
viRead(io,(ViBuf)buffer,100,&count);

bufferDataPosition = atof (&buffer[0]);

switch ((int)fmod(bufferDataPosition,3))
{
case 0:
bufferDataPosition = bufferDataPosition - 3;
break;
case 1:
bufferDataPosition = bufferDataPosition - 2;
break;
case 2:
bufferDataPosition = bufferDataPosition - 1;
break;
}

sprintf(buffer, ":TRAC:DATA:SEL? %i,3\n",(int)bufferDataPosition);

viWrite(io, (ViBuf) buffer, strlen(buffer), &count);
viRead(io,(ViBuf)buffer,1000,&count);


Scan (buffer, "%s>%6f[x]", measuredData);

Fmt (buffer, "%s<%f", measuredData[0]);
Fmt (buffer, "%s<%f", measuredData[1]);
Fmt (buffer, "%s<%f", measuredData[2]);
Fmt (buffer, "%s<%f", measuredData[3]);
Fmt (buffer, "%s<%f", measuredData[4]);
Fmt (buffer, "%s<%f", measuredData[5]);

printf("%10.0f %10.3f %10.3f %10.3f %10.3f %10.3f %10.3f\n",
bufferDataPosition, measuredData[0], measuredData[1],
measuredData[2], measuredData[3], measuredData[4],
measuredData[5]);

Dale C
Keithley Applications
Keithley Applications
Posts: 2849
Joined: June 10th, 2010, 6:22 am
Country: United States
Contact:

Re: Trigger (bus) after a complete scan

Post by Dale C » December 15th, 2015, 12:30 pm

After the *TRG the unit will start scanning.
You can either use the delay or set up the unit to SRQ on buffer full.
There will be a delay either way. The unit needs the time to go through the channels and make the measurements.
For SRQ on buffer try these commands.
*SRE 1
:STAT:MEAS:ENAB 512

I believe that will SRQ on buffer full.
Or you could set the timeout in your program to longer than it takes the unit to scan and measure the channels.
Either method is a viable solution.

Post Reply

Return to “Series 2700 Multimeter/Data Aquisition/Switch System”

Who is online

Users browsing this forum: No registered users and 2 guests