This is not a plea for help, but the opposite.
The native FRD (From BCD) instruction in the Logix5000 platform is, IMHO, flawed. It does NOT decode from BCD, but from HEX, as can be seen in the attached picture. It does NOT detect "illegal" (i.e. non-BCD) bit patterns in the "nibbles" of the data it is trying to decode.
To that end, I have written an Add-On Instruction which works correctly, and does a lot more. It will show you which nibble(s) is/are non-BCD, You can use an input mask if you are using other bits in the input data, and you can set it to mirror the output behaviour of the Logix500 FRD instruction.
In addition, the instruction will set the S:V status bit if it detects a bad BCD value, which you can use in your logic just like you would from any other instruction.
If anyone wants the AOI, I will post it here (zip file of the export), just ask.
None of the code is protected, and it has been fully tested.
The native FRD (From BCD) instruction in the Logix5000 platform is, IMHO, flawed. It does NOT decode from BCD, but from HEX, as can be seen in the attached picture. It does NOT detect "illegal" (i.e. non-BCD) bit patterns in the "nibbles" of the data it is trying to decode.
To that end, I have written an Add-On Instruction which works correctly, and does a lot more. It will show you which nibble(s) is/are non-BCD, You can use an input mask if you are using other bits in the input data, and you can set it to mirror the output behaviour of the Logix500 FRD instruction.
In addition, the instruction will set the S:V status bit if it detects a bad BCD value, which you can use in your logic just like you would from any other instruction.
If anyone wants the AOI, I will post it here (zip file of the export), just ask.
None of the code is protected, and it has been fully tested.