How Do I Create A Program To Input 2-Digit BCD Data From A Digital Switch To CIO 0.08 To CIO 0.15 And Then Move The Data To Specified DM Area Words?

Modified on Sun, 11 May, 2025 at 10:39 PM



Assuming that CIO 0.00 to CIO 0.07 are allocated to other input bits, the following two conditions must be met to create the program.
1.Only the digital switch value from CIO 0.08 to CIO 0.15 is to be extracted from CIO 0.

2.The 8 bits extracted in the previous step must be moved to the lower 8 bits of a word so that they can be used in processing in the next program rung.
Use the MOVE DIGITS instruction (MOVD) to Meet Conditions 1 and 2 Above

The MOVE DIGITS instruction (MOVD) can be used to meet the conditions described in items 1 and 2 above.
Additional Information

What Is a Digit?

A "digit" is a single numeral. In this case, the instruction name MOVE DIGITS comes from the meaning to send a BCD value in digit (4-bit) increments.
Program

 


 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article