AutomationDirect
Search
Login | Register
Accounts & Orders
Cart
0
$0.00

Recent Orders

View and Manage | Request Cancellation

Your Account

Account Home

Checkout   $0.00


  • My Orders
  • Product Returns (RMAs)
  • Pay Proforma Invoices
  • Pay Freights
  • Invoices / Invoice Reprint
  • Quotes / Favs / BOMs
  • Packing List Reprint
  • My Product Docs
  • Credit Application
  • Tax Exemption
| Direct Sales in US and Canada | 1-800-633-0405 | About Us | Contact Us | Line Card
Products | Support
| Compare
  
Ordering Tools  
warning Cookies are not enabled on your browser.
Cookies are required for our site. Please enable cookies in your browser preferences to continue.
+
Navigation
+
Shopping Categories
  • Barcode / RFID / Vision
  • Bulk Wire & Cable
  • Cables (Terminated)
  • Circuit Protection / Fuses / Disconnects
  • Communications
  • Drives & Soft Starters
  • Enclosure Thermal Management & Lights
  • Enclosures & Racks
  • Field I/O
  • HMI (Human Machine Interface)
  • Hydraulic Components
  • Motion Control
  • Motor Controls
  • Motors
  • Pneumatic Components
  • Power Products (Electrical)
  • Power Transmission (Mechanical)
  • Process Control & Measurement
  • Programmable Controllers
  • Pushbuttons / Switches / Indicators
  • Relays / Timers
  • Safety
  • Sensors / Encoders
  • Stacklights
  • Structural Frames / Rails
  • Tools & Test Equipment
  • Valves
  • Water (Potable) Components
  • Wiring Solutions
  • Retired Products
+
Learn More
  • Brand Line Card
  • What's New
  • E-newsletter
  • Online PDF Catalog
  • Video Tutorials
  • Company Reviews
  • Learning Library
  • Affordable Training
  • Free Online PLC training
  • Cybersecurity
+
In Depth Product Sites
  • Programmable Logic Controllers
  • Productivity1000 PLCs
  • Productivity2000 PLCs
  • Productivity3000 PLCs
  • ProductivityCODESYS
  • LS Electric XGB Series PLCs
  • ProductivityOpen
  • CLICK PLCs
  • Do-more H2 PLCs or
    Do-more T1H Series
  • Do-more BRX PLCs
  • C-more Touch Panels
  • AC & DC Drives
  • Motion Control Components
  • Servos
  • StrideLinx
  • Pneumatics
+
Product Selectors &
Configuration Utilities
  • PLC Family Selector
  • P1000 PLC Systems
  • P2000 PLC Systems
  • P3000 PLC Systems
  • ProductivityCODESYS
  • CLICK PLC Systems
  • Do-more® BRX PLC Systems
  • LS-Electric® XGB PLC Systems
  • Productivity®Open Systems
  • Datalogic® Safety Light Curtains
  • LS-Electric® Servo Systems
  • Nitra® Pneumatic Grippers
  • Object Detection (Sensors)
  • PAL Controller Configurator
  • Precision Gearbox Selector
  • Protos X® Field I/O
  • Quadritalia® Modular Enclosures
  • Stellar® Soft Starters
  • Stepper System Selector
  • SureFrame T-slot Extrusion
  • SureMotion® XYZ Gantry
  • SureServo2® System Selector
  • SureStep® Linear Actuators
  • Timing Belts & Pulleys
  • Werma® Stacklights
  • ZIPLinks

BRX Do-more Designer PLC Interrupts Part 2: Timer Generated from AutomationDirect


Related Products

