tds3000: Tektronix 3000/5000 series

Oscilloscope device support


Release 2.5

Nicholas Di Monte

April 2012



License Agreement

This product is available via the open source license described at the end of this document.


Contents

Overview of tds3000
Status
History
Acknowledgments
Database Overview 
Display Overview
Sequence Program Examples
Tektronix Support Documentation
Startup file configuration
asynRecord Support
License Agreement


Overview of tds3000

The tds3000 device support is a general purpose facility for interfacing to all the oscilloscopes in the TDS 3000 and 5000 series. The intent of this device support is to provide an interface though EPICS that had a simple user interface. All of the main controls on the these scopes are provided with an easy to use displays. These displays have been developed with MEDM which has been a proven and reliable display manager for EPICS.

Interfacing to these scopes can be accomplished though GPIB, Serial and Ethernet.

Back

Status

This version provides

Back

History

This device support  was originally developed for the TDS3054 GPIB interface using the gipbCore under EPICS R3.13. The limitation at that time was a waveform of only 500 data points, but a simple display control was the main focus. This scope support was only intended for the RF group at the APS. The scopes where only configured for single sequence trigger to catch faults with the RF systems. They also wanted the scopes to print the displays and then rearm for the next event. With the release of EPICS R3.14, waveform data of 10k words, a total of 20k bytes per waveform, was now achievable. With the asynManager, the basic GPIB device support was slightly modified to support serial and Ethernet interfaces. The scopes in the RF systems now use the Ethernet interface (vxi11 protocol), waveforms are now stored in SDDS format, a hard copy is still being printed and the scopes are being rearmed and everyone is now happy.

The initial device support for the TDS3054 was based on the Hp54540 device support in an attempt to make a common scope support package. Since the Tektronix and the HP used different commands which were not compatible with each other, the common scope support was abandoned. Most of the principle design from the Hp54540 has been mimicked in the TDS3000 support, but the TDS3000 support has add features and user friendly MEDM display.

Support has now been added for the TDS5000 series of oscilloscopes. The commands for the 3000 and 5000 series differ somewhat so an application must specify devTDS3000.dbd or devTDS5000.dbd as appropriate. A single database file (TDSxxxx.vdb) was provided in the past to supports both families, but added features in the TDS5000 family made in necessary to create two separate databases, TDS3000.vdb and TDS5000.vdb. The FAMILY macro is no longer needed since the new databases are hardware specific.

The need for separate databases stemmed from several factors. The first is that not all remote command were the same, which would cause timeouts. Second, record length are handled differently between the two series. The TDS3000 series only has two options, 500 or 10k, while the TDS5000 series could go a low as 500 to as high as 8M in single channel mode. The record length became an issues with the TDS5000 series when ever the time scale would change. The record length would automatically adjust to a smaller value, but would never adjust to a larger size on its own. The TDS5000 database tries to readjust the record length back to the setting defined in the start-up command file whenever it detects a length change. The third reason, the TDS5000 could write waveform data to a network drive which the TDS3000 series could not. File function are different between the two series.

Back

Acknowledgments

Eric Norum
Who had helped me convert the TDS3054 device support, which only supported GPIB, to the TDS3000 device support which now uses the asynDriver.
Back

Database overview


Scope channel configuration.
Note: n is 1 to 4.

$(scope)chan{n}CoupleMI Channel n Couple status
$(scope)chan{n}CoupleMO Channel n Couple control
$(scope)chan{n}EnableBI Channel n On/Off status
$(scope)chan{n}EnableBO Channel n On/Off Control
$(scope)chan{n}OffAI Channel n Offset value
$(scope)chan{n}OffAO Channel n Offset setting
$(scope)chan{n}VdivAI Channel n Voltage per division analog value
$(scope)chan{n}VdivMI Channel n Voltage per division value
$(scope)chan{n}VdivMO Channel n Voltage per division setting
$(scope)chan{n}_ImpedBI Channel n Impedance value
$(scope)chan{n}_ImpedBO Channel n Impedance setting

Scope time settings.

