Variables View - Control Techniques FM-3 Reference Manual

Programming module
Hide thumbs Also See for FM-3:
Table of Contents

Advertisement

Timer.#.TimerOutput
The Timer Output state is controlled by the Timer Input, the Timer Type, and the other configuration settings of the Timer
object. See the various timing diagrams in Figures 2 through 10 to see how Timer Output functions.
The Timer Output can be assigned to multiple Destinations on the Assignments view just as any other Output Event.
Timer.#.TimerActive
The TimerActive event is used as an indicator that the Timer is actively counting (i.e. In the case of an OFF Timer, the Active
event would not activate until the Input turns OFF.).
In the case of Cumulative timers, the Active does not remain on even though the Elapsed Time may be non-zero, if the timer
is not currently counting.
When a timer reaches the user defined Preset time, the Output activates, and the Active event turns OFF.
See the timing diagrams for each of the Timer Types for examples of how TimerActive behaves.
Using Timers within Programs
Timers can be used within user programs without the need for assignments. Following are some examples of using Timer
functions within a program.
To start a Timer in a program, you must do the following:
Timer.#.Input = ON
The user must also turn the Input off as necessary to control the timer:
Timer.#.Input = OFF
To use the output of a Timer within a program:
Wait For Timer.#.Output = ON (or = OFF)
To change the value of a Timer Preset in a program:
Timer.#.Preset = 12.345 'Seconds
To check if a timer is running:
If (Timer.#.Active = ON) Then
Some code
.
.
Endif
To wait for a Timer to start running:
Wait For Timer.#.Active = ON
Other examples:
If((Timer.#.Active=ON) AND (Timer.#.ElapsedTimer<0.500)) Then
Some code
.
.
Endif
If ((Timer.#.Output = ON) AND (Index.#.CommandComplete)) Then
Timer.#.Reset = ON 'Self-resetting - No need to turn OFF
Endif

Variables View

Variables allow the user to store data related to their system into a parameter, which the user can name. The user must define
each user variable by giving it a name, resolution (number of decimal places), and initial value. All user variables are signed
32-bit parameters. Setup for the Variables is done on the Variables view located under the Devices / Vars group in the
Hierarchy Tree. The User Variables view is shown in Figure 71.
Setting Up Parameters
77

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FM-3 and is the answer not in the manual?

Table of Contents