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.

Scan Settings

7001, 7002 and Switch Cards
Post Reply
brent_shen
Posts: 11
Joined: February 25th, 2011, 10:37 am
Country: Canada

Scan Settings

Post by brent_shen » April 13th, 2011, 8:12 am

Hi there,

Could you verify the following code segment to scan 8 channels (dc voltage measurement on 101 to 107 and temperature measurement on 108)?

Assuming only 7708 is installed in slot 1 of 2701 and tcpClient is a winsock object in VB.
<Start of Code Segment>
Line 01: tcpClient.SendData "*RST" & vbCr ' Reset 2701 for discontinuous trigger mode
Line 02: tcpClient.SendData "TRAC:CLE" & vbCr ' Clear buffer for remote control
Line 03: tcpClient.SendData "TRAC:CLE:AUTO ON" & vbCr ' Enable buffer auto clear
Line 04: tcpClient.SendData "TRAC:FEED:CONT ALW" & vbCr ' Set buffer in continuous filling mode
Line 05: tcpClient.SendData "TRAC:POIN 8" & vbCr ' Set buffer size to hold 8 readings
Line 06: tcpClient.SendData "FORM:ELEM READ,CHAN" & vbCr ' Set format of readings
Line 07: tcpClient.SendData "SENS:FUNC 'VOLT',(@101:107)" & vbCr ' Set voltage measurement
Line 08: tcpClient.SendData "SENS:FUNC ’TEMP’,(@108)" & vbCr ' Set temperature measurement
Line 09: tcpClient.SendData "TEMP:TRAN TC,(@108)" & vbCr
Line 10: tcpClient.SendData "TEMP:TC:TYPE T,(@108)" & vbCr
Line 11: tcpClient.SendData "TEMP:RJUN:RSEL INT,(@108)" & vbCr
Line 12: tcpClient.SendData "ROUT:SCAN (@101:108)" & vbCr ' Set scan list
Line 13: tcpClient.SendData "ROUT:SCAN:TSO IMM" & vbCr ' Enable immediate scan, a.k.a non-analog trigger
Line 14: tcpClient.SendData "TRIG:SOUR BUS" & vbCr ' Select bus trigger source
Line 15: tcpClient.SendData "TRIG:COUN 1" & vbCr ' Set # of triggers to 1
Line 16: tcpClient.SendData "SAMP:COUN 8" & vbCr ' Set # of scanning channels to 8
Line 17: tcpClient.SendData "ROUT:SCAN:LSEL INT" & vbCr ' Enable scan
Line 18: tcpClient.SendData "INIT" & vbCr ' Initiate scan
Line 19: tcpClient.SendData "*TRG" & vbCr ' Generate a bus trigger event
Line 20: Call AppSleep(10) ' VB call to delay by 10 micor-seconds before all 8 data points are ready in 2701 buffer
Line 21: tcpClient.SendData "TRAC:DATA?" & vbCr ' Obtain data
<End of Code Segment>

Questions:
1) Is the code segment above correct to scan channels 101 to 108?
2) Does Line 6 (FORM:ELEM READ,CHAN) specify the format of the 8 data points return by 2701 as this way:
1,101,2,102,3,103,4,104,5,105,6,106,7,107,27,108
where 1,2,3,4,5,6,7 are dc voltages on channels 101 to 107 and 27 is temperature on channel 108
3) Do I need to set the buffer size on Line 5 (TRAC:POIN 8) larger than 8?

Thank you so much

Brent Shen from MDA

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

Re: Scan Settings

Post by Dale C » April 26th, 2011, 8:50 am

1.This code looks good to scan channel 101 through 108 with 101 through 107 being DCV and 108 being temperature with TCs.
2. The data will come back with reading first followed by the channel number.
3. If you want to scan more than once then yes, set the TRACE:POINTS 8 command to TRACE:POINTS 16 to go around twice or TRACE:POINTS 24 to go around the scan list three times. Remember that the SAMPLE:COUNT must equal the TRACE:POINTS number.

Post Reply

Return to “7000 Series Switch”

Who is online

Users browsing this forum: No registered users and 5 guests