AWOL:
Simplify and tst each component in isolation.
Write a simple loop to display a count and see if that works.
Chimaera:
If I call the 40 different variables up with a for-loop, it works spendlidly. Just how the rotary encoder code works without a problem, if the result is sent via usb to the arduino-gui
I already did. This is the strange thing. Both programs run as stand-alone-code perfectly. I think the encoder software somehow influences the shiftregister.
I made the observation, that if test the encoder-code and the 7-segment is still connected (though NOT in the code), some segments start to lighten up, when I rotate the encoder.