A SERVICE OF

logo

Define an Add-On Instruction component Chapter 5
Rockwell Automation Publication 1756-RM084S-EN-P - March 2015 101
Float, Required := Yes,
Visible := Yes); Valve_Out : DINT (Type := Output,
Radix := Decimal,
Required := No, Visible := Yes, DefaultData := “0”);
Reset : BOOL (Description := “Used by Prescan routine
to run Reset code”,
Type := Input, Radix := Decimal, Required := No,
Visible := No,
DefaultData := “1”);
END_PARAMETERS
LOCAL_TAGS
Valve_Type : DISCRETE_2STATE (Description := “The
valve is a 2 state valve”,
DefaultData :=
“[49,0.00000000e+000,0,0,0.00000000e+000,0.00000000e+000,
0.00000000e+000,0.00000000e+000,0.00000000e+000,0.000000
00e+000]”);
END_LOCAL_TAGS
FBD_ROUTINE Logic (Description := "This UDI Logic routine
is nonsense but shows the
format sufficiently. In fact, it does not even use the InOut
Parameter",
SheetSize := "Letter (8.5x11in)", SheetOrientation
:= Landscape)
SHEET (Name := "")
D2SD_BLOCK (ID := 0, X := 200, Y := 160, Operand
:= Valve_Type,
VisiblePins := "ProgCommand,
State0Perm, State1Perm, FB0, FB1,
HandFB, ProgProgReq, ProgOperReq,
ProgOverrideReq, ProgHandReq,
Out, Device0State, Device1State,
CommandStatus, FaultAlarm,
ModeAlarm, ProgOper, Override, Hand")
END_D2SD_BLOCK
IREF (ID := 1, X := 120, Y := 100, Operand :=
Valve_Command)
END_IREF
OREF (ID := 2, X := 460, Y := 140, Operand :=
Valve_Out)
END_OREF
END_SHEET
END_FBD_ROUTINE
ST_ROUTINE Prescan (Description := "This should run before
the Instruction does")
'//If Reset is True - do something
'IF (Reset) THEN
' //do something
'END_IF;