BCD numbers (INV)

Hi everyone,
Am working with the digital display with the BCD data type, could you explain what causes the INV (invalid number) ?
Even if the number doesn’t contain Hex (A, B …) i still get the INV !

Hi @ImGr!
In the BCD numbering system, each decimal digit is represented by four bits. There are 10 digits in the decimal system (0 to 9), and, as you can see in the image below, they can be represented by 0000 through 1001.


All decimal digits have been covered so the remaining combinations (1010 through 1111, or A through F in hexadecimal) are invalid by definition.

When you force the display’s tag with an integer, let’s say 26(dec) for example, it will first be converted to a hexadecimal number (1A). In BCD, this number is invalid.

If you force it with 17(dec), which is 11 in hexadecimal, it will display the valid number.


Hope you find this helpful!

hi @beatriz.santos
Thanks for the answer, but what am looking for is why for example when i have 9000 and 8000 (bcd) it shows INV with the WORD configuration ! i think it considers the forth digit as a sign digit am i right ?! so in order to have that shown i have to use the DWORD configuration.
i also noticed that when using the DWORD configuration we can’t use one word from un output module and the second one from another ! (am i the only one ?) which means that we have to give it an entire 32bits module !
finally i want to give a suggestion if it’s not too much asked x) ! it is to add a numerical panel (INPUT) so that we don’t to force values to be shown.
Thanks a lot for your time and support !

I’m sorry @ImGr, I don’t think I fully understand what you mean. Could you show me an example? And also tell me what driver you’re using, please? Thank you.