208k views
5 votes
Write a PLC program that uses two up-counters to turn on an output when a count is less than 10 and when the count is greater than or equal to 20. A NO reset push-button input will reset the counters, and another NO push-button will cause the counters to increment. You must use only needed counter bits (no Chapter 10 comparison instructions). Use correct SLC500 counter addresses.

User Lachy
by
7.1k points

1 Answer

4 votes

Final answer:

The question entails creating a PLC program on an SLC500 controller utilizing two up-counters to control an output based on certain counter values, with specific logic for counter incrementing and resetting. The output activates if the first counter value is less than 10 or the second is 20 or more, without using comparison instructions.

Step-by-step explanation:

The question requires writing a PLC program in the context of an SLC500 controller that involves using two up-counters to control an output based on the counter values, with specific logic for resetting and incrementing the counters. To accomplish this, you would use counter instructions such as CTU (Count Up) and examine if open (XIO) or examine if closed (XIC) instructions for push-button inputs. With SLC500 address notation, a counter might be addressed as C5:0, with C5 representing the counter file and 0 the specific counter within that file.

The logic would look something like:

  • Counter C5:0 is used to increment the count with each press of an increment push-button.
  • The reset push-button is tied to the reset (RES) input of the counter.
  • Two separate rungs (or logical lines of code) are used to control the output: one that turns on the output when the count is less than 10, and another that turns on the output when the count is greater or equal to 20 using appropriate XIO and XIC instructions based on the accumulated count.

The output would only be energized (turned ON) if the first counter's accumulated value is less than 10 or the second counter's accumulated value is greater than or equal to 20.

User Punit S
by
8.1k points