CTEK Automation Control Application APN007 User Manual

Page 47

Advertising
background image

Application Note – Automation Control Application

APN007 25 July, 2014

42

Timer/Clock – Start P1 P2 P3 P4 P5 P6 P7

P1 = i for input or o for output (digital)
P2 = pin number. This is where the clock is generated (digital)
P3 = i for input, o for output or u for user defined value
P4 = pin number or user defined clock rate value
P5 = update rate (int) in 0.1 second increments. How often start value will be decremented.
P6 = update value (float). How much will be decremented from P4 for each update period.
P7 = stop value. Stop clock after this many pulses. If P6 is zero, clock is continuous.

Example – Clock output pin 1 at a rate of once every 1 second (1 seconds On followed by 1
seconds Off) for 400 iterations
Action: Timer/Clock – Start
Parameters: o 1 u 5 10 1 400

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

Note:

The input value being counted in this function is coming from the Discrete or Relay input

of the SkyRouter.

Timer/Counter/Ext/Clk is a value incrementing or decrementing at the rate of the Discrete Input
(DI) pin on the SkyRouter, also known as the relay input. The Timer/Counter is assigned to a
numeric input or numeric output. If it is in an output it is non-volatile and if it is in an input it is
volatile. If it is in an output, the output can still be connected to an input. In either case the
thresholds of an input can then be used to make decisions based on the counter value or the
value can just be used to accumulate things like engine hours.

Timer/Counter/Ext/Clk - Start P1 P2 P3 P4 P5 P6 P7 P8 P9 P10

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 defined value, 2 =

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

P4 = i for input, o for output or u for user defined value (counter types 1 & 3)
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 (float)
P8 = update value (float). How much to add or subtract at each input transition.
P9 = write rate in 1 second increments. How often to write timer value to selected input or output

pin (int)

P10 = sample type. 0 = count negative going transitions. 1 = count positive going transitions.

Example – Count negative going transitions of the Discrete Input and place the count on output
pin 17. The counter should count up from zero and has no limits. For each transition of the
Discrete Input add 15 to the value of pin 17. Pin 17 will be updated every 30 seconds.

Action: Timer/Counter/Ext/Clk - Start
Parameters: o 17 1 u 0 0 0 15 30 0

Advertising