HARmonica Software Manual
USA
Elmo Motion Control Inc
HARSFEN0602ElmoHARmonicaSoftwareManual
HARSFEN0602ElmoHARmonicaSoftwareManual
Program execution
Preliminary
115
HARSFEN0602ElmoHARmonicaSoftwareManual
Language
100
HARSFEN0602ElmoHARmonicaSoftwareManual
Glossary
About This Manual
Scope
Relevant documentation
Harmonica
Can EDS
Related Software
Units
Position units
Internal Units and Conversions
Speed and acceleration units
Current and torque
Peripherals
Power DC voltage
Speed
Electrical angle
Digital output
A/D converter
Digital inputs
Description
Communication With the Host
General RS232 Communications
1 RS232 Basics
CANopen Communication
Errors and exceptions in RS232
Echo
Background Transmission
Interpreter Language
ElmoHARSFEN0602HARmonicaSoftwareManual Preliminarydraft
Mathematical And Logical Operators
Command line
Expressions And Operators
Numbers
XOR
Operator details
Division
Addition
Subtraction
Multiplication
Logical Equality
Bitwise not
Bitwise or
Bitwise
Logical or
Logical Greater than or equal
Logical Less than
Logical
Mathematical functions
Logical not
Unary Minus
Bitwise Left Shift and Right Shift operators
Assignment Expressions
Expressions
Simple Expressions
Example ca1 =
User variables
Built-in Function Calls
Time functions
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
XQ ##LOOP2
Labels Entry points
For iteration
#@LABELNAME
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
#@AUTOI1
Killing The Call Stack
Automatic subroutines List Of Automatic Routines
##STARTNEW
Autobg
Autoexec
Autoer
Autostop
#@AUTOI3
Automatic Routines Arbitration
Automatic Subroutine Mask
##LOOP
MI=MI8
#@TESTPARS
Compilation
Compilation Error List
Program Development and Execution
Editing a Program
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
Program downloading process
CP command
CC command
Downloading a Program DL command
Program execution
Uploading a Program LS command
XQ##TASK1
Initiating a Program
Halting and resuming a program
Clear user program from Flash
Automatic program running with power up
DB command
Save to Flash
DB##PSN
Machine status
Program status
DB##MS
Run to Cursor
Setting and clearing break points
Continuation of the program
Single step
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
Not
REM
Rsltand
Rsltor
Algorithm
Alphabetic reference
Bitwise and Operator
Purpose
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
SP SP
Rsltand Logical and Operator
Rsltb Relational Operator
Rsltbe Relational Operator =
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
RPN
Recorder
BG,BT
ILN
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
Brush DC motors
103
Commutation
General
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
Software reference generator
12.1.1Switching Between Motion Modes
132
Position 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
XM,YM
169
Stop Manager Internals
VHN,VLN
Rate and Acceleration Marked as 5 in the Figure
Right Limit Switch Marked as 3 in the Figure
Forward Limit Switch Marked as 4 in the Figure
170
Position output of the stop manager
171
Modulo counting Modulo Counting
172
Sensors, I/O, and Events
Digital Outputs
173
Periodical Inquiry
174
Events, and response methods
Manual inquiry
Real time Motion management, Homing, Capture, and Flag
Homing and Capture What Is Homing?
175
Automatic routines
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
Polling the amplifier status
Diagnosis Monitoring motion faults
14.9.2Inconsistent setup data
189
14.9.3Device failures, and the CPU dump
Sensor faults Motor cannot move
190
Reasons and effect of incorrect commutation
Commutation error is static i.e. Does not change in time
191
Commutation is lost General
Double sensor systems
Detection of Commutation Feedback Fault
192
Commutation is drifting i.e Changes in time
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
Fist order block Block type=14
198
High Order Filter Block Types
Double lead block Block type=12
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
Main partitions
Table of Contents TOC
204
Appendix a The Harmonica Flash Memory Organization
Contents of Text3
Contents of Text1
Contents of Text2
206
Contents of Text4-Text7
207
Contents of Text8
Contents of Text9
AUTOI5
208
Autostop Autobg Autorls
Autoena AUTOI1
209
Compilation Done Flag
210
TOC
Virtual Machine Code Segment
Text Backup & Compiler data segment
Function Symbol Table
211
Automatic Routines Table
Variable Symbol Table
212
17.1.1The Initialization block
213
Appendix B Harmonica Internals
Software Structure
Idle Loop
214
Idle loop
215
Algorithm
216
Converter
Converter Call
JS##LABEL Label
217
18.5 Examples
JP##LABEL
218