In some cases, when you're writing a PLC program, you may need to convert the data type of a variable or a number to a different type. For that, you'll need to use the conversion operations. In the next lessons, you're going to learn how to use these instructions in your PLC program but before that, I think we better have a quick review on decimal, binary and BCD numbers. You should make use of these numbers and also know the difference between these numbers while working with conversion instructions.
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...
2 Comments