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