8 recording of rapid events (fb_capture), Recording of rapid events (fb_capture) – NORD Drivesystems BU0550 User Manual

Page 74

Advertising
background image

PLC logic for NORD SK 54xE frequency inverters

74

BU 0550 GB-0813

3.5.8

Recording of rapid events (FB_Capture)

The cycle time of the PLC is 5 ms, under certain circumstances this cycle is too long to capture very fast ex-
ternal events. Via FB Capture it is possible to capture certain physical values on flanks at the FI inputs. The
inputs are monitored in a 1 ms cycle. The values which are saved can later be read by the PLC.

With a positive flank on EXECUTE all inputs are read in and the Capture function is enabled. The FI input
which is to be monitored is selected via the INPUT input. The typ of flank and the behaviour of the module
are selected via EDGE.

EDGE = 0 With the first positive flank, the selected value is saved under OUTPUT1 and DONE1 is set to 1.

The next positive flank saves under OUTPUT2 and DONE2 is set to 1. The FB is then deactivated.

EDGE = 1 Behaviour as under EDGE = 0, with the difference that the negative flank is the trigger.

EDGE = 2 With the first positive flank, the selected value is saved under OUTPUT1 and DONE1 is set to 1.

The next negative flank saves under OUTPUT2 and DONE2 is set to 1. The FB is then deactivated.

EDGE = 3 Behaviour as under EDGE = 2, with the difference that first the negative flank and then the posi-

tive flank is the trigger.

If the input CONTINUOUS is set to 1, then only the settings = and 1 are relevant to EDGE. The FB contin-
ues to run and always saves the last triggering event under OUTPUT1. DONE1 remains active from the first
event. DONE2 and OUTPUT2 are not used.

The BUSY output remains active until both Capture events(DONE1 and DONE2) have occurred.

The function of the module can be ended at any time by a negative flank on EXECUTE. All outputs retain
their values. With a positive flank in EXECUTE first of all, all outputs are deleted.

Table 100 FB_Capture

NOTE

Several instances of this FB may exist in the PLC program. However, only two
instances may be active at the same time!

VAR_INPUT

VAR_OUTPUT

Input

Explanation

Type

Output

Explanation

Type

EXECUTE

Execute

BOOL

DONE1

Value in OUTPUT1 valid

BOOL

CONTINUOUS

Single execution or continuous
operation

BOOL

DONE2

Value in OUT valid

BOOL

INPUT

Input to be monitored
0 = Input 1
- - - -
7 = Input 8

BYTE

BUSY

FB still waitng for a Capture event

BOOL

EDGE

Triggering flank

BYTE

ERROR

the FB has an error

BOOL

SOURCE

Value to be saved
0 = Position in rotations
1 = Actual frequency
2 = Torque

BYTE

ERRORID

Error code

INT

OUTPUT1

Value for first Capture event

DINT

OUTPUT2

Value for second Capture event

DINT

ERRORID

Explanation

0

No error

1900h

INPUT value range exceeded

1901h

EDGE value range exceeded

1902h

SOURCE value range exceeded

1903h

More than two instances are active

Advertising