Go to Parker.com
  • Sign in
Technologies
  • Aerospace
  • Climate Control
  • Electromechanical Group
  • Filtration
  • Fluid and Gas Handling
  • Hydraulics
  • IoT
  • Pneumatics
  • Process Control
  • Sealing and Shielding
Other Groups
  • Parker Indego
Blogs Forums Knowledge Bases
Parker Community
Parker Community
  • Technologies
    • Aerospace
    • Climate Control
    • Electromechanical Group
    • Filtration
    • Fluid and Gas Handling
    • Hydraulics
    • IoT
    • Pneumatics
    • Process Control
    • Sealing and Shielding
    Other Groups
    • Parker Indego
    Blogs Forums Knowledge Bases
  • User
  • Site
  • Search
  • User
Home Technologies Electromechanical Group Electromechanical - Industrial Electromechanical Industrial Knowledge Base Programmable Limit Switch (PLS) feature in the ACR9xxx and IPA
Electromechanical - Industrial
  • Technologies
  • Electromechanical Group
  • Electromechanical - Industrial
  • More
  • Cancel
Electromechanical - Industrial
Electromechanical Industrial Knowledge Base Programmable Limit Switch (PLS) feature in the ACR9xxx and IPA
  • Electromechanical – Industrial Support Forum
  • Electromechanical Industrial Knowledge Base
  • Members
  • Sub Groups
  • More
  • Cancel
  • New
Electromechanical - Industrial requires membership for participation - click to join
  • Electromechanical Knowledge Base & Frequently Asked Questions
  • -Motion and Machine Controllers
    • -ACR Controllers
      • +7000
      • +9000 (Legacy)
      • +IEC PLC (9600) (Legacy)
      • +PC Card Controllers (Discontinued)
      • ACR Binary Parameter Access Examples
      • ACR Controllers: Excel Spreadsheet Example for ACR and IPA
      • ACR Memory usage and commands
      • AcroBasic Program Priority and Timing
      • AcroBasic program does not wait
      • Change axis positive/negative motion direction
      • Clear all memory in an ACR controller
      • Command Syntax for Variable Substitution
      • Commenting AcroBASIC Programs
      • Concerns when using DWL in programs
      • Concerns when using INH in programs
      • Creating Watchdogs for Ethernet Connections
      • Encoder Velocity
      • Error 17000 when attempting to communicate to ACR
      • Evaluation Underflow error
      • Evaluation overflow is line xxx
      • Free Online Training Videos: Parker AcroBasic - Programming Basics
      • Hardware Position Capture for Encoder 8 and 9
      • Homing Application note for ACR9xxx controllers
      • How can I check the axis PPU setting?
      • How do I set the frequency in an ACR SINE move?
      • How does motion work in the ACR products (ACR7xxx, ACR9xxx, IPA, Aries-CE)
      • How fast is my servo axis moving?
      • How to Calculate the Gear Offset Parameter?
      • How to Find Torque or Current commanded from ACR
      • How to Simulate Motion (without drives or motors)?
      • How to home to a limit in AcroBasic
      • How to receive ASCII data
      • How to retrieve the raw SSI position from encoder?
      • How to use CAM ON when source is moving
      • How to use the In Motion Bit
      • INT command not working properly
      • INTCAP
      • Is the ComACRsrvr thread safe?
      • LISTEN / LRUN - How to see line numbers
      • MFLOPS vs. MIPS
      • Output on Position Toggle Mode
      • PID Parameters when using Steppers
      • Position to a Torque / Current Mode
      • Programmable Limit Switch (PLS) feature in the ACR9xxx and IPA
      • prohibited names for Axis aliases
      • Range Error on download for IF ENDIF statements
      • Reboot in startup program
      • Stopping motion in ACR controllers
      • System Pointer Address of ACR Global Variables, P0-P4095
      • Use of AXIS format
      • User Variables
      • Using ACR9xxx or IPA with LabView
      • Using CAM with PPU in user units (not counts)
      • Using Encoder 8 or 9 as SRC
      • Using JOG commands with AXIS identifier
      • Using an encoder or analog input as JOG SRC
      • VB generates Runtime Error 91
      • Variable data types and transfer to AB plc via Ethernet/IP
      • What ACR Global variables should I use in HMI applications?
      • What is the Binary Host Interface
      • What is the axis velocity
      • How to Wire Limit Sensors to ACR9xxx and ACR7000 Controller
      • ACR7000 Controller and ACR9000 Xpress Jog Teach Sample
      • Axis Flag update rate
      • Range Error when commanding long moves - Distance limit 2^31
    • +PAC120
    • +PAC340
    • +PAC320 (Discontinued)
    • +6K (Discontinued)
  • +General Technology Information
  • +Virtual Engineer
  • +Visualization and Human Machine Interface (HMI)
  • +Servo Drives and Servo Drive/Controllers
  • +Stepper Drives and Stepper Drive/Controller
  • +Gearheads
  • +AC and DC Drives and Inverters
  • +Servo Motors
  • +Step Motors
  • +Linear and Rotary Positioners
  • +Electric Cylinders
  • +T-Slot Aluminum Framing
  • +C3 + Xpress + ETH
  • How can I stay updated on Parker electromechanical and drives product news?
  • +Legacy (Discontinued)
  • +Other
  • Memorandum: Information on EPA ban of Persistent bioaccumulative toxin (PBT)
  • What replaces the Gemini GV6K servo drive controller?

