Can you post your code for that bit, There are a couple of possibilities, you are trying to use a floating point with an integer compare etc. you have the wrong "D" register or it is being written to somewhere between the conversion & the compare, however, it is possible it could be written to elsewhere, the problem with on-line monitoring is that the communications for status are read at different times so if being written to elsewhere at one point in the scan but updated at different times (Rare but have seen it).
What instructions are you using remember doing moves to a register there are a couple of types i.e. floats (EMov), Int (MOV) Doubles (DMove) the same goes for compares & you cannot mix them you have to convert them first.
The problem is that "D" registers are 16 bit but when you use them for doubles or floats then it uses two 16 bit registers i.e. if you do a [EMOV D100 D150] then it moves D100 & D101 to D150 & D151.
Is it possible you have used floats or doubles but used the following register elsewhere for example
[EMUL D100 E2.5 D102] but then
[CMP D102 D150]---------- If you did this then CMP is 16 bit but d102 (+D103) is a float so 32 bit.
or maybe you have used D103 elsewhere thinking it is spare.
I will suggest that if using floats or doubles then you have a range for floats a range for doubles & a range for integers.
i.e.
D100 to D198 floats (100 registers but 50 floats)
D200 to D298 Doubles (100 registers but 50 doubles)
D300 to D400 integers (words) 100 registers 100 integers))
Also remember that not all D registers are retentive so power down may reset them the range can be set to retentive in the PLC Parameter.