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
Internal Units and Conversions
Speed and acceleration units
Current and torque
Electrical angle
Power DC voltage
Speed
Peripherals
Digital output
A/D converter
Digital inputs
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
Assignment Expressions
Expressions
Simple Expressions
Time functions
User variables
Built-in Function Calls
Example ca1 =
User Function Calls
Comments
Harmonica User Programming Language
User Program Organization
Line Continuation
Common
Line and Expression Termination
General rules for operators
Limitations
Expressions And Operators Numbers
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
Syntax break
Break
Functions Function definition
Function is absent
Dummy variables
Count of output variables
Mean
Automatic variables
STD
Global variables
Jumps
##LABEL2
Functions and The Call Stack
##LABEL1
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
Examples
Assisting Commands For Down/Upload LPN command
Binary data
Downloading a Program DL command
CP command
CC command
Program downloading process
Uploading a Program LS command
Program execution
XQ##TASK1
Initiating a Program
Halting and resuming a program
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 Out
Step Over
Step
Getting call stack
Setting stack
Getting stack entries
View of global variables
View of local variables
HARSFEN0602ElmoHARmonicaSoftwareManual
Call Stack During Function Call
Virtual Machines
Virtual Machine registers
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
Algorithm itr iterator
EOL End Of Line
Foritr for Loop Iteration
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
Link
JZ Jump If Zero
Jzeol Jump If Zero
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
OP2
Usrsubj jump To User Subroutine
Usrsubrt Return from user subroutine
XOR Bitwise XOR Operator
ILN
Recorder
BG,BT
RPN
Signal mapping
Signal Signal Name Command Length Description Type
Example The commands RV1=5RV2=1RC=3
Defining the set of recorded signals
Programming the length and the resolution
Trigger events and timing
Trigger delay
Slope and window trigger types
Preliminary
Definition
Uploading recorded data
100
Launching the recorder
101
Preliminary Draft
Byte Number Value Type
General
103
Commutation
Brush DC motors
Mechanical and electrical motion Figures are missing
104
Bldc commutation policy
Commutation sensors
Rotor Magnetic field sensors
106
Shaft Angle Sensors
Hall sensors parameterization
Detecting commutation errors loss of feedback
107
108
Encoder parameterization
Selecting the parameters
109
Commutation search General
Protections
110
Method limitation
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
Unit Modes
Torque control Unit mode
123
124
Speed mode Unit mode
11.2.1The software speed command
Speed Profiling using JV, AC and DC
125
11.2.2The auxiliary speed command
126
RLS,FLS
127
Stop management
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
12.1.2Comparison of the PT and the PVT interpolated modes
12.1.3The Idle Mode and Motion Status
133
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
Example Simple jogging
Example On the fly mode switching
139
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
147
Mode Termination
PVT Motion Using can
148
PVT Motion Programming Message
149
Underflow
150
Programming Sequence for The Auto Increment PVT Mode
Parameters of The PVT Motion Mode
151
152
Interpolation Mathematics
PT Motion What Is PT
153
PT Motion Programming The Basic Mode
154
Flow chart of the basic PT mode is depicted below
155
PT Motion Programming Message
PT Motion Using can
156
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
Jump-Free Motor Starting Policy
167
Initializing the external reference parameters
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
Modulo counting Modulo Counting
172
Sensors, I/O, and Events
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 the auxiliary encoder
176
Homing Programming
177
On the fly position counter updates
13.5.5A homing with home switch and index example
Switches location
178
179
Example Double homing corrects backlash offsets
180
Capturing
Limits, Protections, Faults, and Diagnosis
181
VLN
182
Current limiting
183
Speed Protection
184
Position Protection
Enable switch
185
186
Limit switches
Connecting an external brake
187
When the motor fails to start
Motion faults
188
189
Diagnosis Monitoring motion faults
14.9.2Inconsistent setup data
Polling the amplifier status
14.9.3Device failures, and the CPU dump
Sensor faults Motor cannot move
190
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
KPN
193
Controller
Not found
Speed Control 15.2.1Block diagram
194
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
Scheduled Double lead block Block type=22
199
Second order block Block Type=15
An Example
200
User Interface
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 Text3
Contents of Text1
Contents of Text2
Contents of Text4-Text7
206
207
Contents of Text8
Contents of Text9
Autoena AUTOI1
208
Autostop Autobg Autorls
AUTOI5
209
Compilation Done Flag
210
TOC
211
Text Backup & Compiler data segment
Function Symbol Table
Virtual Machine Code Segment
Automatic Routines Table
Variable Symbol Table
212
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