OK, now where talking business.
The info about the amplifier circuit stated very clearly that you couldn't use just any opto-coupler. It had to be types which were fast enough at the LED side to 'see' signals of no more than 125µs long and prolonged these at the output side to more than 200µs. They even mentioned the right types to use: 4N28 or SU25.
Because the S7-22X series are newer than the S7-21X, I think it's likely these newer PLCs are faster and can detect signals that are shorter, but at the moment I don't know how much shorter. I don't have the info at hand here at home, but tomorrow I'll look it up in the office.
Another problem can be the DC amplification factor of the opto couplers. Sometimes this is below 1, meaning that the current through the transistor part is lower than the current used to drive the LED. If you provide more info about the used components, we might even point you to possible hardware problems.
Kind regards,