概述

在该主题中,您将找到必要的步骤,以将计数器/计时器功能构建到Kramer Control项目中。该主题包括一个示例方案以及在项目中配置该方案所需的步骤。

过程

  1. 启动“构建器”
  2. 导入Kramer计数器设备

*注释*如果您需要在不同的使用案例中使用多个计数器,则需要为每个单独的计数器导入Kramer计数器设备

下图显示可用于计数器的命令

示例

这里是一个方案。当使用“房间里的运动传感器”时,您有一个运动传感器。如果运动传感器关闭15分钟后没有再次跳闸,则要执行“房间关闭”宏。为了在Kramer Control中创建这样的设置,请遵循以下步骤

创建标题为“计时器”的“自定义状态”:https://www.manula.com/manuals/kramer/kramer-control/1/zc/topic/custom-states-within-system-device

此自定义状态的目的是创建一个布尔值,该布尔值将通知大脑是否开始计数过程

创建传感器“事件”:https://www.manula.com/manuals/kramer/kramer-control/1/zc/topic/events

此事件跟踪传感器的状态,并且在状态更改时将启动/停止计数器

在“传感器事件的动作”中,您将创建一个条件语句,跟踪传感器的状态。

此“条件”跟踪传感器的打开和关闭状态。您可以在上图中看到,我们正在根据传感器的状态切换计时器的布尔状态。

h4.创建计数器“事件):https://www.manula.com/manuals/kramer/kramer-control/1/zc/topic/events

此事件基于时间量使用间隔触发器

下一步是选择您的间隔量。*注释*您可以选择小时、分钟或秒。基于传感器的最准确结果将是秒。如果按分钟进行跟踪,由于分钟之间以秒为单位的差异,可能会使事件以不正确的间隔发生。

接下来,您需要在‘间隔“事件中创建两个条件。第一个条件启动递增计数器_IF_,定时器设置为”打开“;第二个条件执行宏/重置计数器/关闭定时器_IF_,定时器达到分配的值。

*注释*上面的示例使用秒来跟踪示例的15分钟计时器。如果您使用15分钟并将间隔时间更改为1分钟而不是上面示例所示的秒,则计数=值为15。

Last modified: 21 December 2020

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment

Kramer Support wrote: Oct 18, 2022

Added a new version to this article to include the gateway setup


John Gallagher wrote: Oct 7, 2022

One crucial bit of instruction is missing. "Kramer Counter Devices" are virtual devices that have to be added to your project in the hardware section as a "network gateway" and given the IP address of 0.0.0.0. If you don't do this, your counter will never work.


iRule wrote: Feb 2, 2018

You could edit the driver to change the possible values. However, are you mapping the counter value to a specific device? You could alter the device being controlled to support the volume range you require as well.


matt wrote: Feb 1, 2018

Is it possible to adjust the range that a counter can operate?
For example, I'm trying to make a volume control and need to control a range between 0 and -100
or possibly +20 to -80 or so. Is this possible, or is there any other way to adjust numbers in custom states that I haven't found yet?