On May 1, 2003, VXI Technology, Inc. acquired Agilent Technology’s mechanical data acquisition product
segment. During the transition period, Agilent branded manuals will be provided with the dynamic and static data
acquisition products until the manuals have been rebranded. The following products are provided for in this manner.
VT1413C E1413C 64-Channels Muxed to 16 Bit, 100 kSamples/s A/D
VT1415A E1415A Algorithmic Closed Loop Controller
VT1419A E1419A Multi-Function Measurement and Control
VT1422A E1422A Remote Channel Multi-Function DAC Module
VT1501A E1501A Direct Input 8-Channel SCP
VT1502A E1502A Low Pass Filter Signal Conditioning Plug-On
VT1503A E1503A Gain/Filter SCP
VT1505A E1505A Current Source SCP
VT1506A E1506A 120 Ω Strain Gauge SCP
VT1507A E1507A 350 Ω Strain Gauge SCP
VT1508A E1508A 8-Channel Fixed x 16 Gain/Filer SCP
VT1509A E1509A 8-Channel Fixed x 64 Gain/Filter SCP
VT1510A E1510A 4-Channel Sample and Hold SCP
VT1511A E1511A 4-Channel Transient Strain SCP
VT1512A E1512A Low Pass Filter Signal Conditioning Plug-On
VT1513A E1513A Attenuator Input SCP
VT1518A E1518A Resistance Measurement SCP
VT1529B E1529B 32 Ch. Remote Strain Conditioning and Voltage
Unit
VT1531A E1531A 8-Channel Voltage Output Signal Conditioning
Plug
VT1532A E1532A 8-Channel Current Output Signal Conditioning
Plug-On
VT1533A E1533A 16-Bit Digital Input/Output Signal Conditioning
VT1536A E1536A Isolated 8-Bit Digital I/O Signal Conditioning
VT1538A E1538A Enhanced Frequency/Totalize/PWM Signal
VXIplug&play programming ............................VXIplug&play Online Help
VXIplug&play example programs .....................VXIplug&play Online Help
VXIplug&play function reference......................VXIplug&play Online Help
Soft Front Panel information..............................VXIplug&play Online Help
VISA language information........ ........................Agilent VISA User’s Guide
Agilent VEE programming information.............Agilent VEE User’s Manual
*Supplied with Agilent Command Modules , Embedded Controllers, and VXLink.
Manual Part Number: E1538-90004
Printed in U.S . A . E0600
Enhanced Frequency/Totalize/PWM SCP
About this Manual
Agilent E1538A
This manual describes how to configure the Signal Conditioning Plug-on
(SCP) using SCPI commands and explains the cap abilities of thi s SCP. The
contents of this manual are:
The Agilent E1538A provides eight TTL compatible channels of digital I /O.
Channels can be individu ally configured to perfor m any one of the following
functions:
•Input:
-- Static digital state
-- Frequency measurement
-- Period meaurement
-- Totalize positive or negative signal transitions
-- Pulse width measurement
-- Rotational velocity (senses added or missing cogwheel teeth)
-- Quadrature position. (requires 2 channels)
•Output (configurable as Open Drain or passive pull-up):
-- Static digital state
-- Single pulse-per-trigger: Generates a pulse at each algorithm
execution. The pulse width is controlled by the algorithm.
-- Pulse Width Modulation: A free-running pulse train where a SCPI
command pre-configures the frequency and the algorithm controls
the pulse width.
-- Frequency Modulation: A free-running pulse train where a SCPI
command pre-configures th e puls e width and t he alg ori thm con trols
the frequency. In this FM mode the duty cycle varies with
frequency.
-- Frequency Modulation: A free-running pulse train where the duty
cycle remains constant at 50% while the algorithm controls the
frequency.
-- Rotationally positioned pulse: The algorithm controls the angular
pulse position (relative to an input sensing rotational velocity). The
pulse width is fixed by a SCPI command. (requires a reference
channel in addition to any rotational pulse output channels)
-- Rotationally positioned pulse: The algorithm controls the width of
the pulse. The angular pulse position (relative to an input sensing
rotational velocity) is fixed by a SCPI command.(requires a
reference channel)
-- Stepper Motor Control: Controls 2-phase and 4-phase motors in
both full and half step modes.(requires 2 or 4 channels)
The logical sense of i nput and output c hannels can be conf igured as inverte d
or normal.
Input-configured c hannels have individ ually programmable t hreshold levels
that can range from -46V to +46V.
Identifying the Plug-on (IMPORTANT)
There are two versions of the E1538A. The e arly vers ion does not support a
PERiod measurement command set. Early versions have ROM revision
February 1998 and e ar lier . The l at er version adds period me asu re me nt, and
an improved frequency mea surement function. The later v ersions have ROM
revision after February 1998.
In order to access t he additional f unctions of the la ter E1538A, you must us e
one of the following drivers:
•The Plug & Play driver with revision A.02.07 or later
•The Command Module driver with revision A.05.11 or later
To determine the driver revision, execute the *IDN? command.
Figure 1. Identifying the SCP and its ROM Revision
The SCP has three packages of eight switches ea ch. The package labele d OE
(Output Enable) determines a channel’s I/O direction. The package labeled
PU (pull-up) controls whethe r or not a channel is float ing or pulled up to an
internal 5V supply. The package labeled VRS (for channels 0 and 1 only)
can enable special input signal conditioning compatible with variable
reluctance sensors. Fo r a discussion on using t he VRS mode, see "VRS Mode
Input Operation" on page 10.
Locating switchesFigure 2 shows the location of each channel’s configuration switches.
Configuring Input-
Output direction
Configuring Channel
Pull-up Resistor
NotePull-Up enable ON is not allowed for channels that have their VRS enable
Figure 2. Switch Location and Example Settings
Refer to Figure 2 for the location of t he eight Output Enable (OE) swit ches.
Move the channel’s switch handle to the ON pos it io n for output, and to t he
OFF position for input.
Refer to Figure 2 for the location of the eight Pull-up Enable (PU) switches.
Move the switch handle to the ON position to connect the pull-up resistor
(connected f rom channel terminal to an internal +5V), and to the OFF
position to disconn ect the pul l-up resis tor (high im pedance input/ open drain
output).
Installation for this Plug-on is identical to other SCPs and is covered in
Chapter 1 of your Agilent E1415 or E1419 User’s Manual.
Connecting To The Terminal Module
The SCP connections for the Terminal Modules are shown on the
self-adhesive labels that come with the SCP. Use these to label terminal
definitions on your t erminal module. The connections are shown in Figure 3.
Figure 3. E1538A Terminal Module Connections
Figure 4 shows the screw terminal Option 11 for the E1419A.
Figure 5 shows the reco mmended meth od of wir ing di gital I/O ch annel s, as
well as the maximum voltage limitation s for the E1538 A.
Figure 5 shows the shields connected directly to the E1415 ground. This is
to limit potential nois e on the digital wiring from affecting low- level analog
channel wiring within the Terminal Module.
NoteThe G (analog guard) terminals are connected through 10K Ohm resistors
to chassis ground. To connect the shields directly to chassis ground on the
E1415 and the E1419 Option 12 Terminal Module, install the
guard-to-ground jumpers for the E1538 channels
Figure 5. Recommended Connections and Voltage Limits
Input and Output Characteristics
This section describes the E1538’s channel input and output electrical
characteristics. Refer to Figure 6 for the following discussions.
Input Characteris ticsWhen configured for input, E1538 channels provide digital i nput through the
threshold comparator . The digital input threshold l evel is programmable with
a SCPI command from -48 to +47.625 VDC in .375V steps (relative to the
Lnn terminal). The threshold amplifier also provides typically 0.5 volts of
hysteresis regardless of the threshold level setting. The input impedance in
this configuration is greater than 100KΩ (as long as the 10KΩ pull-up resistor
is OFF).
Channels 0 and 1 also provide the cap abi li ty (when the VRS switch is ON)
to read the output of vari able reluctance sensors. Because the ou tput of a VRS
varies in rela tion to the velocity of the toothed wheel it is r eading, the E1538A
provides adaptive ampl ifiers for these channels. The fu nction of the amplifier
is to maintain a constant-l evel digital o utput while the input varies from
millivolts to several tens of volts.
For simple sensing of switches and open collector logic devices, a channel ’s
pull-up resistor can be connected by closing its PU switch.
Figure 6. The E1538A Input/Output Characteristics
VRS Mode
Input Operation (SCP
channels 0 & 1 only)
NoteVRS enable ON is not allowed if PU enable is ON.
When the VRS configuration swit ch is set to on, the input signal conditioning
for that channel is changed to make it compatible with a typical variable
reluctance sensor. The var iable reluctance sensor is common ly used to detect
rotational shaft po sition and/or velocity. Because th e voltage output of a VRS
is proportional t o t he rate of change of a magnetic field, d if fe ren t rotational
velocities genera te different signal ampli tudes. The VRS-configured chann el
detects the negative going zero-crossin g point of the signal. To mini mize the
effects of input nois e, the zer o-crossi ng detecto r can only be tr iggered i f the
positive-going portion of the signal exceeded an "arming" threshold. The
arming circuit is reset whe n zero-cross ing detector is triggered s o it can’t
re-trigger until after the signal exceeds the arming threshold again. The
arming threshold t racks the positive p eak input level and i s 80% of t his peak
value. By sensing th e "zero-crossing" point of t he input signal, the VRS mode
isolates signal amplitude changes from affecting signal timing.
At high rotational speeds, variable reluctance sensors can generate voltage
levels over 100VAC. The VRS i nputs must be protecte d against signal levels
over 17.5 Volts. If your VRS will generate voltages over 17.5, you must
provide a resistor in series with the VRS input. The user-supplied resistor,
together with the VRS input’s 5.38K input impedance form a voltage di vider
that attenuates the input signal at the channel’s Hi input terminal. Use the
formula to calculate the p rotection resis tor’s value.
R
external
---------------------------------------
=
sensor
0.0032
17.5–()
Figure 7 shows the VRS mode input characteristics.
Figure 7. VRS Mode Input Characteristics
Output CharacteristicsThe output stage of the E1538A is simply a MOS FET transistor that is
configured as "open-drain" when the pull-up resistor is not connected (PU
switch is OFF). For simple interfacing to logic devices, the pull-up resistor
can be connected by t urning the PU switch ON. Oper at in g vo lt age s ( out put
transistor off) at an out put-c onfigu red c hannel can range from 0 to 4 8 volt s.
The output can sink up to 100mA of current (output transistor on).
CautionIf the Hnn terminal is driven below the Lnn terminal while a
channel is output-configured, an "inherent diode" in the output
transistor will conduct heavily. This reverse current must be
limited to 100mA, or damage to the SCP could result.
NoteThe *RST and power-on condition (true also after *TST) for output-
configured channels will output a logical one (open-drain output off). You
should keep this behavior in mind when applying the E1415 to your
system. It is best to have your system’s digital inputs use a high (one) as
their safe state.
Programming With SCPI Commands
The SCPI commands shown here conf igure E1538 functions. The E1415 and
E1419 don’t provide SCPI commands to read an input channel or control an
output channel. This communication with the SCP is provided by the
Algorithm Language. Examples will show communicat ion wit h al gori t hms.
To determine the type of SCP installed on channels 0 through 7 send
Configuring the
Channels
SYST:CTYPE? (@100)
enter statement here
The E1538A has eight digit al channels. The Power -on and *RST state is that
all input-configured channels sense static digital state
(SENS:FUNC:COND), and all output-configured channels output static
digital state (SOUR:FUNC:COND). Logical sense is normal
(INP:POL NORM and OUTP:POL NORM).
query SCP type @ ch 0
enter response string
Configuring I/O DirectionChannels are configured for input or output with the I/O direction switches
(see "Setting Configuration Switches" on page 6).
Programming Input
Channels
Setting the Input
Threshold Level
This section deals wit h all asp ects of progr amming inpu t channel functions.
Channels are configured for input with the I/O direction switches (see
"Configuring Input-Output direction" on page 6). A related error message:
3123,"E1538 OE switch ON conflicts with this command."
The E1538 allows progra mmatically setting the input threshold level for each
input configured channel. The input threshold can be set from -46VDC to
+46VDC with .375V resolution. While input polarity is set to NORMAL, an
input level higher than the threshold level is considered a logic one, and an
input level lower than the threshol d level is considere d a logic zero. If input
polarity is set to INVerted, an input level higher than the threshold level is
considered a logic zero and an input level lower than the threshold level is
considered a logic one. To set input threshold level use the command
INPut:THReshold:LEVel <level>,(@<ch_list>)
•<level> is a value between -46 and +46 inclusive. The resolution for
<level> is 0.375 Volts. The *RST and power-on default for <level> is
1.78 volts.
NoteThe value se nt for <level> will be rounded to the nearest multiple of 0.375
Volts. For instance, 5 would be 4.875, 10 would be 10.125, 9.5 would be
9.375, and 15 would be 15. The INP:THR:LEV? query will return the
actual setting.
This means reading a channel’s current digital state when an algorithm
executes. This is the default function assigned to all digital input channels
after *RST and at power-up. To set individual channels to this function use
the SCPI command [SENSe:]FUNCtion:CONDition (@<ch_list>). The
value returned to an algorithm is a floating point representation of 0 or 1,
depending on the stat e of the input signal and the channel’s INP:POL setting.
To set channels 40 through 43 to input digital states
Use [SENSe:]FUNCtion:TOTalize (@<ch_list>) to configure channels to
totalize. Totalize means to simply count state transitions (either positive
going, or negative going). Figure 9 A shows totalizing transitions between
each algorithm executi on. Figure 9 B shows totalizing all transitions starti ng
from the time the module last received an INITiate command.
Use [SENSe:]TOTalize:RESet:MODe INIT | TRIG,(@<ch_list>) to
configure the total ize channel to either reset its count once each trigger e vent,
or only when the module is INI Tiated. Use INP:POL INV to sen se negati ve
edges. The count capacity is 16,777,215 (24-bits, unsigned)
To totalize state changes at channel 44 starting fro m INITiate time
The E1538A actually measures signal period for both the period and
frequency functions. If the measurement function is set to frequency rather
than period, the SCP returns the recipro cal of the measured period. The
resolution of each per iod measurement is ba sed on the time proce ssor chip’s
timer period (238.4nS). To improve resolution on faster input signals,
multiple signal periods can be measured and averaged. For period
measurements there are two dif fe ren t mode s tha t ca n be used to control the
number of periods to average. For frequency measurements only the
APERture mode is available.
1. The [SENSe:]PERiod:NPERiod mode explicitly sets the number of
signal periods to measure and average. The time it takes the SCP to
return a reading is dependent on the input signal period (for a given
NPERiod setting), longer signal periods take longer to return a
reading.
In NPERiod mode the actual measurement resolution (in seconds) is
fixed while the relati ve r eso lut i on (as a percentage of the inpu t si gna l
period) is variable. That is, when NPERiods is set to provide an
adequate resolution for short period signals, long period signals will
have increased resolution.
2. The APERture mode sets a fixed duration that the SCP will use to
measure multiple signal periods. The actual effective APERture
<time> will be:
<time>
.
--------------------------------
NT
signal_period
signal_period×
The minimum aperture will be 1 signal peri od, and the maximum wil l
be 255 signal periods.
In APERture mode, the effective resolution (in seconds) varies with
the period of the input signal. That is, as the signal period is reduced,
the number of measurements averaged increases, thereby improving
the effective resolution. However, the relative resolution (as a
percentage of the input signal period) is fairly constant with changes
in signal period.
Generally, more measurements (greater NPERiod count or longer APERture
time) means a more accura te frequency value. Of course more measurements
means that the read ing retur ned contains mor e latency (i s “older” in relati on
to the signal's c urrent frequency). To trac k fast changing frequen cy, you have
to trade-off some accuracy with a shorter aperture time.
Measure PeriodUse [SENSe:]PERiod:MODe APERture | NPERiods,(@<ch_list>) to select
the measurement interval setting mode.
Depending on the mode selected above use
[SENSe:]PERiod:APERture <time>,(@<ch_list>) or
use [SENSe:]PERiod:NPERiods <n_periods>,(@<ch_list>) to set the
interval for measuring and averaging signal periods.
For PERiod function, the E1538 spports two distinct measurement ranges:
1. When SENS:PER:RANGE is set to 1sec, the E1538 can measure
periods from 10usec - 1sec . The value of SENS: PER:APER can range
from 10usec - 1sec.
2. When SENS:PER:RANGE is set to 4sec, the E1538 can measure
periods from 40usec - 4sec . The value of SENS: PER:APER can range
from 40usec - 4sec. See SENS:PER:RANGE command on page 61
Use [SENSe:]FUNCtion:PERiod (@<ch_list>) to configure channels to
measure signal period.
To measure the signal period at channel 45 with aperture of 01 second
*RST
TRIGGER:TIMER .2
SENS:FUNC:PER (@145)
SENS:PER:RANGE 1,(@1 45)
SENS:PER:MODE APER(@145)
SENS:PER:APER 1,(@145)
ALG:DEF ’ALG1’,’writecvt(I145,45);’
INIT
do loop
SENS:DATA:CVT? (@45)
read value from CVT query above
end loop
Alg executes at .2 sec intervals
ch 45 to measure signal period
set period range 10µsec - 1sec
set meas and avg interval mode
meas and avg sig periods for 1S
alg puts period in CVT
start algorithm execution
To measure period at channel 45 as the average of 1000 signal periods:
*RST
TRIGGER:TIMER .2
SENS:FUNC:PER (@145)
SENS:PER:RANGE 1,(@1 45)
SENS:PER:MODE NPER(@145)
SENS:PER:NPER 1000,(@145)
ALG:DEF ’ALG1’,’writecvt(I145,45);’
INIT
do loop
SENS:DATA:CVT? (@45)
read value from CVT query above
end loop
Alg executes at .2 sec intervals
ch 45 to measure signal period
set period range 10µsec - 1sec
set meas interval by n periods
meas and avg 1000 sig periods
alg puts period in CVT
start algorithm execution
Measure Pulse WidthThis means that the E1538 will measure the width of the logic 1 portion of
a pulse. The pulse width is sent to the algorithm in units of seconds. To
measure the high portion of a pulse (positive going edge to negative going
edge) set the channel input polarity to INP:POL NORM,(@<ch_list>). To
measure the low port ion of the pulse (negat ive g oing e dge to posit ive go ing
edge) set the channel input polarity to INP:POL INV,(@<ch_list>).
The value returned to an algorithm can be from 5µSec to 1 Second with
59.6nSec resolution.
To configure channels to measure pulse width use the command
[SENSe:]:FUNCtion:PWIDth <avg_count>,(@<ch_list>)
•<avg_count> sets the number of pulses to average when forming the
pulse duration value. More counts give more accurate readings, but
slower response to changing pulse widths.
•<ch_list> specifies the channels that will read pulse widths
To measure pulse width on channels 46&47
*RST
SENS:FUNC:PWID 4,(@146,147)
Algorithm reads the pulse widths on channels 146 and 147 and returns these
values in CVT elements 46 and 47
This means that the E1538 will conv ert a digital quadratur e s ign al pa ir int o
an absolute 24-bit count. The count value can be read by the algorithm.
The E1538’s quadrature position function increments a counter value each
time there is a t ran si tion on either of t he quadrature chann el pai r. W hen the
lower numbered channel’s signal LEADS the higher numbered channel, the
function counts up. When the lower numbered channel LAGS the higher
numbered channel, the function counts down.
To configure a pair of channels to sense quadrature count use
[SENSe:]FUNCtion:QUADrature [<count_preset>,](@<ch_list>)
•<count_preset> if included, allows presetting the absolute counter
associated with the ch anne l pair . All qua dratu re pairs i n <c h_lis t> will
be preset to the same value. If not included, the default count at
algorithm start will be zero. <count_preset> can range from 0 to
16,777,215. The variable type is int32
•<ch_list> must always specify both channels of a pair. More than one
pair can be specified. Both channels of any pair must be adjacent.
<ch_list> can specify channels on more than one E1538. The channel
numbers in <ch_list> must be in ascending order. The related error
messages are:
3115, "Channels specified are not in ascending order."
3116, "Multiple channels specified are not grouped correctly."
3117, "Grouped channels are not adjacent."
3122, "This multiple channel function must not span multiple SCPs."
The algorithm reads the current count through the low numbered
channel. The count is an unsigned 24-bit value ranging from 0 to
16,777,215. The counter can roll over from 16,777,2215 to 0, and roll
under from 0 to 16,777,215 is 16,777,215.
To configure channels 42 and 43 as one qua drature pair, and channels 48 and
49 as another pair
*RST
SENS:FUNC:QUAD 8192,(@142,143)
SENS:FUNC:QUAD 0,(@148,149)
algorithm will retrieve values from input channels and place in CVT elements
ALG:DEF ’ALG1’,’writecvt(I142,42); writecvt(I148,48);’
INIT
begin loop
SENS:DATA:CVT? (@42,48)
display or otherwise use count info
end loop
pair 42&43 preset to count of
8192
pair 48&49 preset to 0
start algorithm execution
loops between here and end loop
get quadrature position coun t
Sense Rotational VelocityThis means that th e E1538 will read the rota tional velocity of a toothed wheel
sensor. The E1538 measures too th-to-toot h period and conve rts it int o units
of revolutions per second (RPS). This function can only be linked to the
E1538’s first channel. The function works for wheels that h ave either a
missing, or an extra tooth to mark their index position. Figure 14 shows a
wheel sensed with a variabl e reluctance sensor (using the VRS input option),
but any wheel sensing method is applicable as long as it provides a digital
output to the RVEL channel.
The value read by the algorithm can range from RPS to RPS.
As well as sensing rotational velocity, SENS:FUNC:RVEL provides the
reference position to the SOUR:FUNC:RPULse function that generates
angular positioned pulses. See page 30 for more informat ion on RPULse.
To assign a channel to sense rotational velocity, use the command:
[SENSe:]FUNCtion:RVELocity <n_teeth>,<index_type>,(@<ch_list>)
•<n_teeth> is the number of teeth that the wheel would have if it didn’t
have missing or e xtra teeth. For example, we would set <n_tee th> to 12
for the wheel shown in Figure 14, eve n t houg h wi th the missing tooth,
there are only 11. <n_teeth> can range from 3 to 255.