HARmonica Software Manual
Elmo Motion Control Inc
USA
HARSFEN0602ElmoHARmonicaSoftwareManual
HARSFEN0602ElmoHARmonicaSoftwareManual
Program execution
Preliminary
115
HARSFEN0602ElmoHARmonicaSoftwareManual
Language
100
HARSFEN0602ElmoHARmonicaSoftwareManual
Relevant documentation
About This Manual
Scope
Glossary
Harmonica
Position units
Related Software
Units
Can EDS
Current and torque
Speed and acceleration units
Internal Units and Conversions
Electrical angle
Power DC voltage
Speed
Peripherals
Digital inputs
A/D converter
Digital output
1 RS232 Basics
Communication With the Host
General RS232 Communications
Description
Background Transmission
Errors and exceptions in RS232
Echo
CANopen Communication
ElmoHARSFEN0602HARmonicaSoftwareManual Preliminarydraft
Interpreter Language
Numbers
Command line
Expressions And Operators
Mathematical And Logical Operators
Operator details
XOR
Multiplication
Addition
Subtraction
Division
Bitwise
Bitwise not
Bitwise or
Logical Equality
Logical
Logical Greater than or equal
Logical Less than
Logical or
Bitwise Left Shift and Right Shift operators
Logical not
Unary Minus
Mathematical functions
Simple Expressions
Expressions
Assignment Expressions
Time functions
User variables
Built-in Function Calls
Example ca1 =
User Function Calls
Comments
Harmonica User Programming Language
User Program Organization
Line and Expression Termination
Common
Line Continuation
Expressions And Operators Numbers
Limitations
General rules for operators
Expressions Simple Expressions
Syntax
System Commands
Built-in Function Calls
Program Flow Commands
#@LABELNAME
Labels Entry points
For iteration
XQ ##LOOP2
While iteration
Infiniteloop
Until iteration
While expression
Wait iteration
If condition
Switch selection
OFF
Functions Function definition
Break
Syntax break
Function is absent
Dummy variables
Count of output variables
STD
Automatic variables
Mean
Global variables
Jumps
##LABEL1
Functions and The Call Stack
##LABEL2
Return
##STARTNEW
Killing The Call Stack
Automatic subroutines List Of Automatic Routines
#@AUTOI1
Autostop
Autoexec
Autoer
Autobg
##LOOP
Automatic Routines Arbitration
Automatic Subroutine Mask
#@AUTOI3
#@TESTPARS
MI=MI8
Editing a Program
Compilation Error List
Program Development and Execution
Compilation
HARSFEN0602ElmoHARmonicaSoftwareManual
Asusid@elmo.co.il
Preliminarydraft
Preliminarydraft
Preliminarydraft
Preliminarydraft
Asusid@elmo.co.il
Downloading and Uploading a Program
#@AUTOEXEC
Binary data
Assisting Commands For Down/Upload LPN command
Examples
Downloading a Program DL command
CP command
CC command
Program downloading process
Uploading a Program LS command
Program execution
Halting and resuming a program
Initiating a Program
XQ##TASK1
Save to Flash
Automatic program running with power up
DB command
Clear user program from Flash
DB##MS
Machine status
Program status
DB##PSN
Single step
Setting and clearing break points
Continuation of the program
Run to Cursor
Step
Step Over
Step Out
Getting stack entries
Setting stack
Getting call stack
View of global variables
View of local variables
HARSFEN0602ElmoHARmonicaSoftwareManual
Virtual Machine registers
Virtual Machines
Call Stack During Function Call
Data types
Usrsubj
Op code structure and addressing modes
Short reference
Rsltor
REM
Rsltand
Not
Purpose
Alphabetic reference
Bitwise and Operator
Algorithm
CMP Compare
DIV Divide
Foritr for Loop Iteration
EOL End Of Line
Algorithm itr iterator
Freevac Free Virtual Machine
For Bitwise or Operator
Getcomm Get Command
JMP Jump
Jmpeol Jump
Jmplabel Jump to the label
JNZ Jump Not Zero
Jnzeol Jump Not Zero
Jzeol Jump If Zero
JZ Jump If Zero
Link
MLT Multiply
MOV Assignment Operator =
Not Bitwise not Operator
REM Reminder
Rslta Relational Operator
Rsltae Relational Operator =
Rsltbe Relational Operator =
Rsltand Logical and Operator
Rsltb Relational Operator
SP SP
Rslte Relational Operator ==
Rsltne Relational Operator !=
Setcomm Set Command
Rsltor Logical or Operator
SHR Shift Right
SHL Shift Left
Spadd
Syssubj Jump To System Subroutine
Unarynot Logical not Operator
Usrsubrt Return from user subroutine
Usrsubj jump To User Subroutine
OP2
XOR Bitwise XOR Operator
ILN
Recorder
BG,BT
RPN
Signal mapping
Signal Signal Name Command Length Description Type
Programming the length and the resolution
Defining the set of recorded signals
Example The commands RV1=5RV2=1RC=3
Trigger events and timing
Trigger delay
Slope and window trigger types
Preliminary
Definition
Launching the recorder
100
Uploading recorded data
101
Preliminary Draft
Byte Number Value Type
General
103
Commutation
Brush DC motors
Bldc commutation policy
104
Mechanical and electrical motion Figures are missing
Commutation sensors
Rotor Magnetic field sensors
106
Shaft Angle Sensors
107
Detecting commutation errors loss of feedback
Hall sensors parameterization
108
Encoder parameterization
Commutation search General
109
Selecting the parameters
Method limitation
110
Protections
111
Continuous Vs. Six-Steps commutation
112
Continuous commutation
113
Winding shapes
114
Loading the commutation table
115
Current controller
116
ID = I hθ + 90 + Ib hθ + 210 + Ic hθ +
117
Peak/Continuous current limit selection
Torque command filter
118
119
32768
120
PI current controller
121
Current amplifier protections
122
123
Torque control Unit mode
Unit Modes
11.2.1The software speed command
Speed mode Unit mode
124
Speed Profiling using JV, AC and DC
125
11.2.2The auxiliary speed command
126
Stop management
127
RLS,FLS
Stepper mode Unit mode
128
Dual feedback mode UM=4
129
Dual feedback mode UM=4
130
Single feedback mode UM=5
131
Position reference generator
12.1.1Switching Between Motion Modes
132
Software reference generator
133
12.1.3The Idle Mode and Motion Status
12.1.2Comparison of the PT and the PVT interpolated modes
134
12.1.4Point-To-Point PTP Basic Point-To-Point
135
Example
136
More Complicated PTP Motions
137
Example On-The-Fly Change of The Position Target
138
Jogging
139
Example On the fly mode switching
Example Simple jogging
140
141
Vt = 3at − t0 2 + 2bt − t0 + c
142
Ifference Counts Msec 500 1000 1500 2000 2500
143
144
QP… QV… QT…
145
Motion Management
PVT Decisions Flow Chart
146
PVT Motion Using can
Mode Termination
147
148
PVT Motion Programming Message
149
Underflow
Parameters of The PVT Motion Mode
Programming Sequence for The Auto Increment PVT Mode
150
151
152
153
PT Motion What Is PT
Interpolation Mathematics
PT Motion Programming The Basic Mode
154
Flow chart of the basic PT mode is depicted below
155
156
PT Motion Using can
PT Motion Programming Message
Programming Sequence for The Auto Increment PT Mode
157
Parameters of The PT Motion Mode
158
159
External Position Reference Generator
160
External position reference generator
161
Xt = 10000 ⋅ cos2πt + ct
162
Ecam
163
164
165
Dividing Ecam table into several logical portions
On the fly Ecam programming using can
166
Initializing the external reference parameters
167
Jump-Free Motor Starting Policy
168
Stop management 12.3.1General description
VHN,VLN
169
Stop Manager Internals
XM,YM
170
Right Limit Switch Marked as 3 in the Figure
Forward Limit Switch Marked as 4 in the Figure
Rate and Acceleration Marked as 5 in the Figure
171
Position output of the stop manager
Sensors, I/O, and Events
172
Modulo counting Modulo Counting
173
Digital Outputs
Manual inquiry
174
Events, and response methods
Periodical Inquiry
Automatic routines
Homing and Capture What Is Homing?
175
Real time Motion management, Homing, Capture, and Flag
Homing Programming
176
Homing the auxiliary encoder
13.5.5A homing with home switch and index example
On the fly position counter updates
177
Switches location
178
179
Example Double homing corrects backlash offsets
180
Capturing
Limits, Protections, Faults, and Diagnosis
181
Current limiting
182
VLN
183
Speed Protection
184
Position Protection
Enable switch
185
Connecting an external brake
Limit switches
186
Motion faults
When the motor fails to start
187
188
189
Diagnosis Monitoring motion faults
14.9.2Inconsistent setup data
Polling the amplifier status
190
Sensor faults Motor cannot move
14.9.3Device failures, and the CPU dump
Commutation is lost General
Commutation error is static i.e. Does not change in time
191
Reasons and effect of incorrect commutation
Commutation is drifting i.e Changes in time
Detection of Commutation Feedback Fault
192
Double sensor systems
Controller
193
KPN
194
Speed Control 15.2.1Block diagram
Not found
195
Parameters of the Speed Controller
Position Controller 15.3.1Block Diagram
196
197
Parameters of the Position Controller
Double lead block Block type=12
198
High Order Filter Block Types
Fist order block Block type=14
Second order block Block Type=15
199
Scheduled Double lead block Block type=22
User Interface
200
An Example
201
Gain-Scheduling Algorithm
202
Automatic Controller Gain-Scheduling
203
KP = SpeedKpTable k KI = SpeedKiTable k
Appendix a The Harmonica Flash Memory Organization
Table of Contents TOC
204
Main partitions
Contents of Text2
Contents of Text1
Contents of Text3
Contents of Text4-Text7
206
Contents of Text9
Contents of Text8
207
Autoena AUTOI1
208
Autostop Autobg Autorls
AUTOI5
209
TOC
210
Compilation Done Flag
211
Text Backup & Compiler data segment
Function Symbol Table
Virtual Machine Code Segment
212
Variable Symbol Table
Automatic Routines Table
Software Structure
213
Appendix B Harmonica Internals
17.1.1The Initialization block
214
Idle Loop
215
Idle loop
Converter Call
216
Converter
Algorithm
JP##LABEL
217
18.5 Examples
JS##LABEL Label
218