
Registers of the IEI option module
Operating Instructions Option Module IEI for b maXX drive PLC BM4-O-IEI-01
Document No.: 5.02013.02
Baumüller Nürnberg GmbH
50
7.3
7.3.11.1 Example of initializing and operating the IEI option module in encoder mode
A rectangle incremental encoder is connected to a motor. The signals (or the increments)
of the rectangle 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
store the counter value in the case of a rising edge of the probe. On the other hand, you
want the system to also store the counter value in the case of the falling edge of the en-
coder.
You initialize the IEI option module as follows:
Disable copying of the internal counter to counter latch registers 2 and 3
Write 16#0001 to the Latch2 disable register and the Latch3 disable register:
*.w_LATCH2_DISABLE = 16#0001
*.w_LATCH3_DISABLE = 16#0001
Set counter mode
Write 16#0002 to the counter mode register (see the example
*.w_COUNTER_MODE = 16#0002
Set latch mode
Write 16#1101 to the latch mode register (see the example
*.w_LATCH_MODE = 16#1101
Enable copying of the internal counter to counter latch registers 2 and 3
Write 16#0000 to the Latch2 disable register and the Latch3 disable register:
*.w_LATCH2_DISABLE = 16#0000
*.w_LATCH3_DISABLE = 16#0000
From now on, the internal counter counts the encoder's increments. The system copies
this counter value to counter latch register 1 when latch condition 1 (signal "Sync 1" from
the BACI) occurs.
If latch condition 2 is met (a rising edge of the probe at input probe 1), the system copies
the value of the internal counter to counter latch register 2.
If latch condition 3 is met (a falling edge of the probe at input probe 1), the system copies
the value of the internal counter to counter latch register 3.