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
  • AC Motors
  • 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

Productivity Series PLCs Motion Control - PLS Instruction from AutomationDirect


Related Products

P1-540
P1-540 Thumbnail
P1-START
P1-START Thumbnail
MICSD-16G
MICSD-16G Thumbnail
P1-01AC
P1-01AC Thumbnail
P1-08ND3
P1-08ND3 Thumbnail
P1-08TD1
P1-08TD1 Thumbnail
P1-08TD2
P1-08TD2 Thumbnail
P1-15CDD1
P1-15CDD1 Thumbnail
P1-15CDD2
P1-15CDD2 Thumbnail
P1-16CDR
P1-16CDR Thumbnail
P1-08TRS
P1-08TRS Thumbnail
P1-16TR
P1-16TR Thumbnail
P1-04ADL-1
P1-04ADL-1 Thumbnail
P1-04ADL-2
P1-04ADL-2 Thumbnail
P1-04DAL-1
P1-04DAL-1 Thumbnail
P1-04DAL-2
P1-04DAL-2 Thumbnail
P1-04THM
P1-04THM Thumbnail
P1-04NTC
P1-04NTC Thumbnail
P1-08SIM
P1-08SIM Thumbnail
PS-PGMSW
PS-PGMSW Thumbnail
P2-550
P2-550 Thumbnail
P2-RS
P2-RS Thumbnail
P2-START2
P2-START2 Thumbnail
P2-04B
P2-04B Thumbnail
P2-07B
P2-07B Thumbnail
P2-11B
P2-11B Thumbnail
P2-15B
P2-15B Thumbnail
P2-01AC
P2-01AC Thumbnail
P2-01DCAC
P2-01DCAC Thumbnail
P2-08ND3-1
P2-08ND3-1 Thumbnail
P2-08NE3
P2-08NE3 Thumbnail
P2-16ND3-1
P2-16ND3-1 Thumbnail
P2-16NE3
P2-16NE3 Thumbnail
P2-32ND3-1
P2-32ND3-1 Thumbnail
P2-32NE3
P2-32NE3 Thumbnail
P2-08TD1S
P2-08TD1S Thumbnail
P2-08TD2S
P2-08TD2S Thumbnail
P2-08TD1P
P2-08TD1P Thumbnail
P2-08TD2P
P2-08TD2P Thumbnail
P2-15TD1
P2-15TD1 Thumbnail
P2-15TD2
P2-15TD2 Thumbnail
P2-16TD1P
P2-16TD1P Thumbnail
P2-16TD2P
P2-16TD2P Thumbnail
P2-32TD1P
P2-32TD1P Thumbnail
P2-32TD2P
P2-32TD2P Thumbnail
P2-08NAS
P2-08NAS Thumbnail
P2-16NA
P2-16NA Thumbnail
P2-08TAS
P2-08TAS Thumbnail
P2-16TA
P2-16TA Thumbnail
P2-08TRS
P2-08TRS Thumbnail
P2-16TR
P2-16TR Thumbnail
P2-04AD
P2-04AD Thumbnail
P2-08AD-1
P2-08AD-1 Thumbnail
P2-08AD-2
P2-08AD-2 Thumbnail
P2-08ADL-1
P2-08ADL-1 Thumbnail
P2-08ADL-2
P2-08ADL-2 Thumbnail
P2-16AD-1
P2-16AD-1 Thumbnail
P2-16AD-2
P2-16AD-2 Thumbnail
P2-16ADL-1
P2-16ADL-1 Thumbnail
P2-16ADL-2
P2-16ADL-2 Thumbnail
P2-04DA
P2-04DA Thumbnail
P2-04DAL-1
P2-04DAL-1 Thumbnail
P2-04DAL-2
P2-04DAL-2 Thumbnail
P2-08DA-1
P2-08DA-1 Thumbnail
P2-08DA-2
P2-08DA-2 Thumbnail
P2-16DA-1
P2-16DA-1 Thumbnail
P2-16DA-2
P2-16DA-2 Thumbnail
P2-08DAL-1
P2-08DAL-1 Thumbnail
P2-08DAL-2
P2-08DAL-2 Thumbnail
P2-16DAL-1
P2-16DAL-1 Thumbnail
P2-16DAL-2
P2-16DAL-2 Thumbnail
P2-8AD4DA-1
P2-8AD4DA-1 Thumbnail
P2-8AD4DA-2
P2-8AD4DA-2 Thumbnail
P2-08THM
P2-08THM Thumbnail
P2-06RTD
P2-06RTD Thumbnail
P2-08NTC
P2-08NTC Thumbnail
P2-SCM
P2-SCM Thumbnail
P2-HSI
P2-HSI Thumbnail
P2-HSO
P2-HSO Thumbnail
P2-08SIM
P2-08SIM Thumbnail
P3-550E
P3-550E Thumbnail
P3-530
P3-530 Thumbnail
P3-RX
P3-RX Thumbnail
P3-EX
P3-EX Thumbnail
P3-03B
P3-03B Thumbnail
P3-05B
P3-05B Thumbnail
P3-08B
P3-08B Thumbnail
P3-11B
P3-11B Thumbnail
P3-01AC
P3-01AC Thumbnail
P3-01DC
P3-01DC Thumbnail
P3-08ND3S
P3-08ND3S Thumbnail
P3-16ND3
P3-16ND3 Thumbnail
P3-32ND3
P3-32ND3 Thumbnail
P3-64ND3
P3-64ND3 Thumbnail
P3-08TD1S
P3-08TD1S Thumbnail
P3-08TD2S
P3-08TD2S Thumbnail
P3-16TD1
P3-16TD1 Thumbnail
P3-16TD2
P3-16TD2 Thumbnail
P3-32TD1
P3-32TD1 Thumbnail
P3-32TD2
P3-32TD2 Thumbnail
P3-64TD1
P3-64TD1 Thumbnail
P3-64TD2
P3-64TD2 Thumbnail
P3-08NAS
P3-08NAS Thumbnail
P3-16NA
P3-16NA Thumbnail
P3-08TAS
P3-08TAS Thumbnail
P3-16TA
P3-16TA Thumbnail
P3-08TRS
P3-08TRS Thumbnail
P3-08TRS-1
P3-08TRS-1 Thumbnail
P3-16TR
P3-16TR Thumbnail
P3-04ADS
P3-04ADS Thumbnail
P3-08AD
P3-08AD Thumbnail
P3-16AD-1
P3-16AD-1 Thumbnail
P3-16AD-2
P3-16AD-2 Thumbnail
P3-08RTD
P3-08RTD Thumbnail
P3-08THM
P3-08THM Thumbnail
P3-04DA
P3-04DA Thumbnail
P3-08DA-1
P3-08DA-1 Thumbnail
P3-08DA-2
P3-08DA-2 Thumbnail
P3-16DA-1
P3-16DA-1 Thumbnail
P3-16DA-2
P3-16DA-2 Thumbnail
P3-8AD4DA-1
P3-8AD4DA-1 Thumbnail
P3-8AD4DA-2
P3-8AD4DA-2 Thumbnail
P3-SCM
P3-SCM Thumbnail
P3-HSI
P3-HSI Thumbnail
P3-HSO
P3-HSO Thumbnail
P3-16SIM
P3-16SIM Thumbnail


