FAQ

New Math Function Sample and Hold

added 25/7/2008 (math32.dll update)

A math function  has been added to perform sample and hold

Function = Sample and Hold
Input A = Input value
Input B = Sample Control (0= hold at last value, 1 = Sample Value)

Note :

When Input B goes from 0 to 1, the value will change to Input A values straight away, i.e no delay time is applied.
When Input B goes to 0, the value left in the line will be the last value read at the time input B=1.
When the MicroScan starts the value of this math function will be zero, until B gets set to the value 1 to start sampling.

Example Settings

Input A Reading

Input from Input 1 on a 2100-A16

Input B Control

Relay 2 from A16 (this is being toggled to give a sample only when the relay is ON). This could be any IO location that changes its value to 1 to indicate sampling.

Math Line Settings

Set to Math Input, and click on Math Settings category

Set the function to Sample and Hold,
Input A to the input reading and
Input B to the sample and hold control input.