Implementing setpoint profiles – VXI VT1422A User Manual

Page 207

Advertising
background image

Creating and Running Algorithms 205

Chapter 6

Implementing Setpoint Profiles

A setpoint profile is a sequence of setpoints that are desired as inputs for a
control algorithm. A normal setpoint is either static or modified by operator
input to some desired value where it will then become static again. A
setpoint profile is used when a device under test is desired to be cycled
through some operating range and the setpoint remains for some period of
time before changing. The automotive industry uses setpoint profiles to test
their engines and drive trains. That is, each new setpoint is a simulation of
an operator sequence that might normally be encountered.

A setpoint profile can either be calculated for each interval or pre-calculated
and placed into an array. If calculated, the algorithm is given a starting
setpoint and an ending setpoint. A function based upon time then calculates
each new desired setpoint until traversing the range to the end point. Some
might refer to this technique as setpoint ramping.

Most setpoint profiles are usually pre-calculated by the application program
and downloaded into the instrument performing the sequencing. In that case,
an array affords the best alternative for several reasons:

Arrays can hold up to 1,024 points.

Arrays can be downloaded quickly while the algorithm is running.

Time intervals can be tied to trigger events and each n trigger events

can simply access the next element in the array.

Real-time calculations of setpoint profiles by the algorithm itself

complicates the algorithm.

The application program has better control over time spacing and the

complexity and range of the data. For example, successive points in
the array could be the same value just to keep the setpoint at that
position for extra time periods.

The following is an example program that sequences data from an array to
an Analog Output. There are some unique features illustrated here that can
be used.

The application program can download new profiles while the application

program is running. The algorithm will continue to sequence through
the array until it reaches the end of the array. At which time, it will set
its index back to 0 and toggle a Digital Output bit to create an update
channel condition on a Digital Input. Then at the next trigger event,
the new array values will take effect before the algorithm executes.
As long as the new array is download into memory before the index
reaches 1,023, the switch to the new array elements will take place.
If the array is downloaded AFTER the index reaches 1,023, the same
setpoint profile will be executed until index reaches 1,023 again.

The application program can monitor the index value with

ALG:SCAL? "alg1","index" so it can keep track of where the profile
sequence is currently running. The interval can also be made shorter or
longer by changing the <num_events> variable.

Advertising
This manual is related to the following products: