PRACTICE PROBLEMS

(Note: Problem solutions are available at http://sites.google.com/site/automatedmanufacturingsystems/)

1. Do the calculation below with ladder logic,

2. Implement the following function,

3. A switch will increment a counter on when engaged. This counter can be reset by a second switch. The value in the counter should be multiplied by 5, and then displayed as a binary output using output integer ’O_lights’.

4. Create a ladder logic program that will start when input A is turned on and calculate the series below. The value of n will start at 0 and with each scan of the ladder logic n will increase by 2 until n=20. While the sequence is being incremented, any change in A will be ignored.

5. The following program uses indirect addressing. Indicate what the new values in memory will be when button A is pushed after the first and second instructions.

6. A thumbwheel input card acquires a four digit BCD count. A sensor detects parts dropping down a chute. When the count matches the BCD value the chute is closed, and a light is turned on until a reset button is pushed. A start button must be pushed to start the part feeding. Develop the ladder logic for this controller. Use a structured design technique such as a state diagram.

7. Describe the difference between incremental, all and a number for file oriented instruction, such as FAL.

8. What is the maximum number of elements that moved with a file instruction? What might happen if too many are transferred in one scan?

9. Write a ladder logic program to do the following calculation. If the result is greater than 20.0, then the output ’solenoid’ will be turned on.

10. Write ladder logic to reset an RTO counter (timer) without using the RES instruction.

11. Write a program that will use Boolean operations and comparison functions to determine if bits 9, 4 and 2 are set in the input word input_card. If they are set, turn on output bit match.

12. Explain how the mask works in the following MVM function. Develop a Boolean equation.

13. A machine is being designed for a foreign parts supplier. As part of the contractual agreement the logic will run until February 26, 2008. However, after that date the machine will enable a ‘contract_expired’ value and no longer run. Write the ladder logic.

14. Use an FAL instruction to average the values in n[0] to n[20] and store them in ’n_avg’.

15. The input bits from ’input_card_A’ are to be read and XORed with the inputs from ’input_card_B’. The result is to be written to the output card ’output_card’. If the binary pattern of the least 16 output bits is 1010 0101 0111 0110 then the output ’match_bell’ will be set. Write the ladder logic.

16. Write some simple ladder logic to change the preset value of a counter ’cnt’. When the input ‘A’ is active the preset should be 13, otherwise it will be 9.

17. A machine ejects parts into three chutes. Three optical sensors (A, B and C) are positioned in each of the slots to count the parts. The count should start when the reset (R) button is pushed. The count will stop, and an indicator light (L) turned on when the average number of parts counted is 100 or greater.

18. a) Write ladder logic to calculate and store the binary (geometric) sequence in 32 bit integer (DINT) memory starting at n[0] up to n[200] so that n[0] = 1, n[1] = 2, n[2] = 4, n[3] = 16, n[4] = 64, etc. b) Will the program operate as expected?