FUNCTION_BLOCK SAW_SIN

An instance of this Function Block type converts a sawtooth waveform in the range {0..100} to a sinusoidal waveform of the same frequency and the same signal range, i.e., amplitude and offset of 50 units. Its operation is modeled by the Execution Control Chart (ECC) and algorithm shown below.

See the WAVEFORMS system configuration for an example of the use of instances of this and other waveform generation FB types.

ECC
ALGORITHM REQ IN Java :
  OUT.value = 50+(int)(50*Math.sin(.02*IN.value*Math.PI));
END_ALGORITHM