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 How to home to a limit in AcroBasic
Electromechanical - Industrial
  • Technologies
  • Electromechanical Group
  • Electromechanical - Industrial
  • More
  • Cancel
Electromechanical - Industrial
Electromechanical Industrial Knowledge Base How to home to a limit in AcroBasic
  • 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

How to home to a limit in AcroBasic

Products: ACR9000, 9030,9040,9600,9630,9640, Aries-CE

The normal homing operation (JOG HOME) in the ACR controllers assumes the axis has two End of Travel (EOT) limits and one home sensor. For axes with only end of travel limits sensors, the following code can be used. Note that the Local Variable LV0 is used for axis number.

 

Bits used in this code
Jog Active BIT792
Positive EOT Limit Current State  BIT 16128
Negative EOT Limit Current State BIT16129
Positive EOT Limit Encountered BIT 16132
Negative EOT Limit Encountered BIT 16133
(Add 32 x the axis number to find the correct bits beyond axis0)

 

DIM LV1
_HomeNegativeEOT
LV0=0  : REM ASSIGN AXIS NUMBER HERE
AXIS(LV0) JOG VEL 1
AXIS(LV0) JOG ACC 10
AXIS(LV0) JOG DEC 10
AXIS(LV0) HLDEC 100
AXIS(LV0) JOG REV : REM MOVE TOWARD NEG EOT
WHILE (BIT (792+32*LV0))
    REM WAIT HERE WHILE JOG IS ACTIVE
WEND
IF (BIT(16133+32*LV0))
     REM encountered negative EOT
ELSE
    GOTO HOMEFAILED
ENDIF
CLR BIT(8467+32*LV0)
AXIS(LV0) JOG VEL 0.1
AXIS(LV0) JOG FWD
WHILE (BIT(16129+32*LV0))
WEND
AXIS(LV0) JOG OFF
INH -(792+32*LV0)
AXIS(LV0) RES  : rem reset all counter to zero
RETURN


_HomePositiveEOT
LV0=0  : REM ASSIGN AXIS NUMBER HERE
AXIS(LV0) JOG VEL 1
AXIS(LV0) JOG ACC 10
AXIS(LV0) JOG DEC 10
AXIS(LV0) HLDEC 100
AXIS(LV0) JOG FWD : REM MOVE TOWARD POS EOT
WHILE (BIT (792+32*LV0))
REM WAIT HERE WHILE JOG IS ACTIVE
WEND
IF (BIT(16132+32*LV0))
    REM encountered negative EOT
ELSE
    GOTO HOMEFAILED
ENDIF
CLR BIT(8467+32*LV0)
AXIS(LV0) JOG VEL 0.1
AXIS(LV0) JOG rev
WHILE (BIT(16128+32*LV0))
WEND
AXIS(LV0) JOG OFF
INH -(792+32*LV0)
AXIS(LV0) RES  : rem reset all counter to zero
RETURN


_HOMEFAILED
rem home operation did not reach switch, place code here to recover
REM GOSUB
END

 

 

 

jw May 2013

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.