In this section we will present basic info about Function Block logic elements. More details can be found in Rockwell Publication 1756-RM084Z-EN-P.
Available logic elements in Studio 5000 and their L5X node names:
L5X Item | Studio 5000 Element |
IRef | Input Reference |
ORef | Output Reference
|
ICon | Input Wire Connector |
OCon | Output Wire Connector |
Block | Function Block Instruction |
AddOnInstruction
| Add-On Instruction
|
JSR
| Jump to Subroutine Instruction
|
SBR
| Subroutine Instruction
|
RET | Return Instruction |
Wire | Wire and its corresponding attachments
|
FeedbackWire
| Feedback wire and its corresponding attachments
|
Function
| Function block function
|
TextBox
| Text box
|
Attachment
| Attachment from a text box to another function block element
|
Here is an example of a simple logic element definition:
var inputWireConn = {
element: "ICon",
ID: "123",
Name: "newIWConn",
X: "910",
Y: "120"};
console.log(inputWireConn.ID) // -> "123"
inputWireConn.ID = 222;
console.log(inputWireConn.ID) // -> "222"
Attribute | Description |
ID | 32bit unsigned integer value. Must be unique within the given sheet
|
X | X coordinate on the sheet
|
Y | Y coordinate on the sheet
|
Operand | Function block instruction
|
HideDesc
| Whether or not to hide the description (true or false)
|
Attribute | Description |
ID | 32bit unsigned integer value. Must be unique within the given sheet
|
X | X coordinate on the sheet
|
Y | Y coordinate on the sheet
|
Operand | Function block instruction
|
HideDesc
| Whether or not to hide the description (true or false)
|
ICon | Input Wire Connection |
Attribute | Description |
ID | 32bit unsigned integer value. Must be unique within the given sheet
|
X | X coordinate on the sheet
|
Y | Y coordinate on the sheet
|
Name | (optional) Name of wire connector
|
OCon
| Output Wire Connector |
Attribute | Description |
ID | 32bit unsigned integer value. Must be unique within the given sheet
|
X | X coordinate on the sheet
|
Y | Y coordinate on the sheet
|
Name | (optional) Name of wire connector
|
Block
| Function Block Instruction
|
Attribute | Description |
Type | The type of Block. Specify the mnemonic name for the block (for example “BAND”)
|
ID | 32bit unsigned integer value. Must be unique within the given sheet
|
X | X coordinate on the sheet
|
Y | Y coordinate on the sheet
|
Operand | Block tag name
|
VisiblePins | List of the names of all the parameters with pins visible for wiring (separated with spaces). The names should match the member names on the block tag.
|
AutoTuneTag | Tag name for the autotune tag (Rockwell does not list it as optional but it is optional for blocks that do not need it);
|
HideDesc
| Whether or not to hide the description (true or false)
|
This block may contain an array of objects “Array” with the following structure:
Attribute | Description |
Name | Operand Function |
Operand
| Operand Tag |
This array is only needed for special instructions. You can leave it empty for all other instructions.
Example of Block definition with Array needed:
var block = {
element: "Block",
Type: "MAVE",
ID: "123",
X: "120",
Y: "80",
Operand: "MAVE_01",
VisiblePins:"In Out",
HideDesc:"false",
Array: [
{Name:"StorageArray", Operand:"storeTag"},
{Name:"WeightArray", Operand:"weightTag"}
]
};
console.log(block.ID) // -> "123"
block.ID = 222;
console.log(block.ID) // -> "222"
console.log(block.Array[0].Operand) // -> "storeTag"
block.Array[0].Operand = "anotherTag";
console.log(block.Array[0].Operand) // -> "anotherTag"
Representation in Studio 5000:
AddOnInstruction | Add-On Instruction |
Attribute | Description |
Name | Name of Add-On Instruction
|
ID | 32bit unsigned integer value. Must be unique within the given sheet
|
X | X coordinate on the sheet
|
Y | Y coordinate on the sheet
|
Operand | AOI tag name
|
VisiblePins
| Whether or not to hide the description (true or false) List of the names of all the parameters with pins visible for wiring (separated with spaces). The names should match the member names on the block tag. InOutParameter should be listed. |
This block may contain an array of objects “InOutParameter” with the following structure:
Attribute | Description |
Name | InOutParameter Name |
Argument | InOutParameter Tag |
This array is only needed if InOutParameters are used. You can leave it empty for all other instructions.
Example of AOI definition with Array needed:
var AOIinst = {
element: "AddOnInstruction",
Name: "SomeAOI",
ID: "123",
X: "120",
Y: "80",
Operand: "AOITag1",
VisiblePins:"Input1 Output1 InOutParam1 InOutParam2",
InOutParameter: [
{Name:"InOutParam1", Argument:"tag1"},
{Name:"InOutParam2", Argument:"tag2"}
]
};
console.log(AOIinst.ID) // -> "123"
AOIinst.ID = 222;
console.log(AOIinst.ID) // -> "222"
console.log(AOIinst.InOutParameter[0].Argument) // -> "tag1"
AOIinst.InOutParameter[0].Argument = "anotherTag";
console.log(AOIinst.InOutParameter[0].Argument) // -> "anotherTag"
Representation in Studio 5000:
JSR
| Jump to Subroutine Instruction
|
Attribute | Description |
ID | 32bit unsigned integer value. Must be unique within the given sheet
|
X | X coordinate on the sheet
|
Y | Y coordinate on the sheet
|
Routine | Routine name
|
In
| Input parameters (separated with spaces)
|
Ret | Return parameters (separated with spaces)
|
SBR
| Subroutine Instruction
|
Attribute | Description |
ID | 32bit unsigned integer value. Must be unique within the given sheet
|
X | X coordinate on the sheet
|
Y | Y coordinate on the sheet
|
Routine | Routine name |
Ret
| Return parameters (separated with spaces) |
Attribute | Description |
ID | 32bit unsigned integer value. Must be unique within the given sheet
|
X | X coordinate on the sheet
|
Y | Y coordinate on the sheet
|
Routine | Routine name
|
In
| Input parameters (separated with spaces) |
Wire
| Wire and its corresponding Attachments |
Attribute | Description |
FromID | 32bit unsigned integer value of source element ID
|
FromParam | Parameter name on the source element.(“In” for IRef and ICon)
|
ToID | 32bit unsigned integer value of destination element ID
|
ToParam | Parameter name on the destination element.(“Out” for ORef and OCon)
|
FeedbackWire
| Feedback Wire and its corresponding Attachments |
Attribute | Description |
FromID | 32bit unsigned integer value of source element ID
|
FromParam | Parameter name on the source element.(“In” for IRef and ICon)
|
ToID | 32bit unsigned integer value of destination element ID
|
ToParam | Parameter name on the destination element.(“Out” for ORef and OCon)
|
Function
| Function Block Function |
Attribute | Description |
Type
| The type of Block. Specify the mnemonic name for the block (for example “ADD”)
|
ID | 32bit unsigned integer value. Must be unique within the given sheet
|
X | X coordinate on the sheet
|
Y | Y coordinate on the sheet
|
Attribute | Description |
ID | 32bit unsigned integer value. Must be unique within the given sheet
|
X | X coordinate on the sheet
|
Y | Y coordinate on the sheet
|
Width | Block width (is not supported in all versions)
|
Text
| Text to be displayed
|
Attachment
| Attachment from a Text Box to another Block Element |
Attribute | Description |
FromID
| 32bit unsigned integer value of ID of the attached object |
ToID
| 32bit unsigned integer value of destination element ID
|
Note:
All attachment blocks must come after all text box blocks in l5x