You are currently reviewing an older revision of this page.

  • History View current version

Programmable Limit Switch (PLS) feature in the ACR9xxx and IPA

The Programmable Limit Switch (PLS) feature in the ACR9xxx and IPA products is useful for assigning predefined output values relative to a selected source parameter.  For example, one common use is to generate digital output patterns based on incoming encoder positions.  Up to 8 different PLS objects can be defined and employed.
A local array of values is defined in your program and as the source parameter increments or decrements these array values are moved to the destination parameter.  Simply put, the source parameter is the array index. 
The basic PLS configuration settings are:
PLSx SRC nnnnnn             This command defines what the PLSx source parameter will be.  It controls when the destination parameter will be updated.  The source parameter effectively becomes the array index.
PLSx DST nnnnnn             This command defines what the PLSx destination will be.  The values defined in the local array will be written to this destination parameter as the source indexes through the array.
PLSx BASE nnnnn             This command points to the local array of “output values”.
PLSx MASK nnnn              This command allows you to mask bits in the destination parameter so that only select bits are affected by the “output values” if desired.  This is most useful if updating digital outputs so that only those outputs you want to be controlled by the PLSx are affected and others can be used elsewhere in your program.
PLSx ON                               This command enables PLSx.
PLSx OFF                              This command disables PLSx.
While the examples included below use a position register parameter for the SRC and digital output parameter for the DST the PLS is not restricted to these.  Any valid parameter can be used for the source or destination
Here is a simple example:
DIM LA(1)                            REM dimension 1 local array in the program
DIM LA0(11)                       REM dimension LA0 with 11 elements
LA0(0) = 1                            REM define the desired output values in each array element
LA0(1) = 0
LA0(2) = 0
LA0(3) = 8
LA0(4) = 0
LA0(5) = 0
LA0(6) = 0
LA0(7) = 0
LA0(8) = 0
LA0(9) = 7
LA0(10) = 0                               
PLS0 SRC P12297               REM define the PLS0 source as the AXIS0 jog offset parameter (P12297)
PLS0 DST P4097                 REM define the PLS0 destination as the onboard digital outputs (P4097)
PLS0 BASE LA0                   REM point to local array 0 (LA0) for the PLS0 output values
PLS0 MASK 15                    REM mask off the first 4 output bits so the other bits in P4097 are unaffected
PLS0 ON                               REM enable PLS0
This chart shows how the output bits will be updated based on the value in P12297.
AXIS0 JOG OFFSET POSITION
Output Bits 35, 34, 33, 32   (in P4097)
P12297 = 0
0001
P12297 = 1
0000
P12297 = 2
0000
P12297 = 3
1000
P12297 = 4
0000
P12297 = 5
0000
P12297 = 6
0000
P12297 = 7
0000
P12297 = 8
0000
P12297 = 9
0111
P12297 = 10
0000
P12297 = 11
0000 - Outside of array index boundary so a value of 0 is automatically applied.
Note that no other bits in P4097 will be affected due to the MASK value chosen.  Only those bits with a MASK value of 1 will be affected by the PLS updates.
This previous example is not be very useful unless AXIS0 is going to travel very, very short lengths.  For a second example, let us assume AXIS0 is going to travel through multiple revolutions and each revolution equals 4000 counts. 
One option would be to create an array 4000 elements in size.  If we want specific output patterns for every distinct count AXIS0 moves then that is what you would do, limited only by the amount of memory you have dimensioned for the program space. 
However, its more common that we want an output pattern to come on at a few specific points through the travel.  Some additional PLS commands provide ways to achieve this without having to create a very large array.
PLSx RATIO nnnnn           This command is a multiplier for the for the PLSx source.  The result is then used as the array index.  This defaults to a value of 1 and so you have the example above.  A value > 1 will increment/decrement through the array table more rapdily.  A value < 1 will increment/decrement through the array table more slowly.
PLSx FLZ  nnnnn                This command is an offset value that is added to the result of the PLSx SRC after the PLSx RATIO has been applied.  It allows you to jump to a specific point in the array table.
PLSx ROTARY nnnnn       This command allows the PLSx to wrap around the array and repeat the patterns rather than simply exceed the array boundary as shown in the basic sample above.  The PLSx ROTARY value defines the length you will go into the array table before it wraps around to the beginning.  This value defaults to 0 which means the wrap around is disabled.
PLSx RES nnnnn                This command only applies if the PLSx ROTARY feature is non-zero.  It allows you to reset or preset the location in the array you are at via the rotary feature.  This is most commonly used to re-start the rotary feature at the beginning of the index table.
This second example will have output patterns turn on every 90 degrees of travel of AXIS0 and assumes AXIS0 has 4000 counts per revolution and will be starting at zero.
DIM LA(1)                            REM dimension 1 local array in the program
DIM LA0(4)                         REM dimension LA0 with 4 elements
LA0(0) = 1                            REM define the desired output values in each array element
LA0(1) = 2
LA0(2) = 4
LA0(3) = 8
PLS0 SRC P12297               REM define the PLS0 source as the AXIS0 jog offset parameter (P12297)
PLS0 DST P4097                 REM define the PLS0 destination as the onboard digital outputs (P4097)
PLS0 BASE LA0                   REM point to local array 0 (LA0) for the PLS0 output values
PLS0 MASK 15                    REM mask off the first 4 output bits so the other bits in P4097 are unaffected
PLS0 RATIO 0.001             REM defines the multiplier as 1/1000
PLS0 ROTARY 4000           REM defines the roll over point as 4000