$(scope)timeBaseAI Read Horizontal Time Scale
$(scope)timeDelayAI Read Time Delay
$(scope)timeDelayAO Write Time Delay
$(scope)timeDivAMO Select Time/Div Magnitude
$(scope)timeDivAO Set Horizontal Time Scale
$(scope)timeDivBMO Select Time/Div unit
$(scope)timeModeMI Read Time Mode
$(scope)timeModeMO Set Time Mode

Scopes trigger settings.

$(scope)timeRefAI Trigger position
$(scope)timeRefMO Set Trigger position
$(scope)holdoffAI Trigger A Holdoff time
$(scope)holdoffAO Set Trigger A Holdoff time
$(scope)trigLevAI Read Trigger Level
$(scope)trigLevAO Set Trigger Level
$(scope)trigSlopeMI Read Trigger Slope
$(scope)trigSlopeMO Set Trigger Slope
$(scope)trigSourMI Read Trigger Source
$(scope)trigSourMO Select Trigger Source


Scopes acquisition control and waveform readbacks.
Note: n is 1 to 4.

$(scope)chan{n}ScaledWaveWF Waveform n Scaled data
$(scope)scaledTimeAxisWF Scaled time used for Scaled Waveform data
$(scope)TimeAxisCountLI Counts the number of record points
$(scope)acquireStatBI Scope Acquire Status
$(scope)singleSeqBI Acquire Single trigger
$(scope)singleSeqBO Select sequence mode
$(scope)runBO Run Normal acquisition
$(scope)stopBO Stop Normal acquisition
$(scope)stopReadRunSQ Single read cycle
$(scope)triggerStateMI Scope trigger state for acquisition
$(scope)ScopeTriggedCC Scope Trigger status


Scopes misc functions.

$(scope)Name Scope ID label
$(scope)GPIBenableBO Remote/Local control
$(scope)autoScaleBO Auto scale the scope
$(scope)erasePlotBO Clears MEDM display waveforms
$(scope)initBO Initialize scope to define values at IOC power up or when scope is set to remote.
$(scope)resetBO Sends *RST command to scope
$(scope)readSetupWF Reads the oscilloscope setting.
$(scope)writeSetupWF Not valid for the TDS3000 series
$(scope)recallMO Recall scope setup 1-10
$(scope)saveMO Save scope setup 1-10
$(scope)displayCtlMO Select 1 of 6 MEDM scope control displays
$(scope)displayCtl1MO Select single or multi MEDM waveform display


Scopes print commands and print status, front panel display controls.
Note: These pvs are also used in the AutoPrint SNL program.

$(scope)scopeBusyBI Printing OR Acquire status
$(scope)scopeInUseMO User definable Semaphore
$(scope)ClearEventsBO Clear scopes Event Status
$(scope)DESERegAI Read Device Event Status Enable Register
$(scope)DESERegAO Set Device Event Status Enable Register
$(scope)EventQueueAI Check for pending Events
$(scope)SESRegAI read Standard Event Status Register
$(scope)printDisplayBO Print the display
$(scope)printErrBO SNL print error status
$(scope)printerAbortBO Abort print operation
$(scope)printerFormatMI Read print format
$(scope)printerFormatMO Write print format
$(scope)printerPortMI Read printer port type
$(scope)printerPortMO Write printer port type
$(scope)printerSetupBO Configure printer port
$(scope)clearMenuBO Clear scope display of any menus
$(scope)frontPanelLockBI Front Panel Lock status
$(scope)frontPanelLockBO Lock Front Panel controls
$(scope)ethernetNameSI Ethernet name of scope
$(scope)WF_timeStampTS Time stamp of last single sequence trigger


Waveform data in raw format, not scaled.
By default, these pvs are disabled.

$(scope)ref{n}WaveWF Raw reference waveform data (not tested)
$(scope)chan{n}WaveWF Raw waveform data (not tested)
$(scope)WFenableBO Enable these waveforms to be updated.


Waveform preamble information
Note: These fields are provided for diagnostics. All other pvs must stop scanning. Then the DAT:SOURCE
command must issued to select the channel to view.

$(scope)countAI No count value (not used)
$(scope)pointsAI Number of waveform points
$(scope)XincAI Sampling interval in seconds or Hz per point
$(scope)XorAI Not used
$(scope)XrefAI First sample in waveform
$(scope)YincAI Vertical scale;e factor, usually in volts
$(scope)YorAI Vertical offset of a waveform.
$(scope)YrefAI Vertical position of a waveform

