Chapter 2 Program Example
2
68
(Example 3) Program example 3
This is an examinable program that gets the moving averages of 3 scan times of
input from RT318 and outputs from DA374.As with Example 2, code a routine to "set
the disconnect error flag and set the input to 0 when disconnect is detected" prior to
the above routine, because RT318 has a disconnect detection function.
In this example, Declared 'OPEN-ERR' as global variables,Addition to I/O Variable
Also, declare the previous and next to previous value as static variable array because
they must be retained internally.
Program
model 3000 Analog module User's Manual