13.07.2015 Views

BSL PRO 4 Manual - Biopac

BSL PRO 4 Manual - Biopac

BSL PRO 4 Manual - Biopac

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

132 <strong>BSL</strong> <strong>PRO</strong> <strong>Manual</strong>The different components of each expression can be entered either by double-clicking buttons from the buttonrows (sources, functions, and operators) in the setup expression dialog, or by typing commands directly intothe Equation box. The Expression uses standard mathematical notation.For each expression, you need to specify at least one source, the function(s) to be performed, and anyoperators to be used. Sources are typically analog channels, although you may also select Time from thesource button row and <strong>BSL</strong> <strong>PRO</strong> will return the value of the horizontal axis (usually time) for each samplepoint. When the horizontal axis is set to frequency (in the Display > Horizontal axis dialog), the “time” itemin the source button row will switch to “frequency.”When using the online Expression calculation channel, it is important to keep in mind that while differentchannels, functions, and operators can be referenced, the Calculation cannot reference future sample points.That is, data from waveform one can be transformed or combined in some way with data from waveform twoat the same point in time, although data from one point in time (on any channel) cannot be combined withdata from another point in time (on any channel). See the section on post-acquisition expression commands(beginning on page 259) for ways around this limitation.FunctionsThe arguments to each function are represented in the Functions table in italics andmay be replaced by any valid expression. Each argument is separated from its nextargument by a comma. Expressions can only contain commas within balancedparenthesis pairs. An ellipsis (“...”) at the end of a function description indicates thatany number of arguments may be present provided they are in a comma separated list.When a function is added to an Expression, the cursor is placed between theparentheses.Conditionals Change output based upon a condition test. All of the conditionals treat the value zeroas false and any non-zero value as true. Expressions can only contain commas withinbalanced parenthesis pairs.Offset Notation Offset notations take integer offsets in terms of the number of samples using theformation CH#(P) where CH# is the channel number and P is the number of points. Forexample, an offset of -1 will return the data point immediately to the left of the selectedpoint and an offset of +1 will return the data point immediately to the right of theselected point.To refer to previously acquired data, offsets must be negative. For notationalconvenience, offsets that result in an invalid negative sample position (e.g. no data isdefined prior to the first sample in the graph) evaluate to zero. Any attempt to access asample beyond the end of the data will result in an error. Any attempt to use a positiveoffset for an online Equation Generator (Expression calculation channel) will result inan error.CHn(x) Returns the value of channel with index n x samples away from the currentevaluation position.SC(x) Returns the value of the selected channel x samples away from the currentevaluation position. Only allowed for Transformations and Measurements;not allowed for Calculations.MC(x) When x is zero or positive, returns the value of the measurement channel xsamples away from the current evaluation position. When x is negative,returns the result of the expression evaluation that occurred x steps previousto the current evaluation position. Only allowed for MeasurementExpressions (see below); not allowed for Calculations or Transformations.Recursive notation Since transformations and calculation channels replace the source data of the channelwith the result of the expression evaluation in sequence, negative offsets are equivalentto returning the final result of the expression that was evaluated a certain number ofsteps in the past. The channel where the expression results are stored can be thought ofas a storage record of the previous evaluation steps. Negative sample offsets, therefore,can be used to compute any formula that can be expressed in closed recursive form. Forexample, the recursive definition of the Fibonacci sequence is:Visit the online support center at www.biopac.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!