GetCtrlInfo

PLCopen motion icon Pipe Network motion icon

 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:

Value

Integer
Representation

Description

CTRLINFO_SERIAL_NUMBER

1

Controller serial number.

CTRLINFO_MODEL_NUMBER

2

Controller model number.

CTRLINFO_PART_NUMBER

3

Controller part number.

CTRLINFO_CPU_CORE_COUNT

4

Number of CPU cores in the controller.

CTRLINFO_PROJECT_BUILD_NO

5

The project build number of the running application.

CTRLINFO_PROJECT_COMPILE_TIME

6

The project compile time of the running application.

CTRLINFO_MODEL_FAMILY

7

Controller model family.

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

Integer
Representation

Description

CTRLINFO_ERROR_NO_ERROR

0

No error.

CTRLINFO_ERROR_INV_PARAMETER

1

Invalid parameter.

CTRLINFO_ERROR_CANT_READ_DATA

2

Error reading data.

CTRLINFO_ERROR_NOT_PDMM

3

Not valid on a non-AKD PDMM, PCMM, or PCMM2G controller.

Value

STRING

No range

N/A

String containing data that was read.

IF Parameter Number = CTRLINFO_MODEL_FAMILY (7):

Value

Integer
Representation

Description

CTRLINFO_MODEL_FAMILY_PXMM

0

AKD PDMM or PCMM - 1st generation controller.

CTRLINFO_MODEL_FAMILY_PCMM2G

1

PCMM2G - 2nd generation controller.

CTRLINFO_MODEL_FAMILY_SIMULATOR

2

KAS Simulator

CTRLINFO_MODEL_FAMILY_UNKNOWN

3

Unknown controller family.

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;