FB_SimCoE402_Inverter

FB_SimCoE402_Inverter 1:

This simulation corresponds to an inverter axis and can be used to replace a real inverter drive by providing compatible mapping elements and emulating behavior very similar to that of a real axis.

The FB provides mapping elements for CoE interfaces of basic frequency inverters (FI) that match the interfaces implemented by the adapter FB for this drive type. Mapping is done in the same way as for the real drive unit.

Syntax:

FUNCTION_BLOCK ABSTRACT FB_SimCoE402_Inverter EXTENDS FB_SimAxCommon
VAR_INPUT
    EtC_Device AT %Q* : FB_EtC_SimDevice;
END_VAR

FB_SimCoE402_Inverter 2: I/O variables

Name

Type

Direction

Description

EtC_Device

FB_EtC_SimDevice

Input/Output

Diagnostic interface for an EtherCAT-capable device.

FB_SimCoE402_Inverter 3: Properties

Name

Type

Access

Description

ActualPosition

LREAL

Get, Set

Simulated axis position.

Notice The simulated position of the actuator can deviate from the reported axis position.

FB_SimCoE402_Inverter

Load

LREAL

Get, Set

Here you can specify a load that is claimed by a simulated process.

MaxTurnRate

LREAL

Get, Set

The maximum turn rate of the drive.

MinTurnrate

LREAL

Get, Set

A minimum turn rate can be specified here. If a value > 0.0 is specified, the drive ignores set turn rates below this threshold and a dead band is created.

If the default is less than 10 RPM, it is assumed that the inverter supports vector control.

OutputFactor

LREAL

Get, Set

Multiplier for the output.

RampTime

LREAL

Get, Set

Here the time for the ramp from zero to MaxTurnRate or vice versa is defined.

ReferenceLoad

LREAL

Get, Set

A reference value for Load.
Alias for .MovingMass

VectorControlled

BOOL

Get

A TRUE specifies that the actual turn rate is load independent.

If FALSE, the inverter responds to a load torque with a proportional slip. The simulation assumes a slip of 0 to 50 % for a load of 0 to 100 % of the reference load.

FB_SimAxCommon

ActualVelocity

LREAL

Get, Set

Simulated axis velocity.

Notice The simulated velocity of the actuator may deviate from the reported axis position.

AbsolutSwitch

BOOL

Get

This runtime value provides information about the simulated feedback signal as defined by AbsSwitchHighSelect.

AbsSwitchHighEnd

LREAL

Get, Set

This parameter defines the threshold value for the case AbsSwitchHighSelect=TRUE: AbsolutSwitch is TRUE if the simulated actuator position is >= AbsSwitchHighEnd.

Notice The simulated position of the actuator can deviate from the reported axis position.

AbsSwitchHighSelect

BOOL

Get, Set

This parameter defines the active AbsolutSwitch. A TRUE selects AbsSwitchHighEnd, while a FALSE makes AbsSwitchLowEnd the active AbsolutSwitch.

AbsSwitchLowEnd

LREAL

Get, Set

This parameter defines the threshold value for the case AbsSwitchHighSelect=FALSE: AbsolutSwitch is TRUE if the simulated actuator position is <= AbsSwitchLowEnd.

Notice The simulated position of the actuator can deviate from the reported axis position.

CycleTime

LREAL

Get, Set

This parameter must be initialized with the update calling cycle of the Cyclic() method and will be forwarded to any sub-component if required. It is used to define any time behavior.

DenyEnable

BOOL

Get, Set

A TRUE blocks the feedback of the controller enable. This can be used to simulate a lack of response from the field device.

EncoderInterpolation

LREAL

Get, Set

This parameter must be initialized with the same value as the corresponding parameter in the motion technology:

  • NC: encoder, parameter, scaling factor denominator
  • Hydraulics library: encoder, inc. Interpolation

EncoderNoiseLevel

LREAL

Get, Set

The simulated axis offers the possibility to disturb the reported position with a pseudo-random white noise. This is realized by a FB_Noise() function block. The parameter EncoderNoiseLevel is forwarded as SetWhiteNoiseLevel.

EncoderWeighting

LREAL

Get, Set

This parameter must be initialized with the same value as the corresponding parameter in the motion technology:

  • NC: encoder, parameter, scaling factor numerator
  • Hydraulics library: encoder, weighting factor

EncoderZeroShift

LREAL

Get, Set

This parameter must be initialized with the same value as the corresponding parameter in the motion technology:

  • NC: rotary encoder, parameter, position bias
  • Hydraulics library: encoder, zero offset

HighSideBlock

LREAL

Get, Set

The simulated position of the actuator is limited to a value less than or equal to this parameter.

HighSideEndswitch

LREAL

Get, Set

This parameter defines the UpperEndSwitch threshold that becomes TRUE when the simulated position of the actuator is >= this parameter.

HighSideSpringLengt

LREAL

Get, Set

This parameter defines the length of a simulated spring-like effect at the upper side of the actuator stroke.

LowerEndSwitch

BOOL

Get

This runtime value provides information about the state of a simulated sensor. Becomes TRUE if the position of the simulated actuator is >= HighSideEndswitch.

LowSideBlock

LREAL

Get, Set

The simulated position of the actuator is limited to a value above or equal to this parameter.

LowSideEndswitch

LREAL

Get, Set

This parameter defines the LowerEndSwitch threshold that becomes TRUE when the simulated position of the actuator is <= this parameter.

LowSideSpringLength

LREAL

Get, Set

This parameter defines the length of a simulated spring-like effect at the lower side of the actuator stroke.

MovingMass

LREAL

Get, Set

This parameter can be used to define a moving mass. It is used to calculate dynamic acceleration and deceleration forces, torques or pressures.

NoBlock

BOOL

Get, Set

If this parameter is set to TRUE, the use of the springs and blocks on the upper and lower sides will be disabled.

Reversed

BOOL

Get, Set

The simulated axis works inverted.

UpperEndSwitch

BOOL

Get

This runtime value provides information about the state of a simulated sensor. Becomes TRUE if the position of the simulated actuator is <= LowSideEndswitch.

FB_SimCoE402_Inverter 4: Methods

Name

Description

GoFaultState()

This method can be used to simulate an error situation on the simulated axis.

FB_SimCoE402_Inverter

Cyclic()

Cycle method

TriggerError()1

A call to this method places the simulated drive into the error state.
Alternatively: GoFaultState()

Prerequisites

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4024.56

PC or CX (x64, x86)

Tc3_PlasticFunctions (>= v12.8.2.0)