PLS0 ON                               REM enables PLS0
This chart shows how the output bits affected will be updated based on the value in P12297
AXIS0 JOG OFFSET POSITION
Array Index Math
Output Bits 35, 34, 33, 32   (in P4097)
P12297 = 0
0 * 0.001 = 0
0001
P12297 = 1000
1000 * 0.001 = 1
0010
P12297 = 2000
2000 * 0.001 = 2
0100
P12297 = 3000
3000 * 0.001 = 3
1000
P12297 = 4000
0 * 0.001 = 0
0001
P12297 = 5000
1000 * 0.001 = 1
0010
P12297 = 6000
2000 * 0.001 = 2
0100
P12297 = 7000
3000 * 0.001 = 3
1000
P12297 = 8000
0 * 0.001 = 0
0001
P12297 = 9000
1000 * 0.001 = 1
0010
P12297 = 10000
2000 * 0.001 = 2
0100
Continues
 
Continues
You can see that once P12297 reaches 4000 the rotary length has been reached and a modulo operation is done on it before the multiplier is applied and we have started back at the beginning of the array table.  This occurs again at P12297=8000 and will again at P12297 = 12000 if AXIS0 continues in that same direction.
This example clearly uses easy round numbers for the destination update points.  You may need to adjust the number of elements in your array so that the math works out as you require for the array index points relative to the source parameter.  The result of the SRC * RATIO + FLZ will always be evaluated as an integer when applied to the array table as an index, no rounding, simple truncation.
 
Follow Us
  • Follow Parker Hannifin on social media

Follow Parker Hannifin on social media:

Parker Hannifin Parker Hannifin

  • Products
  • About Parker
  • Investors
  • Community
  • Careers

Global Operations Global Operations

  • Divisions
  • Sales Companies
  • Worldwide Locations
  • Distribution Network
  • ParkerStore™ Network

Company Information Company Information

  • Newsroom
  • Event Calendar
  • Working with Parker
  • Product Brands
  • History

Global Support Center Global Support Center

  • Support
  • CAD
  • Where to Buy
  • Contact Parker
  • Manage Online Orders
© Parker Hannifin Corp 2022
  • Site Map
  • Safety
  • Privacy Policies
  • Terms and Conditions
  • Community Terms of Use
ENGINEERING YOUR SUCCESS.