GetCtrlInfo
Function Block - Get the serial, model, and/or part number of the controller.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Execute |
BOOL |
0 to 1 |
N/A |
No default |
Rising edge of enable initiates read of parameter. |
||||||||||||||||||||||||
Parameter Number |
INT |
1, 6 |
N/A |
No default |
Parameter number to read. These parameters are also Internal Defines:
|
Outputs
Output |
Data Type |
Range |
Unit |
Description |
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Done |
BOOL |
No range |
N/A |
Indicates whether this function block has completed without error. |
|||||||||||||||
Error |
BOOL |
No range |
N/A |
Indicates whether this function block has completed with error. |
|||||||||||||||
ErrorID |
INT |
No range |
N/A |
Error value to indicate error condition. These parameters are also Internal Defines:
|
|||||||||||||||
Value |
STRING |
No range |
N/A |
String containing data that was read. IF Parameter Number = CTRLINFO_MODEL_FAMILY (7):
|
Remarks
Returns a String containing the value of the control parameter requested.
Figure 1: GetCtrlInfo
FBD Language Example
Not available.
FFLD Language Example
IL Language Example
Not available.
ST Language Example
Inst_GetCtrlInfo( ExecuteRead, CTRLINFO_SERIAL_NUMBER); if Inst_GetCtrlInfo.Done then serialNumber := Inst_GetCtrlInfo.Value; end_if;