programming flashing outputs

  • Thread starter Mike Piotrowski
  • Start date

Thread Starter

Mike Piotrowski

I'm programming a micrologix 1200, where the input is a proximity sensor and the output is an led. In my application, I want to send a steady signal to the output while the timer is timing (no problem). When the timer is done, I want to send a "slow" flashing signal (I was hoping to use S:23/1 which I learned on a PLC-5 but is not available on a micrologix 1200). Can I use S:4?? If so, how? Also, I want to put a line in parallel with that if the input signal is lost, I want to send a "fast" flashing signal. Can anyone help????

Steve Myres, PE

S:4 is a free running binary clock, and you can use various bits from it (S:4/0 = fastest to S:4/15 = slowest) to create the frequency you want. I've done this many times in the SLC, but the Micros have the same clock.


Check I posted a 2 rung fragment called Blink-LED.pdf that will do this. Note that the bit number in the s:4 register determines how fast the light will blink. Use a lower number for faster, a higher number (up to 15, of course) for slower. --Joe Jansen

Eric M. Klintworth

Mike, S:4 is well suited for blinking lights, etc--much better than the PLC-5 real time clock you refer to. It increments every 100uS, so bit zero is effectively a 200uS clock. (Note that this differs significantly from the SLC-5/0x and Micrologix 1000, where S:4 increments every 10mS.) Multiplying that out, S:4/10 would have a clock rate of 204.8mS, about 5 blinks per second, S:4/11 409.6mS, S:4/12 819.2mS, S:4/13 1638.4mS, etc. A 204.8mS clock rate (about 0.1 sec on) might be a little fast for incandscent lamps, but OK for LEDs. You can try S:4/13 for slow, but that could try peoples patience. You can use any of these blink rates by simply putting a N.O. contact (examine on, in A-B parlance) in the appropriate place. You can get just slightly fancy and put two S:4 bits in parallel to get different duty cycles, for example S:4/11 and S:4/12 will give 75% duty cycle with 810mS clock rate. Have fun! Eric M. Klintworth, PE Sharp Technologies, Inc. Columbus, Ohio USA

Troy Stearns

Use bits s:4/0 through s:4/15 for various flashing frequencies, with s:4/0 having the shortest (probably too short) cycle time. The rung; "BST XIC T4:0/TT NXB XIC T4:0/DN XIC S:4/8 NXB XIC S:4/7 BND OTE B3:0/0" should do what you want. Change timer and output instruction to suit your needs and select different bits of s:4 to change flashing rates. Troy Stearns
Mike Piotrowski asked: <snip> I want to send a "slow" flashing signal (I was hoping to use S:23/1 which I learned on a PLC-5 but is not available on a micrologix 1200). Can I use S:4?? <snip> You bet! Try S2:4/4, S2:4/5, S2:4/4 etc. they are all free running clock bits, just pick the one that is the right ratefor your application. =================================== Mark Erdle Alpha Geek The Boolean Embassy ===================================

Larry Lawver

There is an error in current versions of the RSLogix500 Help files with regard to the increment interval of the free-running clock in the MicroLogix processors. It is incremented every 100 microseconds, not every 10ms as shown in Help. In the MicroLogix 1200, S:4 is the free-running clock. Try S:4/11 for the slow flash and S:4/10 for the fast flash. I think I got all of your conditions for the LED status. Try copying the following into RSLogix500: BST XIC PROXIMITY_SENSOR BST XIC T4:0/TT NXB XIC T4:0/DN XIC S:4/11 BND NXB XIO PROXIMITY_SENSOR XIC S:4/10 BND OTE OUTPUT_LED You'll have to replace my symbol placeholders with the real I/O addresses before downloading. Hope this helps! Larry Lawver Rexel / Central Florida
The SLC 500 (and probably the uLogix also) has a "free running clock" word, where each bit toggles at a certain rate. The higher bits toggle slow. Bill Sturm