In the previous lesson we quickly reviewed the decimal, binary and BCD numbers. In this lesson you’re going to learn how to use conversion instructions to convert the data type of a variable or a number in your PLC program.
In some cases, when you’re using conversion instructions in your PLC program, you’ll face the “invalid BCD” error. In this lesson you’re going to learn what is the cause of this error and how you, as a PLC programmer, can avoid this error.
In the previous lessons you learned that when you want to use SIMATIC timers in your PLC programs you need to assign the time value as S5TIME format. For instance, if you want this timer here to time for 10 milliseconds, you need to enter S5T#10ms as the time value for the timer. But in some proj...
In the previous lesson you learned that you can assign a variable, like a memory address, as the time value for the timer instead of fixed amount. But you saw that, in this case, when you enter a value greater than 9, a "BCD conversion error" happens and that causes the CPU to stop working and th...
6 Comments