BX-DM1E-M
BX-DM1E-M Thumbnail
BX-DM1E-M-D
BX-DM1E-M-D Thumbnail
BX-DM1E-10ED13-D
BX-DM1E-10ED13-D Thumbnail
BX-DM1E-10ED23-D
BX-DM1E-10ED23-D Thumbnail
BX-DM1E-10ER3-D
BX-DM1E-10ER3-D Thumbnail
BX-DM1E-10AR3-D
BX-DM1E-10AR3-D Thumbnail
BX-DM1-10ED1-D
BX-DM1-10ED1-D Thumbnail
BX-DM1-10ED2-D
BX-DM1-10ED2-D Thumbnail
BX-DM1-10ER-D
BX-DM1-10ER-D Thumbnail
BX-DM1-10AR-D
BX-DM1-10AR-D Thumbnail
BX-DM1E-18ED13
BX-DM1E-18ED13 Thumbnail
BX-DM1E-18ED23
BX-DM1E-18ED23 Thumbnail
BX-DM1E-18ER3
BX-DM1E-18ER3 Thumbnail
BX-DM1E-18AR3
BX-DM1E-18AR3 Thumbnail
BX-DM1E-18ED13-D
BX-DM1E-18ED13-D Thumbnail
BX-DM1E-18ED23-D
BX-DM1E-18ED23-D Thumbnail
BX-DM1E-18ER3-D
BX-DM1E-18ER3-D Thumbnail
BX-DM1-18ED1
BX-DM1-18ED1 Thumbnail
BX-DM1-18ED2
BX-DM1-18ED2 Thumbnail
BX-DM1-18ER
BX-DM1-18ER Thumbnail
BX-DM1-18AR
BX-DM1-18AR Thumbnail
BX-DM1-18ED1-D
BX-DM1-18ED1-D Thumbnail
BX-DM1-18ED2-D
BX-DM1-18ED2-D Thumbnail
BX-DM1-18ER-D
BX-DM1-18ER-D Thumbnail
BX-DM1E-36ED13
BX-DM1E-36ED13 Thumbnail
BX-DM1E-36ED23
BX-DM1E-36ED23 Thumbnail
BX-DM1E-36ER3
BX-DM1E-36ER3 Thumbnail
BX-DM1E-36AR3
BX-DM1E-36AR3 Thumbnail
BX-DM1E-36ED13-D
BX-DM1E-36ED13-D Thumbnail
BX-DM1E-36ED23-D
BX-DM1E-36ED23-D Thumbnail
BX-DM1E-36ER3-D
BX-DM1E-36ER3-D Thumbnail
BX-DM1-36ED1
BX-DM1-36ED1 Thumbnail
BX-DM1-36ED2
BX-DM1-36ED2 Thumbnail
BX-DM1-36ER
BX-DM1-36ER Thumbnail
BX-DM1-36AR
BX-DM1-36AR Thumbnail
BX-DM1-36ED1-D
BX-DM1-36ED1-D Thumbnail
BX-DM1-36ED2-D
BX-DM1-36ED2-D Thumbnail
BX-DM1-36ER-D
BX-DM1-36ER-D Thumbnail
BX-DMIO-M
BX-DMIO-M Thumbnail
BX-DMIO-M-D
BX-DMIO-M-D Thumbnail
BX-MBIO-M
BX-MBIO-M Thumbnail
BX-MBIO-M-D
BX-MBIO-M-D Thumbnail
BX-EBC100-M
BX-EBC100-M Thumbnail
BX-EBC100-M-D
BX-EBC100-M-D Thumbnail
BX-08ND3
BX-08ND3 Thumbnail
BX-12ND3
BX-12ND3 Thumbnail
BX-16ND3
BX-16ND3 Thumbnail
BX-32ND3
BX-32ND3 Thumbnail
BX-08NF3
BX-08NF3 Thumbnail
BX-08TD1
BX-08TD1 Thumbnail
BX-08TD2
BX-08TD2 Thumbnail
BX-12TD1
BX-12TD1 Thumbnail
BX-12TD2
BX-12TD2 Thumbnail
BX-16TD1
BX-16TD1 Thumbnail
BX-16TD2
BX-16TD2 Thumbnail
BX-32TD1
BX-32TD1 Thumbnail
BX-32TD2
BX-32TD2 Thumbnail
BX-08CD3R
BX-08CD3R Thumbnail
BX-12CD3D1
BX-12CD3D1 Thumbnail
BX-12CD3D2
BX-12CD3D2 Thumbnail
BX-16CD3D1
BX-16CD3D1 Thumbnail
BX-16CD3D2
BX-16CD3D2 Thumbnail
BX-08SIM
BX-08SIM Thumbnail
BX-08NB
BX-08NB Thumbnail
BX-12NB
BX-12NB Thumbnail
BX-16NB
BX-16NB Thumbnail
BX-08NA
BX-08NA Thumbnail
BX-12NA
BX-12NA Thumbnail
BX-16NA
BX-16NA Thumbnail
BX-08TA
BX-08TA Thumbnail
BX-12TA
BX-12TA Thumbnail
BX-08TR
BX-08TR Thumbnail
BX-12TR
BX-12TR Thumbnail
BX-16TR
BX-16TR Thumbnail
BX-05TRS
BX-05TRS Thumbnail
BX-04ADM-1
BX-04ADM-1 Thumbnail
BX-04AD-1
BX-04AD-1 Thumbnail
BX-08AD-1
BX-08AD-1 Thumbnail
BX-16AD-1
BX-16AD-1 Thumbnail
BX-04AD-2B
BX-04AD-2B Thumbnail
BX-08AD-2B
BX-08AD-2B Thumbnail
BX-16AD-2B
BX-16AD-2B Thumbnail
BX-04DA-1
BX-04DA-1 Thumbnail
BX-08DA-1
BX-08DA-1 Thumbnail
BX-04DA-2B
BX-04DA-2B Thumbnail
BX-2AD2DA-1
BX-2AD2DA-1 Thumbnail
BX-4AD2DA-1
BX-4AD2DA-1 Thumbnail
BX-2AD2DA-2B
BX-2AD2DA-2B Thumbnail
BX-4AD2DA-2B
BX-4AD2DA-2B Thumbnail
BX-08DA-2B
BX-08DA-2B Thumbnail
BX-04THM
BX-04THM Thumbnail
BX-08THM
BX-08THM Thumbnail
BX-4THM4DA-1
BX-4THM4DA-1 Thumbnail
BX-06RTD
BX-06RTD Thumbnail
BX-4RTD4DA-1
BX-4RTD4DA-1 Thumbnail
BX-08NTC
BX-08NTC Thumbnail
BX-SERIO
BX-SERIO Thumbnail
BX-HSIO1
BX-HSIO1 Thumbnail
BX-HSIO2
BX-HSIO2 Thumbnail
BX-P-SER2-RJ12
BX-P-SER2-RJ12 Thumbnail
BX-P-SER2-TERM
BX-P-SER2-TERM Thumbnail
BX-P-SER4-TERM
BX-P-SER4-TERM Thumbnail
BX-P-USB-B
BX-P-USB-B Thumbnail
BX-P-ECOMLT
BX-P-ECOMLT Thumbnail
BX-RTB03S
BX-RTB03S Thumbnail
BX-RTB10
BX-RTB10 Thumbnail
BX-RTB10-1
BX-RTB10-1 Thumbnail
BX-RTB10-2
BX-RTB10-2 Thumbnail
BX-RTB18
BX-RTB18 Thumbnail
BX-RTB18-1
BX-RTB18-1 Thumbnail
BX-RTB36
BX-RTB36 Thumbnail
BX-RTB36-1
BX-RTB36-1 Thumbnail
BX-RTB08
BX-RTB08 Thumbnail
BX-RTB08-1
BX-RTB08-1 Thumbnail
BX-RTB08-2
BX-RTB08-2 Thumbnail


