tds3000: Tektronix 3000 series

Oscilloscope device support


Release 2.3

Nicholas DiMonte

December 2005



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
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 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. All three can use the new  asynDriver which is a general purpose facility for interfacing device specific code to low level communication drivers.

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.

Back

Acknowledgments

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

Database overview


Scope channel configuation.
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


Back



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:
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 display

TRIGGER Display:
This display provides the basic trigger function of the scope.

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
interferring 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 inferquent 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 originaly
developed using the EPICS GPIB support interfacing to an NI-1014 VME module. The SRQ never realy
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.

TDS3000 Acquire display

UTILITY Display:
This display provides access 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 display


Feel free to edit these displays to your appilcation. 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 asscoiated with each of the composite objects. Basicaly, 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


Startup file configuration

This is the recommended configuration for a soft IOC using Asyn support. The configuration
below is used to control eight TDS300 series scopes at the Advanced Photon Source.

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

cd ${TOP}

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

# reboot scopes........use IP address
TDS3000Reboot xxx.xxx.xxx.47
TDS3000Reboot xxx.xxx.xxx.48
TDS3000Reboot xxx.xxx.xxx.49
TDS3000Reboot xxx.xxx.xxx.50
TDS3000Reboot xxx.xxx.xxx.53
TDS3000Reboot xxx.xxx.xxx.54
TDS3000Reboot xxx.xxx.xxx.51
TDS3000Reboot xxx.xxx.xxx.52
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)
vxi11Configure("L2", "xxx.xxx.xxx.49", 0, 0.0, "inst0", 0)
vxi11Configure("L3", "xxx.xxx.xxx.50", 0, 0.0, "inst0", 0)
vxi11Configure("L4", "xxx.xxx.xxx.53", 0, 0.0, "inst0", 0)
vxi11Configure("L5", "xxx.xxx.xxx.54", 0, 0.0, "inst0", 0)
vxi11Configure("L6", "xxx.xxx.xxx.51", 0, 0.0, "inst0", 0)
vxi11Configure("L7", "xxx.xxx.xxx.52", 0, 0.0, "inst0", 0)
#asynSetTraceMask("L1",3,0xff)
#asynSetTraceIOMask("L1",3,0x2)

## Load record instances
dbLoadRecords("db/scopeMessage.vdb","scope=RF1:HV:,L=0,A=0,ASG=RF1CTL,rfsys=1")
dbLoadRecords("db/scopeMessage.vdb","scope=RF2:HV:,L=1,A=0,ASG=RF2CTL,rfsys=2")
dbLoadRecords("db/scopeMessage.vdb","scope=RF3:HV:,L=2,A=0,ASG=RF3CTL,rfsys=3")
dbLoadRecords("db/scopeMessage.vdb","scope=RF4:HV:,L=3,A=0,ASG=RF4CTL,rfsys=4")
dbLoadRecords("db/scopeMessage.vdb","scope=RF1:LL:,L=4,A=0,ASG=RF1CTL,rfsys=5")
dbLoadRecords("db/scopeMessage.vdb","scope=RF2:LL:,L=5,A=0,ASG=RF2CTL,rfsys=6")
dbLoadRecords("db/scopeMessage.vdb","scope=RF3:LL:,L=6,A=0,ASG=RF3CTL,rfsys=7")
dbLoadRecords("db/scopeMessage.vdb","scope=RF4:LL:,L=7,A=0,ASG=RF4CTL,rfsys=8")

dbLoadRecords("db/TDS3000.vdb","scope=RF1:HV:,L=0,A=0,ASG=RF1CTL,Name=RF1-HV")
dbLoadRecords("db/TDS3000.vdb","scope=RF2:HV:,L=1,A=0,ASG=RF2CTL,Name=RF2-HV")
dbLoadRecords("db/TDS3000.vdb","scope=RF3:HV:,L=2,A=0,ASG=RF3CTL,Name=RF3-HV")
dbLoadRecords("db/TDS3000.vdb","scope=RF4:HV:,L=3,A=0,ASG=RF4CTL,Name=RF4-HV")
dbLoadRecords("db/TDS3000.vdb","scope=RF1:LL:,L=4,A=0,ASG=RF1CTL,Name=RF1-LL")
dbLoadRecords("db/TDS3000.vdb","scope=RF2:LL:,L=5,A=0,ASG=RF2CTL,Name=RF2-LL")
dbLoadRecords("db/TDS3000.vdb","scope=RF3:LL:,L=6,A=0,ASG=RF3CTL,Name=RF3-LL")
dbLoadRecords("db/TDS3000.vdb","scope=RF4:LL:,L=7,A=0,ASG=RF4CTL,Name=RF4-LL")

dbLoadRecords("db/asynRecord.db","P=RF1:,R=HV:scopeAS,PORT=L0,ADDR=0,OMAX=0,IMAX=0")
dbLoadRecords("db/asynRecord.db","P=RF2:,R=HV:scopeAS,PORT=L1,ADDR=0,OMAX=0,IMAX=0")
dbLoadRecords("db/asynRecord.db","P=RF3:,R=HV:scopeAS,PORT=L2,ADDR=0,OMAX=0,IMAX=0")
dbLoadRecords("db/asynRecord.db","P=RF4:,R=HV:scopeAS,PORT=L3,ADDR=0,OMAX=0,IMAX=0")
dbLoadRecords("db/asynRecord.db","P=RF1:,R=LL:scopeAS,PORT=L4,ADDR=0,OMAX=0,IMAX=0")
dbLoadRecords("db/asynRecord.db","P=RF2:,R=LL:scopeAS,PORT=L5,ADDR=0,OMAX=0,IMAX=0")
dbLoadRecords("db/asynRecord.db","P=RF3:,R=LL:scopeAS,PORT=L6,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 "RF2:HV:scopeAS.TB0","0"
dbpf "RF3:HV:scopeAS.TB0","0"
dbpf "RF4:HV:scopeAS.TB0","0"
dbpf "RF1:LL:scopeAS.TB0","0"
dbpf "RF2:LL:scopeAS.TB0","0"
dbpf "RF3:LL:scopeAS.TB0","0"
dbpf "RF4:LL:scopeAS.TB0","0"
epicsThreadSleep(5)

## Start any sequence programs
seq scopeAutoArmPrint,"scope=RF1:HV:"
seq scopeAutoArmPrint,"scope=RF2:HV:"
seq scopeAutoArmPrint,"scope=RF3:HV:"
seq scopeAutoArmPrint,"scope=RF4:HV:"
seq scopeAutoArmPrint,"scope=RF1:LL:"
seq scopeAutoArmPrint,"scope=RF2:LL:"
seq scopeAutoArmPrint,"scope=RF3:LL:"
seq scopeAutoArmPrint,"scope=RF4:LL:"

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