
Operation
Operating Instructions Option Module IEI for b maXX drive PLC BM4-O-
IEI-01
57
7
Outputs
si_ERR
,
x_ERR
:
If an error occurs, the system sets error bit x_ERR to TRUE and outputs error number
si_ERR. If no error occurs, x_ERR stays FALSE and si_ERR = 0.
Error number si_ERR:
Example of initializing and operating the IEI option module in encoder mode
A rectangle incremental encoder is connected to a motor. The signal edges of the rectan-
gle incremental encoder are counted on a single basis. The encoder rotates clockwise
and the system counts up with this direction of rotation.
Apart from this, an encoder is connected to input probe 1. On the one hand, you want to
save the counter value on the rising edge of the probe (
→
latch condition 2, result in
counter latch register 2). On the other hand, you also want to save the counter value on
the falling edge of the probe (
→
latch condition 3, result in counter latch register 3).
The example assumes that the IEI option module is fitted in slot G and that FB IEI_INIT
is called in the cold boot and warm restart task.
You initialize the IEI option module as follows:
The global variable _IEI_Ctrl_Slot_G is connected at input _Base.
At input us_FACTOR, you connect USINT#1 for "single" multiplication.
At input x_DIRECTION, FALSE is connected for
"If the encoder rotates clockwise, the internal counter counts up"
(alternatively, input x_DIRECTION is not assigned).
At input us_TOUCH_PROBE_MODE, USINT#0 is connected for "no probe mode" (alter-
natively, input us_TOUCH_PROBE_MODE is not assigned).
At input x_EN, TRUE is connected.
After calling FB IEI_INIT, the latch mode register is set to a value of 16#1101.
si_ERR
Meaning
-128 to -1
Reserved
0
No error
1
An invalid value for multiplication in encoder mode was entered at input
us_FACTOR.
2
You did not state a valid encoder mode (us_FACTOR = 1, 2, 4) or a valid
probe mode (us_TOUCH_PROBE_MODE = 1, 2).
3
You stated encoder mode (us_FACTOR = 1, 2, 4) and probe mode
(us_TOUCH_PROBE_MODE = 1, 2).
4 to 127
Reserved