To learn more: https://www.automationdirect.com/productivity?utm_source=c1RLPEuBZ_c&utm_medium=VideoTeamDescription

(VID-P2-0023)

This video demonstrates how to use the PLS (Programmable Limit Switch) instruction to accurately monitor and control high speed processes independent of scan time.
**Software Version used in this video: Productivity Suite Programming Software Version 2.2.0(12)

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

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


Hide Transcript
View Transcript

The programmable limit switch instruction works just like a mechanical rotating cam with limit switches - except you can control the shape of the cams in real time. And since it runs on the High Speed Input module – or HSI Module – it’s completely independent of the processor load or scan time. So you always get accurate timing even with high speed inputs. Let’s do an example. For this video we just have an encoder wired into an HSI module like this with both phases and the Z pulse connected. I’ve already configured the HSI module with no scaling, these status tags, and we’re using the encoder’s Z-pulse to reset the count each rotation. Could we have chosen rotary mode where the module automatically rolls the count over for us? Sure, but then we would have to find another way to decide where the home position is. This Z-Pulse option does both for us. We have a 1X multiplier on the encoder input so we’ll get 1024 pulses per revolution. Let’s grab a PLS instruction, make sure we have the right HSI module and channel and create a structure. This row of this table represents ONE of the cams with these four guys being the contacts that open or close as the cam rotates. We refer to this row as a “switch.” We can create up to 16 switches per HSI input channel. We’ll use 4 of the switches in this demo. In our example, one revolution is 1024 counts of the encoder. So if we visualize a CAM that looks like this, it will close this contact when it rotates around to 100 and then release the contact at 300 encoder counts. So we setup this switch to mimic that CAM – it starts at 100 and releases at 300. If you disable this row – or switch – these outputs won’t do anything and these registers won’t be get updated. This disable feature is handy especially when you are testing. It allows you to isolate switches for debug or even build in switches for future features. We want to enable all of ours of course. There are 16 registers on the HSI module. You can use any of them here – in any order – and have them increment, decrement or zero when this switch goes active. These registers give you a way to track how many times a particular switch is being used. While this zeros the register when entering this switch, this zeros the register when enabling the instruction. Let’s clear all of our registers when this PLS instruction is first enabled. Finally, when the encoder is between these two values, what do we want the contacts to do? Let’s make output 1 active for this one. For switch 2, let’s have him go active between 200 to 512, increment register 2 and he will enable output 2. Switch 3 will be active from 700 to 800, will increment register 5, and activate output 4. And finally switch 4 will activate between 900 and 1024, won’t change any registers and will enable all 4 outputs. You can think of this turn on and turn off as your normally open or normally closed outputs. You can only use one type per column, of course. Once you have decided an output is normally open you can’t switch it to normally closed later – right? So graphically that would look like this. We have 1024 counts per rotation of our encoder. As we rotate the encoder, output 1 is active here, output 2 overlaps 1 for a 100 counts, output 3 is active here by himself, and all four outputs are active here. And remember, back in the configuration, we told the HSI to reset the count when the encoder Z pulse comes around, so this will all repeat as long as the instruction is enabled. Now there is one thing to be aware of – there are 16 of these registers and 16 possible steps – switches great right? Because you can have a dedicated register for each of the 16 possible ranges. Well … yes and no … There ARE 16 registers, but they are shared between the two channels on the HSI module. So both channels can increment the same register – which in some applications could be handy, but most of the time you will want to be sure you keep them separate. Maybe dedicate one set to one channel and another set to the other channel. The point is you have that flexibility but also that responsibility, so keep an eye on that. Also, these little blue arrows remind us that we can change these values while the code is running – of course we would have to have a tag here that we could change in our code. We’re using fixed values just to keep the demo simple. Finally, this option says once the instruction is enabled; wait for a trigger on one of these general purpose inputs or one of these encoder z pulse inputs before starting. That allows you to trigger this instruction from an external source which works great when you want to align timing to the encoder’s z-pulse. Let’s add an enable contact … and transfer to the processor…. Make sure we are in run mode and bring up the dataview. Let’s add the instruction enable, the switch status, the register counts and the HSI current position, which in our example is the encoder count. Let’s make the switch status is binary so it’s easier to see the individual switches toggle. Did you notice that we didn’t use the instruction’s register names in the dataview? We used the tag names assigned to those registers back here in the HSI configuration. Why? Because the instruction registers are local to the HSI module, so we don’t actually have access to those from our ladder code. Instead, those values get copied each scan to the tag names we define in the HSI configuration so we have access to them from the ladder code. Let’s enable the instruction, and I’ll reach over and rotate the encoder and sure enough as we pass into the first switch’s range output 1 turns on and increments the register. You can see switch 1 is active here in its status. Keep rotating and the second switch enables output 2 and since it overlaps with switch 1, output 1 is still active until we hit 300. Switch 3 is enabled between 700 and 800 and all outputs are active during switch 4’s range of values. Exactly what we expect. And this works in both directions: if we rotate into a region, and then rotate backwards into the previous switch’s region, the outputs react accordingly and the register gets incremented again. It literally works like the contacts being open and closed by a series of rotating cmas. And while we didn’t do it in this video, you should ALWAYS check to make sure a high speed module is ready before sending it commands. Remember – it runs independently of the main CPU so this is the only way you know if it’s ready to receive those commands. Just go to the hardware configuration, we’re using the HSI module in this demo, and setup the module ready tag here. There are a couple things to be aware of. There has to be at least a 1 count difference between the low and high limit. These two numbers can’t be the same. When the PLS instruction is disabled, the outputs hold their values. If you need to clear them then use the Write High Speed Outputs instruction. Be careful when using scaled units. I love being able to convert pulses into units I understand in the hardware configuration, BUT that could hide when the pulse counts between steps falls below 1 for example. So just be conscious of that. You can reset the HSI position register while the instruction is enabled by using this option in the configuration. When enabled, if you set this tag to a 1, then whatever value you put here will overwrite the current position register. Remember, you can’t run two HSI instructions on the same channel at the same time. So we can’t have PLS running AND do a Set Position. This reset position Tag gives you a way around that. If you need any help with the Programmable Limit Switch on the Productivity Series controllers, please contact AutomationDirect’s free award wining support team during regular business hours. They will be happy to help. And don’t forget the forums! There are lots of experienced automation professionals here 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 > Productivity Series PLCs Motion Control - PLS Instruction 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
„