To learn more: https://www.automationdirect.com/do-more?utm_source=WO2Tpy1dXec&utm_medium=VideoTeamDescription

(VID-BRX-0004)

BRX & Do-more Interrupts can be triggered at regular intervals or even used in a one-shot mode. Watch this tutorial to learn how.
**Software Version used in this video: Do-more Designer 2.0.0

Online Support Page: https://community.automationdirect.com/s/?utm_source=WO2Tpy1dXec&utm_medium=VideoTeamDescription

**Please check our website for our most up-to-date product pricing and availability.


Hide Transcript
View Transcript

The Do-more BRX PLC has four built in timers you can use for interrupts. Why is that important? Well, Remember that a PLC reads the inputs at the top of the scan, executes its ladder logic, then updates the outputs at the bottom of the scan. If we toggle an output bit every scan it would look like this on most scans, but on some scans it might take a little longer – it all depends on what the ladder logic is doing during that particular scan. And that’s the key point – we never really know exactly when those outputs are going to be updated. So what if we wanted generate a regular periodic output that wasn’t affected by the scan timing? Or what if we want to add a known delay to an output and not have it affected by the scan time? Well, that’s where timer based interrupts and the immediate out instructions come in handy. Let’s do an example to see how that works. Let’s setup a timed interrupt, make it recurring, with a duration of 250 microseconds, and create a new ISR to handle that timer generated interrupt event and hit OK. So now, every 250 microseconds – regardless of the scan time - this ISR will be executed. In that ISR, let’s toggle output Y0 so we can see it on a logic analyzer. Notice that we’re using an immediate instruction to toggle Y0. That says set this output immediately – don’t wait for the bottom of the scan when outputs normally get updated. Accept all of that. Make sure the PLC is in terminal mode. Write it to the PLC. Switch it back to RUN mode. If we look at Y0 on a logic analyzer we see our 250 microsecond pulses coming out. And look how rock steady they are. And remember – we don’t have any ladder code in the main loop do we? This runs completely independent of the normal scan. In fact let’s try that. I’ve created a little ladder program that uses a timer to enable a task every millisecond and also resets the timer’s accumulator so it will start counting up again to 1 msec. The task, just increments a register a thousand times to waste some scan time. I’m also toggling Y1 each scan using this Scan Toggle bit which inverts every scan. That will get updated at the bottom of each scan just like all the other normal outputs. So we should see Y1 toggle at regular intervals, except on the scans where the task is enabled which will make the scan take a lot longer. Now if we look at those outputs on a logic analyzer, we can see Y1 toggles every scan and some scans take a lot longer than others when that task gets enabled. But Y0 – which is toggled by the interrupt timer event - toggles at regular intervals completely independent of the scan time. Again, exactly what we expect. So now you have a way to generate super accurate outputs that are independent of the scan time. How cool is that? If you need to disable that timer interrupt, you can either use the ISR structure member to inhibit that in code, or, just go back to the dashboard, click on interrupts and uncheck the enable box. That interrupt event is now disabled. The immediate out instructions are really intended to be used in ISR’s but you can use them in your regular code if you want to. For example, let’s clear out the previous example and use the immediate instructions in the main program to set and reset Y3. What would happen if these were regular out instructions? Well, since outputs don’t get updated until the bottom of the scan, all we would ever see would be the result of the reset instruction and Y3 would never change. But in this demo we’re using the immediate instructions. Let’s see what happens. Accept all of that. Switch to terminal mode, write the program – notice Do-more Designer is warning us that we are using immediate instructions outside of an Interrupt Service Routine – we know that so we hit ok. Sure enough, we see Y3 toggle – it gets set and reset during each scan – it doesn’t wait for the bottom of the scan to get updated. Cool. Looks like it takes a couple microseconds to do that, but look at this - the scan takes about 280 microseconds. Why does the scan take so long if all we are doing is toggling a bit? Because there’s a bunch of stuff the PLC has to do at the top of a scan, including reading all the inputs and a bunch of stuff it has to do at the bottom of the scan including setting the outputs. Regardless, half a millisecond for a scan? That’s pretty good. So far we have been using the timer to generate periodic interrupt events independent of the scan time. Can you use the interrupt timer to generate just a single super accurate delay? Maybe you want something to happen sometime after an event occurs and it needs to happen right away, and not wait for the end of scan. Easy, just use this one shot mode. The interrupt event will trigger one at the delay time you specify. Easy. If you have any questions about the BRX PLC please contact AutomationDirect’s free award winning support team during regular business hours. They’ll be happy to help. And don’t forget the forums. There are lots of folks there that love to share their years of experience. Just don’t post any questions directed at AutomationDirect’s support team there – they don’t monitor the forums on a regular basis.



