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