Why does this simulation give completely different results between offline and on-hardware(HIL)?

This appears to be a duplicate of the question asked in Why does this simulation give completely different results between offline and on-hardware (HIL)?. Resolution will be handled in that ticket.