CTEK Automation Control Application APN007 User Manual

Page 46

Advertising
background image

Application Note – Automation Control Application

APN007 25 July, 2014

41

Timer/Counter – Start [Note – Changed In Release 4.02.02]

Timer/Counter – Start P1 P2 P3 P4 P5 P6 P7 P8 P9

P1 = i for input or o for output (numeric)
P2 = pin number. This is where the timer value lives (numeric)
P3 = counter type. 0 = count up from current value, 1 = count up from user/pin defined value, 2 =

count down from current value, 3 = count down from user/pin defined value

P4 = i for input, o for output or u for user defined value
P5 = pin number or user defined starting value

P6 = limit type. 0 = no limit, 1 = stop at user defined limit, 2 = roll over to start value at user

defined limit and continue counting

P7 = limit value for P5 mode 1 and 2 (numeric)
P8 = update value (float). How much to add or subtract at the end of each second.
P9 = write rate in 1 second increments. How often to write timer value to selected input or output

pin (numeric)

Example – Create a counter on output pin 14 that counts up from 0 to infinity in seconds and
updates the display every 15 seconds
Action: Timer/Counter – Start
Parameters: o 14 0 u 0 0 0 1 15

Timer/Watchdog – Start [Note – Changed In Release 4.02.02]

A watchdog timer is a value decrementing at a one second rate. The value is NOT directly
housed in an input or output pin. When the value decrements to zero the defined digital output or
input pin will turn on. If you keep setting the watchdog timer, it will never get to zero.

Timer/Watchdog – Start P1 P2 P3 P4 P5

P1 = i for input or o for output (digital)
P2 = pin number. This is the pin that will go high when the watchdog expires (digital)
P3 = i for input, o for output or u for user defined value
P4 = pin number or user defined starting value
P5 = update value (float). How much will be subtracted from the timer each second.

Example – Set output pin 4 when a 60 second timer reaches 0.
Action: Timer/Watchdog – Start
Parameters: o 4 u 60 1

Timer/Clock – Start [Note – Changed In Release 4.02.02]

A clock is a square wave signal generated on an input or output. It can be continuous or of a pre-
defined pulse length. The clock frequency is generated by a decrementing counter. Each time the
counter decrements to zero, the defined digital input or output will toggle state.

Advertising