Both methods you programmed should work just fine, provided your scan time of the routine AND the RPI of the IQ16 module are less than half the period between input pulses, and the pulses stay high long enough for the scan to see them, but not so long that they're still on during the next scan.
Are you saying the period between pulses is 15ms?
Can you verify any of those settings?