ACR BASICS
102
ACR
Programmer’s Guide
ACR Basics
The AcroBASIC programming language accommodates a wide range of needs by providing basic motion control
building blocks, as well as sophisticated motion and program flow constructs.
The language comprises simple ASCII mnemonic commands each on its own line or separated by a delimiter.
Let us start by taking a look at a basic program and what each line does:
PROGRAM
Starts program definition. First line of any program. Valid AcroBasic
commands appear in blue, but that is not shown here for formatting
reasons.
DRIVE ON X
Enable the X axis motor.
RES X
Reset the X position to 0.
ACC 10 DEC 10 STP 10 VEL 1
Sets acceleration/deceleration/stop/velocity.
X10
Go to 10 position on X. Units based on config wizard scaling.
X0
Return to starting position of 0 on X axis. Controller waits until X is at
10 before returning.
ENDP
End of program. Must always be last line of a program.
Note most commands are on their own lines but
ACC
,
DEC
,
STP
and
VEL
are all used by the motion calculator
simultaneously and thus can be on one line, saving vertical programming space.
The AcroBASIC programming language uses a parent child approach. A parent can have child statements. A child
statement is considered a sub-statement of the parent.
Parent Command
DRIVE ON X
Child Command
You can issue many parent statements alone
—
some provide the current status related to that particular
command, others perform an action. For example, issuing the
VEL
command online with the controller in the
terminal emulator at the Program 0 prompt provides the velocity setting. Conversely, issuing the
PROGRAM
command initiates defining a program.
Delimiter
Commands can be on their own line; a carriage return or line feed at the end of a line separates one command
from the next. Or, you can put multiple commands on the same line separated with a
“
space-colon-space
” (“ : ”)
.
This can be used to separate two commands on the same line to save vertical space.
DRIVE ON X : REM Enable the X axis motor.
X0 : PRINT "MOVING TO 0 POSITION"
Summary of Contents for ACR7000 Series
Page 1: ...Effective June 2021 Document Number 88 028698 01E Programmer s Guide ACR Series Controllers ...
Page 23: ...PARKER MOTION MANAGER ACR Programmer s Guide 23 CHAPTER 1 Parker Motion Manager ...
Page 69: ...PARKER MOTION MANAGER ACR Programmer s Guide 69 ...
Page 101: ...ACR BASICS ACR Programmer s Guide 101 CHAPTER 2 ACR Basics ...
Page 153: ...MAKING MOTION ACR Programmer s Guide 153 CHAPTER 3 Making Motion ...
Page 207: ...WRITING ACROBASIC PROGRAMS ACR Programmer s Guide 207 CHAPTER 4 Writing AcroBASIC Programs ...
Page 233: ...WRITING ACROBASIC PROGRAMS ACR Programmer s Guide 233 ...
Page 238: ...BINARY HOST INTERFACE 238 ACR Programmer s Guide CHAPTER 5 Binary Host Interface ...
Page 269: ...TROUBLESHOOTING ACR Programmer s Guide 269 CHAPTER 6 Troubleshooting ...
Page 288: ...APPENDIX B ETHERNET BASICS 288 ACR Programmer s Guide APPENDIX B Ethernet Basics ...
Page 293: ...APPENDIX C SERVO PID TUNING ACR Programmer s Guide 293 APPENDIX C Servo PID Tuning ...
Page 296: ...APPENDIX C SERVO PID TUNING 296 ACR Programmer s Guide ...