File Format Commands (TDS5000 only)
Note: These fields are provided for diagnostics. All other pvs must stop scanning. Then the DAT:SOURCE
command must issued to select the channel to view.
$(scope)fileFormatMO/I Set/reads the file format type
$(scope)dirPathSO/I Set/reads the directory path for channel and reference waveforms.
$(scope)WrFileCh[1-4]SO
Set file name and write the channel waveform to location specified by dirPathSO
$(scope)WrFileRef[1-4]SO Set file name and write the reference waveform to location specified by dirPathSO
$(scope)saveSO Set file name and write scope configuration to location specified by dirPathSO
$(scope)recallSO Set file name and read scope configuration from location specified by dirPathSO
$(scope)WrFileCh[1-4]WF Write the specified channel waveform to a storage device with a time-stamp appended to the file name.


MEDM display overview

Generic MEDM displays were created to mimic the TDS3000 series front panel scope controls. Most of the basic functions of the scope will be found in these display. Each display is shown below with a brief description.

STATUS Display:
This display shows the status for all four channels. Each channel is color matched to the scope traces.
In this display a Multi waveform mode is displayed to allow each channel to have its own vertical
scale. A single waveform display mode can be selected by selecting the SCOPE DISPLAY menu.
This mode is not shown.

TDS3000 Status display

VERTICAL Display:
This display gives the user access to each channels vertical settings. Each channel can be turned ON
or OFF in addition to changing the characteristics of each channel.

TDS3000 Vertical display

HORIZONTAL Display:
In release 2.5 the record length status was added to the TDS3000 series while the status and control was added to the TDS5000 series. In the TDS5000 series the requested length is the defined value in the start-up command file. The "actual" length is the current record length for that channel. The scope record length can be changed on this screen, but this may also change the time division. Conversely, changing the time division unit may change the record length, which is why an option to change the record length has been provided.  This display has a reduced set of commands to control the horizontal settings. If finer adjustments are needed or other options need to be set, then the user needs to make the adjustments via the local scope front panel or other remote options. See Other Remote Option for more details.

TDS3000 Horizontal

tds5000_horizontal

TRIGGER Display:
This display provides the basic trigger function of the scope. In release 2.5, read backs are provided.

TDS3000 Trigger diplay

ACQUIRE Display:
This display controls the acquisition of the scope. Two modes are provided, single sequence and normal
mode. In Single Sequence mode, the Normal acquisition controls are disabled to prevent the user from
interfering with single sequence operation. To place the scope in single sequence mode, select
SEQUENCE and then click on "Single SQ" button. The single sequence armed indicator should come
on in about 5 seconds. Once a trigger is received, the displays will update in about 5 to 10 seconds. This
is due to the scan rate being set to 5 seconds. In most cases this will not be an issue since single sequence
mode is used to capture a very infrequent event. If however a faster update is desired, change pv
$(scope)readScaledWfsCC.SCAN field to a faster rate. SRQs would be nicer, but this was originally
developed using the EPICS GPIB support interfacing to an NI-1014 VME module. The SRQ never really
worked for the Tektronic scopes, so this scope package just simply polls the Acquire and Trigger
status. Once the scope has triggered, the waveforms are acquired and then the MEDM display is updated.

Normal mode has a RUN and STOP buttons to control the waveform acquisition. A scan rate menu
is provided to control the update rate of the waveforms. An old legacy function called Stop/Read/Run
is provided to pause the update cycle to insure all four waveforms are read with the same trigger event.
The number below the Erase button is the delay value in seconds from the time the last waveform is read
from the scope to the time the scope is set to RUN state again.

The Erase button will only erase the MEDM waveforms being displayed. This function will not erase the
waveforms at the scope.

The AutoSet button will change the vertical and horizontal setting to match the current channel input
signals.

The Reset button will issue the *RST command followed by $(scope)initBO pv which will reconfigure
the scopes operating parameters. This command will not change the vertical or horizontal settings.

In release 2.5, Average Samples and Average Mode was added for both series while Sample Mode was only added to the TDS5000 series.

TDS3000 Acquire display

