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