GetCtrlInfo

PLCopen motion icon Pipe Network motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Get the serial, model, and/or part number of the controller.

Inputs

Input

Data Type

Range

Unit

Default

Description

Execute

BOOL

0, 1

N/A

No default

Rising edgeClosed The transition of a digital signal from low to high. AKA: positive edge. of enableClosed Enable signal for the drive, Hardware-Enable with 24V signal to X8, Software-Enable command by setup Software, fieldbus or permanently set. Both are required for enabling the drive. 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_COUNTClosed Internal count pulses, 1 pulse = 1/2^20turn.

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 functionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. 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

KASClosed Kollmorgen Automation Suite 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;