The Sampling Mode options allow the scope to be in either "Real-Time" (RT), "Equivalent-Time" (ET), or "Interpolation" (IT) sampling.

tds5000_acquire

UTILITY Display:
This display provides access to printer functions and configuration functions. The Configure Printer
button does the following: Ink saver ON, landscape, color waveforms, Ethernet port and format set to
EPSCOLOR. The first three parameter is set by $(scope)printerSetupBO record. The Ethernet port is
selected by
$(scope)printerPortMO and the format is selected by $(scope)printerFormatMO. Use these
records to change the default settings.

Also, a network printer must be configured on the scope if a network printer is used.

tds3000_utility

The TDS5000 series has a better option than the printer or floppy/USB drive, it can write the waveforms files to some server. Click on the File Commands button to get the related display. See below.

tds5000_utility

The File Commands format defaults to "Internal" but can changed at anytime. The "Set directory path..." is used for the individual "Channel" and "Reference" waveforms. Specify desire file name for "Channel" and "Reference" but keep it to a maximum of 40 characters. These files will be over written if the file name stays the same.

The bottom section appends a time stamp to the end of the file name when ever it is saved. To save channel one waveform, type in file name in this format: <drive>:/<path>/<filename.wfm>, when this record gets processed, it will write the file to the specified location. Ex:

For #1 is set to "z:/beamdump/rf1hvps.wfm" will produce a named

"z:/beamdump/rf1hvps2012-04-19_11;45;10.wfm". Sorry for the ";" character, but the ":" is not valid on the TDS5000 series.

tds5000_file


Feel free to edit these displays to your application. A word of caution. I would advise changing the eight composite objects on the tds3000_c.adl file. Instead, edit the eight adl files that are associated with each of the composite objects. Basically, each composite object is linked to a composite file. These composite file are made to be invisible until a pv is set to the correct value. The six composite files displayed on the right hand side such as STATUS, VERTICAL, etc. are controlled by pv $(scope)displayCtlMO, while the two waveform displays are controlled by pv $(scope)displayCtl1MO. By just editing the composite files you reduce the headache of editing overlapping objects.
Back


Sequence Program Examples

I have provided an example sequence program, one the TDS3000 and another for the TDS5000. The main idea here is that this program will arm your scope in a single-sequence mode, wait for a trigger, once trigger is received print data to printer or write data out to a file, then re-arm for the next trigger event. The TDS3000 uses the program TDS3000autoArmPrint.st and is mainly setup for printer operations due to the limitation to do network file transfers. The "C" version of this series has a USB drive, so I guess one could implement file transfers similar to the TDS5000 sequence program. But who wants to walk out to swap out USB drives.

The TDS5000 uses TDS5000autoArmSave.st and is configured to write waveform data to files with time-stamp appended to the file name. See tds5000_setup for further info.

Both programs are designed to work at the Advance Photon Source so they both check for the beam current of the storage ring. If below 10mA, the program pauses to avoid false triggers which can occur during our machine study periods or maintenance shutdown periods. You must edit them to remove and/or add your own system conditions.

Tektronix Support Documentation

TDS3000 User Manual
TDS3000 Programmer Manual

TDS5000 User Manual
TDS5000 Programmer Manual



Startup file configuration

This is the recommended configuration for a soft IOC using Asyn support. The configuration
below is used to control one TDS3000 series scope and one TDS5000 series scope.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
< envPaths
< envParams

cd ${TOP}

## Register all support components
dbLoadDatabase("dbd/rf.dbd",0,0)
rf_registerRecordDeviceDriver(pdbbase)

# ONLY for TDS3000 scopes
# reboot scopes........use IP address
TDS3000Reboot xxx.xxx.xxx.47
epicsThreadSleep(60)

## Set up IOC/hardware links
vxi11Configure("L0", "xxx.xxx.xxx.47", 0, 0.0, "inst0", 0)
vxi11Configure("L1", "xxx.xxx.xxx.48", 0, 0.0, "inst0", 0)

