“Kramer Control构建器”中的条件逻辑增加了IF-THEN编程的功能。IF-THEN编程使设计人员能够根据设备的状态变化在编程内创建方案。逻辑编程具有IF、ELSEIF、ELSE、AND和OR选项。
本文解释并提供了在“构建器”中找到的逻辑语句选项的简短示例。
h2. IF

逻辑语句中的IF是锚点。构建逻辑语句时,您将从第一个方案开始,然后根据此初始语句构建其他方案。该应用程序尝试按照方案在您的逻辑语句中出现的顺序进行匹配。该语句的第一行是初始IF语句。
IF语句的示例:: IF – InputState = BD/DVD then UpdateImage to Blu Ray graphic ENDIF

ELSEIF

ELSEIF是根据设备状态可能发生的第二种情况。一些州有多种可能性。例如,在我们正在构建逻辑语句以更新空间中正在使用的每个源的图像属性的方案中,切换台的源状态。
基于以上示例的ELSEIF语句示例:
IF – InputState = BD/DVD then UpdateImage to Blu Ray graphic ELSEIF InputState = CBL/SAT then UpdateImage to DirecTV graphic ELSEIF – InputState = CD then UpdateImage to Sonos graphic ENDIF

AND

在逻辑语句中,AND用于组合只有在满足多个条件后才发生THEN方案的方案。
基于以上示例的AND语句示例:
IF – InputState = bd/dvd AND PowerState = Power On then UpdateImage to selected Blu Ray graphic ELSEIF InputState = CBL/SAT AND PowerState = Power On then UpdateImage to Selected DirecTV log graphic ELSEIF – InputState = CD AND PowerState = Power On then UpdateImage to Selected Sonos graphic ENDIF

OR

在逻辑语句中,OR用作IF语句的替代可能性。就像ELSEIF一样,可以将多个OR条件添加到该语句中。
例如:
IF – InputState = bd/dvd OR InputState = vcr/dvr AND PowerState = Power On then UpdateImage 到选定的 Blu Ray 图形 ELSEIF InputState = CBL/SAT AND PowerState = Power On then UpdateImage 到选定的 DirecTV 逻辑图形 ELSEIF – InputState = CD AND PowerState = Power On then UpdateImage 到选定的Sonos 图形 ENDIF

ELSE

当您仅关注单个状态时,将使用ELSE条件。ELSE没什么意思。

下面的示例与输入的示例非常相似,类似于本文中的其他示例,但是在这里,我们仅关注BD / DVD输入:
IF – InputState = bd/dvd AND PowerState = Power On then UpdateImage到选定的Blu Ray 图形 ELSE UpdateImage 到 Power 图形 ENDIF

当您有两种可能的情况时,通常使用ELSE语句。跟踪设备的静音状态通常如下所示:
IF – MuteState = Mute On then UpdateImage 到按下静音图形 ELSE UpdateImage 到默认静音图形 ENDIF

基于状态的图像更改

与状态类似的基于状态的图像更改可以在“此处”找到::https://www.manula.com/manuals/kramer/kramer-control/1/zc/topic/example-state-based-image-change.
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 Control Representative wrote: Oct 11, 2017

How are you trying to add additional actions to the conditional? You can click on the +Condition next to the IF to add ELSE, ELSEIF, OR, AND. Adding commands or other actions to a condition requires that you drag the action to the IF statement.


William Jensen wrote: Oct 8, 2017

I can only get an "if" statement and I can't add anything extra in before the "END"