PLC data conversion instructions BCD BIN


(1) BCD BCD conversion instructions (d) BCD (p) instruction ALCE number is FNC18. It is the source component of the binary number is converted into BCD codes to send to the target element, as shown in Figure 3-41.
If the instructions for 16-bit operation, Executive outcomes beyond the scope of 0~9999 an error occurs when instructions are 32-bit operation, implementation of results beyond the scope 0~99999999 also be mangled. PLC internal operations for binary operations, BCD instructions available to be transformed into a binary number output BCD code into a sevensegment display.
(2) BIN BIN transform instructions (d) BIN (p) order number is FNC19. It is the source component of BCD data is converted to binary data sent to the target element, as shown in Figure 1. Constant k operation components cannot be used as this directive, because, before any treatment they will be converted to a binary number.

Figure 1 data conversion instructions
Be aware of when using the BCD/BIN directive:
1) source operand KnK, KnY, KnM, KnS, t, c, d, v, and z target operand KnY, KnM, KnS, t, c, d, v, and z;
2) 16 bit operation step 5 program, 32-bit arithmetic 9 programs.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.