## Load record instances
# Ex for TDS3000
dbLoadRecords("db/TDS3000.vdb","scope=RF1:HV:,L=0,A=0,ASG=RF1CTL,Name=RF1-HV")
dbLoadRecords("db/asynRecord.db","P=RF1:,R=HV:scopeAS,PORT=L0,ADDR=0,OMAX=0,IMAX=0")
# Ex for TDS5000
dbLoadRecords("db/TDS5000.vdb","scope=S:BM:,L=1,A=0,ASG=,Name=SR Beam")
dbLoadRecords("db/asynRecord.db","P=S:,R=BM:scopeAS,PORT=L1,ADDR=0,OMAX=0,IMAX=0")


epicsThreadSleep(5)
cd ${TOP}/iocBoot/${IOC}
iocInit()

# Turn off error messages, this will allow scope to be powered off
# without causing error messages on the IOC console.
dbpf "RF1:HV:scopeAS.TB0","0"
dbpf "S:BM:scopeAS.TB0","0"

epicsThreadSleep(5)

## Start any sequence programs
# NOT necessary for normal operations!
# For TDS3000
dbpf "RF1:HV:RF_MessageBoxMO.FFVL","1"
seq scopeAutoArmPrint,"scope=RF1:HV:"
# For TDS5000
seq scopeAutoArmSave,"scope=S:BM:"


Back

asynRecord: Generic EPICS Record Support

A special record type call asynRecord is provided. It is recommended to use this record as shown in the st.cmd file.  Details are described in asynRecord. This section provides a brief description of how to use it.

Each IOC can load one or more instances of asynRecord. An example is:

cd ${ASYN}
dbLoadRecords("db/asynRecord.db","P=asyn,R=Test,PORT=L0,ADDR=15,IMAX=0,OMAX=0")

The example creates a record with name "asynTest" (formed from the concatenation of the P and R macros) that will connect to port "L0" and addr 15. After the ioc is started, it is possible to change PORT and/or ADDR. Thus a single record can be used to access all asyn devices connected to the IOC. Multiple records are only needed if one or more devices need a dedicated record.

An medm display is available for accessing an asynRecord. It is started as follows:

cd <asyn>/medm
medm -x -macro "P=asyn,R=Test" asynRecord.adl

The following medm display appears.

asynRecordDebug

Back

License Agreement

Copyright (c) 2005 University of Chicago All rights reserved.
tds3000 is distributed subject to the following license conditions:

SOFTWARE LICENSE AGREEMENT
Software: tds3000

1. The "Software", below, refers to tds3000 (in either source code, or
binary form and accompanying documentation). Each licensee is
addressed as "you" or "Licensee."

2. The copyright holders shown above and their third-party licensors
hereby grant Licensee a royalty-free nonexclusive license, subject to
the limitations stated herein and U.S. Government license rights.

3. You may modify and make a copy or copies of the Software for use
within your organization, if you meet the following conditions:
a. Copies in source code must include the copyright notice and this
Software License Agreement.
b. Copies in binary form must include the copyright notice and this
Software License Agreement in the documentation and/or other
materials provided with the copy.

4. You may modify a copy or copies of the Software or any portion of it,
thus forming a work based on the Software, and distribute copies of
such work outside your organization, if you meet all of the following
conditions:
a. Copies in source code must include the copyright notice and this
Software License Agreement;
b. Copies in binary form must include the copyright notice and this
Software License Agreement in the documentation and/or other
materials provided with the copy;
c. Modified copies and works based on the Software must carry
prominent notices stating that you changed specified portions of
the Software.

5. Portions of the Software resulted from work developed under a U.S.
Government contract and are subject to the following license: the
Government is granted for itself and others acting on its behalf a
paid-up, nonexclusive, irrevocable worldwide license in this computer
software to reproduce, prepare derivative works, and perform publicly
and display publicly.

6. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY
OF ANY KIND. THE COPYRIGHT HOLDERS, THEIR THIRD PARTY LICENSORS, THE
UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND THEIR
EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME
ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS,
OR USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF THE
SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT
THAT THE SOFTWARE WILL FUNCTION UNINTERRUPTED, THAT IT IS ERROR-FREE
OR THAT ANY ERRORS WILL BE CORRECTED.

7. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDERS, THEIR
THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT
OF ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE,
INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS OR LOSS OF DATA, FOR ANY
REASON WHATSOEVER, WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF
CONTRACT, TORT (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR
OTHERWISE, EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE
POSSIBILITY OF SUCH LOSS OR DAMAGES.

Back