No data returned!
An error has occurred! Please contact support
Videos Home > BRX Do-more Designer PLC Interrupts Part 2: Timer Generated from AutomationDirect
Contact, Connect & More
Sign Up
to receive:
FREE e-Newsletter
sign up today!
Connect With Us
Social Media Channels:
linkedin    facebook    x    instagram    youtube
Company Information
About Us
Brand Line Card
System Integrator Program
International Sales
Panel Builder Program
Site Help
Company Reviews
Download Price List
Contact Us
Contact Options
1-800-633-0405
Monday - Friday
9 a.m. - 6 p.m. ET
excluding holidays
Career Opportunities
Voted #1 mid-sized employer in Atlanta
We're a great place to work!
Check out our job openings

Need Training?
Affordable Training by Interconnecting Automation
Free Online PLC Training
FREE Video Tutorials
Information & News
What's New / In The News
FREE e-Newsletter
Automation Notebook
Product Literature
White Papers
News, Product and Training Bulletins
E-Books
Shop with confidence
Checked   Safe & Secure
payment methods


We accept VISA, MasterCard, Discover, American Express, PayPal or company purchase orders.
AutomationDirect

BBB Accredited

Voted #1 mid-sized employer in Atlanta
Check out our job openings

Copyright © 1999-2025 AutomationDirect.  ALL RIGHTS RESERVED.
Site Map     Send Us your Feedback     Unsubscribe     Email Preferences     Legal & Business Policies     YouTube Terms of Service
Clear login credentials



Back to Top


spinner Updating...
Info