FB_AX2000_Parameter

FB_AX2000_Parameter 1:

The function block FB_AX2000_Parameter is used to write/read the data for parameterizing the drive.

FB_AX2000_Parameter 2:

Please note that the "STOP" input of the AX2000AXACT function block must remain TRUE while writing a parameter to change the operation mode.

FB_AX2000_Parameter 3: Inputs

VAR_INPUT
    iSlaveAddress   : BYTE := 0;(* Station Address of the Slave *)
    iPnu            : WORD := 16#03A2;(* Parameter-Number *)
    nAxis           : BYTE := 1;(* Number of Axis *)
    iLength         : BYTE := 4;(* Length of the parameter (2 or 4) *)
    iSubIndex       : BYTE;
    iParameterValue : DWORD := 2;(* Parameter value *)
    iFC310xDeviceId : WORD := 1;(* Device-ID of the FCxxxx *)
    bStartRead      : BOOL;(* StartFlag to start the PKW-Read *)
    bStartWrite     : BOOL;(* StartFlag to start the PKW-Write *)
    tTimeOut        : TIME := DEFAULT_ADS_TIMEOUT;
END_VAR

Name

Type

Description

iSlaveAddress

BYTE

Station address

iPnu

WORD

Selection of the parameter to be read or written. List of the available parameter numbers.

nAxis

BYTE

Axis ID

iLength

BYTE

Length of the parameter (2 or 4)

iSubIndex

BYTE

 

iParameterValue

DWORD

Value of the parameter to be read or written.

iFC310xDeviceId

WORD

Device-ID

bStartRead

BOOL

A positive edge at this Boolean input sends a start command to the axis to read the parameter selected with 'Pnu'.

bStartWrite

BOOL

A positive edge at this Boolean input sends a start command to the axis to write the parameter selected with 'Pnu'. When changing the operation mode, the write command is only effective with Stop=TRUE on the FB_AX2000_AXACT function block.

tTimeOut

BOOL

Maximum time allowed for the execution of the command.

FB_AX2000_Parameter 4: Outputs

VAR_OUTPUT
    bBusy      :BOOL;
    iErrorId   :DWORD;
    iReadValue :DINT;
END_VAR

Name

Type

Description

bBusy

BOOL

This output remains TRUE until the function block has executed a command. While Busy = TRUE, no new command will be accepted at the inputs. Note that it is not the execution of the service that is monitored in terms of time, but only its acceptance.

iErrorId

DWORD

Contains the command-specific error code of the most recently executed command. Is reset to 0 by the execution of a command at the inputs.

iReadValue

DINT

Parameter value as a response to the "StartRead" command.

Requirements

Development environment

Target platform

IO hardware

PLC libraries to be integrated (category group)

TwinCAT v3.1.0

PC or CX (x86)

AX2000 Profibus box

Tc2_IoFunctions (IO)