Table Of Contents

Transition Statements

Version:
    Last Modified: May 15, 2018

    The User Program requires transition statements to trigger the User Program to change states. Transition statements include the channel or variable name and a keyword that defines the condition that triggers the transition.

    Follow these guidelines when writing transition statements:

    • Type logic statements directly into the field on the transition in the state machine diagram or into the field on the configuration pane.
    • You must use the channel or variable name set in the I/O Configuration table.
    • Keywords and Boolean operators are not case-sensitive.
    • Do not use = in transition statements.
    Table 1. Digital Transition Statements
    Type Syntax Keywords Example
    Input <channel name>.<keyword> Discrepancyfault DI2.DiscrepancyFault
    Overcurrentfault
    Testpulsefault
    Output <channel name>.<keyword> Readbackfault DO1.OpenCircuitFault
    Overcurrentfault
    Opencircuitfault
    Testpulsefault
    Table 2. Analog Transition Statements (NI 9351 Only)
    Type Syntax Keywords Example
    Input <channel name>.<keyword> Overcurrentfault AI0.DiscrepancyWarning
    Discrepancyfault
    Discrepancywarning
    Highhigh, HH AI2.LowLow, AI2.LL
    High, H
    Normal, N
    Low, L
    Lowlow, LL
    Table 3. Boolean Logic
    Type Syntax Keywords Example
    Boolean operators

    <keyword><channel or variable name>

    <keyword><transition statement>

    Not: not, ! not DI2, !AI0.High

    <channel or variable name> <keyword> <channel or variable name>

    <keyword><transition statement>

    Or: or, +, || DI2 or Var2, AI0.High or AI0.HighHigh
    And: and, *, && DI2 and Var2, AI2.High && AI0.DiscrepancyWarning

    Recently Viewed Topics