Post on 29-Mar-2015
transcript
Micro Trend Automation Ltd.Programmable 4-Axis Controller
UTC® Series
Micro Trend Automation Ltd.Programmable 4-Axis Controller
UTC® Series
UTC400P 4-Axis Motion ControllerUTC400P 4-Axis Motion Controller
Pulse/Direction DAC
FLASH 512K*8
SRAM 128K*32
TMS320C32
16C552
232
232
ExpanPort
LCMPort
DIPSwitch
MIOPort
LED
EncoderInterface
Digit InPort
Digit OutPort
AnalogInput
Data Address
FPGA
JDI
JDO
JAI
CN1JACC
CN2JDSP
CN3JTHWJAO
Pulse/Voltage
Command
Line Receiver
AnalogPort
JHWENC
A,/A,B/B,Z,/Z
EncoderFeedback
Driver1..4Pulse/DirectionDAC
Com1
Com2
Block DiagramBlock DiagramBlock DiagramBlock Diagram
UTC400P-PACK LAYOUT
UTC400P is a multifunctional general-purpose programmable UTC400P is a multifunctional general-purpose programmable motion controllermotion controller; ; use the most advanced use the most advanced 32-32-bit floating-point bit floating-point
DSP and special FPGA as its kernel.DSP and special FPGA as its kernel.
UTC400P is a multifunctional general-purpose programmable UTC400P is a multifunctional general-purpose programmable motion controllermotion controller; ; use the most advanced use the most advanced 32-32-bit floating-point bit floating-point
DSP and special FPGA as its kernel.DSP and special FPGA as its kernel.
Application Field
Sealing Machine Lathe Machine Brush Maker Bar Feeder Fly Cutter/Fly Shear Printing Machine Gilding Machine PC Board Maker Packing Machine Rotary Table Drilling Machine Electronic Machine Spring Coiling Machine
Glue Dispensing Machine Milling Machine/Engraving Machine Laser Cutter Wood Cutting Machine Stamping Machine Grinding Machine Press Feeder Folding and Gluing Machine Steel Cutting Machine Winding Machine Foam Cutting Machine Injection Molding Machine
UTC400P Multi-TaskingUTC400P Multi-TaskingUTC400P Multi-TaskingUTC400P Multi-Tasking
Executes Motion Program UTC400P executes one move at a time, performing all calculations up to that move UTC400P is always working ahead to blend into the upcoming move UTC400P also has Spline Move capability
Executes PLC Program Continuously scan PLC’s as fast as processor time allows PLC’s are useful for any task that is asynchronous to the motion
UTC400P Multi-TaskingUTC400P Multi-Tasking ( (continuedcontinued))UTC400P Multi-TaskingUTC400P Multi-Tasking ( (continuedcontinued))
General Housekeeping Watch Dog Timer Hardware Overtravel Limits Software Overtravel Limits Amplifier Faults
Communicates with the host computer UTC400P can communicate with the host at any time, and response to any request by host. If the command is illegal, it will report an error to the host
UTC400P InterfaceUTC400P Interface
LCD Module Standard LCD Module (40x2 or 20x4) PLC Programmable Display
UT740 / UT725 Panel Parameters Setting Manual / Auto Mode Basic Function Keys
PLC Man-Machine Interface User Defined Operation Panel User Defined Function Key Integer , Floating-Point Mathematics Macro Definition
UT-747
UT-750
UT-735
UT-740
UT-725
UTC400P PC User InterfaceUTC400P PC User InterfaceUTC400P PC User InterfaceUTC400P PC User Interface
UTCSetup® Provides a windows-based operation environmentthat can easily connect to UTC400P.
In this program, the users can :
Issue any online commands to UTC400P Upload / Download motion programs and PLC
programs Monitor motors’ position, I/O, and system status Setup motors and system parameters Backup card configuration
UTC400P Classic System ConfigurationUTC400P Classic System Configuration
Hardware System Wiring
Safety Verification
ParameterM-Variable Definition
(SETUP.UTC)
Coordinate SystemDefinition
Program User Interface, MotionProgram, PLC Program
Program Coding and Debug
UTC400P CommandsUTC400P CommandsUTC400P CommandsUTC400P Commands1. Online Commands A. Global Commands B. Coordinate Commands (&n …) C. Motor Commands (#n…)
Modal Setting, Motor Jogging, Get Position, Set Variable Value, Buffer Control…etc.
2. Buffered Commands A. Motion Program Motor Move, Interpolation, Computation, Logic Control, Online Commands, Send Messages. B. PLC Program Computation, Logic Control, Online Commands, Send Messages.
UTC400P VariablesUTC400P VariablesUTC400P VariablesUTC400P Variables
Initialization and Setup I0~I99: Global System Setup Ix01~Ix49: Motor Parameter Setup Ix50~Ix70:Coordinate System Setup Ix80~Ix89: Encoder Setup
1. I-Variables
General-purpose use 32-bit floating point format Usable by all programs and coordinate systems
2. P-Variables (1024)
UTC400P Variables UTC400P Variables ((continuecontinue))UTC400P Variables UTC400P Variables ((continuecontinue))
General-purpose use 32-bit floating point format Coordinate system specific
3. Q-Variables (1024)
4. M-Variables (1024)
Pointers to registers, I/O, A/D, D/A…etc. Can specify start bit and width Ssigned integer, unsigned integer or floating point format
I0 Card NumberI1 Coordinate System Activation ControlI2 COM2 Baudrate ControlI3 COM2 Handshake ControlI4 Wait State ControlI5 Position/Velocity Response ControlI6 PLC Programs On/Off ControlI9 Maximum Digit for Floating Point ReturnedI10 Real Time Interrupt PeriodI18 Extension I/O Board EnableI19 Digital Inputs Debounce Cycle
System I-VariablesSystem I-Variables
Ix00 Motor x Activate Control Ix01 Motor x Jog / Home Acceleration TimeIx02 Motor x Jog / Home S-Curve TimeIx03 Motor x Jog SpeedIx05 Motor x Master Following EnableIx06 Motor x Master Scale FactorIx07 Motor x Homing Speed and DirectionIx08 Motor x Home Offset
Motor I-Variables Motor I-Variables ((x = motor number x = motor number (1~ 4) )(1~ 4) )
Ix09 – Motor x Flag ControlIx09 – Motor x Flag Control= 0 DAC or Pulse Command Not Converted = 1 DAC or Pulse Command Converted = 0 Jog Affected by Feedrate Override = 1 Jog Not Affected by Feedrate Override = 0 Keep Current Position on Power Up = 1 Reset Current Position on Power Up = 0 Servo Disable on Power Up = 1 Servo Enable on Power Up = 0 Driver Fault is High True (Normally Close) = 1 Driver Fault is Low True (Normally Open) = 0 Driver Fault Enable = 1 Driver Fault Disable = 0 Driver Enable is Low True = 1 Driver Enable is High True = 0 Servo Enable Deactivate(Can be used as DOUT)= 1 Servo Enable Activate= 0 Limit Switch is High True (use B-type switch) = 1 Limit Switch is Low True (use A-type switch) = 0 Hardware Limit Enable = 1 Hardware Limit Disable = 0 Reset Motor Position After Home Complete = 1 Keep Motor Position After Home Complete = 0 Home Move Allowed= 1 Home Move not Allowed
0 1Hex($)5 4 0
0 1 0 1 0 0 0 0 0 0
Ix10 Motor x Positive Software LimitIx11 Motor x Negative Software LimitIx12 Motor x Coordinate Position DisplacementIx13 Motor x Coordinate Position ScalingIx14 Motor x Coordinate Unit ScalingIx15 Motor x Backlash SizeIx16 Motor x Backlash Takeup RateIx17 Motor x Rollover RangeIx19 Motor x Velocity WeightingIx20 Motor x Proportional Gain (Kp)Ix21 Motor x Derivative Gain (Kd)Ix22 Motor x Velocity Feedforward Gain (Kvff)
Motor I-Variables Motor I-Variables ((continue)continue)
Ix23 Motor x Integral Gain (Ki)Ix24 Motor x Integration ModeIx25 Motor x Acceleration Feedforward GainIx26 Motor x Position Feedback AddressIx27 Motor x Velocity Feedback AddressIx28 Motor x Velocity Feedback ScaleIx29 Motor x DAC BiasIx30 Motor x DAC Limit Ix31 Motor x Fatal Following ErrorIx32 Motor x Dead Band SizeIx33 Motor x In Position BandIx34 Motor x Big Step SizeIx35 Motor x Integration Limit
Ix50 Blended Move Enable ControlIx51 Maximum Permitted AccelerationIx52 Default Program Acceleration TimeIx53 Default Program S-Curve TimeIx54 Default Program FeedrateIx55 Time Base Slew RateIx56 Rapid Move FeedrateIx57 Rapid Move Acceleration TimeIx58 Acceleration ModeIx59 Rotate AngleIx60 External Time Base ScaleIx61 External Time Base Source
C.S. I-Variables C.S. I-Variables ((x = c.s. number x = c.s. number (1~ 4) )(1~ 4) )
Ix80 Encoder x Decode ControlIx81 Encoder x Capture ControlIx82 Encoder x Capture Flag ControlIx83 <Reserved>Ix84 <Reserved>Ix85 Master x Source AddressIx86 Master x Moving Average Buffer Size
Encoder I-Variables Encoder I-Variables ((x = encoder ch. x = encoder ch. (1~ 4) )(1~ 4) )
Motor Jogging CommandsMotor Jogging CommandsMotor Jogging CommandsMotor Jogging Commands
J+ - Jog motor in positive directionJ- - Jog motor in negative directionJ/ - Stop jogging motor; enable driver if disabledJ= - Jog motor to variable specified positionJ={constant} - Jog motor to specified positionJ: - Jog motor variable specified distanceJ:{constant} - Jog motor specified distanceJ* - Jog motor to last programmed position
Jog speed is determined by Ix03, a change in this parameter will not effect until the next jog command issued.
MMotor Jogging Examplesotor Jogging ExamplesMMotor Jogging Examplesotor Jogging Examples
#1J+ - Motor 1 jog in positive direction#1J=1000 #2j+ - Motor 1 jog to count 1000 position
Motor 2 jog in positive directionI103=30 - Set jog speed of motor 1 to 30 counts / msecI201=50 - Set jog acceleration time of motor 2 to 50 msec
We cannot jog the motor defined in the coordinate system that is running a program. If we want to do this, we should issue a “S” command first to stop the motor at end of a block then jog the motor.
HM - Perform homing search move for motorHMZ - Declare current position to be home position
Examples :#1HM – Motor 1 perform a homing search#1HM #2HM #3HM – Three motors perform homing search
simultaneously.
We cannot perform a home searching of a motor defined in the coordinate system that is running a program.
HHome Searching Commandsome Searching Commands
UTC400P Home Searching I-VariablesUTC400P Home Searching I-VariablesUTC400P Home Searching I-VariablesUTC400P Home Searching I-Variables
Ix01 Acceleration Time (unit: msec)
Ix07 Home Speed / Direction(unit: counts / sec)
Ix08 Home Offset (unit: counts)
Ix09 Flag Control
Motion Profile of Home SearchingMotion Profile of Home SearchingMotion Profile of Home SearchingMotion Profile of Home Searching
Ix02
Ix01
Ix02
Ix01Ix02
Ix07
Home Complete=0Home SearchIn Progress=1
Position CapturedTriggerOccurs
Net distance fromtrigger position
Home Complete=1
Time
Vel
Ix02
Ix02
TriggerOccursAgain
Output Pulse by PulseAbout 2kpps
Offset
TriggerOccurs
FL False Offset
FL False
Ix01Ix01Ix01Ix01
Ix01
Ix07
Offset : Ix18Offset:− Ix18
Offset : +Ix18
Motion Profile of Home SearchingMotion Profile of Home SearchingMotion Profile of Home SearchingMotion Profile of Home Searching
P-VariablesP-VariablesP-VariablesP-Variables
They are used for :
1. CalculationsP100=P101*(sin(45))
2. Software triggersIF(M1!= 1 AND P10 = 0)
General-Purpose Use 32-bit Floating Point Format Global Variable (Independent with coordinate System)
P-Variables P-Variables (c(continueontinue))P-Variables P-Variables (c(continueontinue))
Suppose you wanted to move a motor along the position profile defined by SIN(q) + COS(q) . You could do one of the following:
Use hard-coded and pre-calculated points in a program
X1X1.0173X1.0343..X0.9824X1
P1=0WHILE (P1<361) P2=SIN(P1)+COS(P1) X(P2) P1=P1+1ENDWHILE
Use an equation to generate points on the fly
OR
Program CalculationsProgram CalculationsProgram CalculationsProgram CalculationsUTC400P’s DSP provides you the computational power to do a tremendous UTC400P’s DSP provides you the computational power to do a tremendous amount of calculations inside your motion programamount of calculations inside your motion program
OPEN PROG 1 CLEARWHILE(1=1) IF(P1>0)
P2=SIN(P1)+COS(P1)p3=2IF(P1>3) P2=SIN(P1)+COS(P1) P3=2
‧‧‧
IF(P1>99)P2=SIN(P1)+COS(P1)p3=99
ENDIFENDIF
ENDIF X2000 P1=P1+1ENDWHILECLOSE
Q-Variables Memory AllocationQ-Variables Memory AllocationQ-Variables Memory AllocationQ-Variables Memory Allocation
The physical memory accessed by typing Q(number) changes according to the currently addressed Coordinate System.
&1 Q0 accesses location $1400&2 Q0 accesses location $1600
&7 Q0 accesses location $1580&8 Q0 accesses location $1780
This kind of addressing simplifies memory managementon multiple coordinate system applications. If we have 4 coordinate systems and 4 programs that uses them, all programs can use the same number variables Q0 to Q255 without redundancy therefore without memory conflicts
Mem. Loc.
Coord. Sys. 1
Coord. Sys. 2
Coord. Sys. 3
Coord. Sys. 4
Coord. Sys. 5
Coord. Sys. 6
Coord. Sys. 7
Coord. Sys. 8
$1400 0 512 768 256 896 384 640 128 … … … … … … … … …
$147F 127 639 895 383 1023 511 767 255 $1480 128 640 896 384 0 512 768 256
… … … … … … … … … $14FF 255 767 1023 511 127 639 895 383 $1500 256 768 0 512 128 640 896 384
… … … … … … … … … $157F 383 895 127 639 255 767 1023 511 $1580 384 896 128 640 256 768 0 512
… … … … … … … … … $15FF 511 1023 255 767 383 895 127 639 $1600 512 0 256 768 384 896 128 640
… … … … … … … … … $167F 639 127 383 895 511 1023 255 767 $1680 640 128 384 896 512 0 256 768
… … … … … … … … … $16FF 767 255 511 1023 639 127 383 895 $1700 768 256 512 0 640 128 384 896
… … … … … … … … … $177F 895 383 639 127 767 255 511 1023 $1780 896 384 640 128 768 256 512 0
… … … … … … … … … $17FF 1023 511 767 255 895 383 639 127
Q-Variables Memory MapQ-Variables Memory Map
M-VariablesM-Variables Used to access UTC400P memory and I/O points Can define any start bit and width Format can be signed integer, unsigned integer and floating point
31 30 29 28 27 26 25 24 23 22 21 20
Address- Memory address, range 0000-FFFF Type- 0: Don’t point to any address 1: Point to data area, DP = 00 2: Point to I/O area, DP = FF Start Bit- Starting bit of the word to be used, range 0-31 Width- Number of bits of the word to be used, range 0-31 Sign- 1: Signed integer format 0: Unsigned integer format Bit 31- 0: The word to be used is integer 1: The word to be used is floating point
Address Type Start Bit Width Sign
M-Variable DefinitionM-Variable DefinitionM-Variable DefinitionM-Variable DefinitionMxx->* Don’t point to any address (can be used as signed integer)Mxx->addr[,start][,width][,s] Point to data area (integer)Mxx->L:addr Point to data area (32-bit floating point)Mxx->I:addr[,start][,width][,s]Point to I/O areaMxx-> Report current M-variable definition
Defining M-Variables:M0->536,S Point to Interrupt CounterM1->14,16,1 Point to Machine Output 1M19->I:FF41,16,8 Point to Machine Input 1-8M102->AA,S Point to #1 Command Velocity
Using M-VariablesM1 = 0 Turn on Machine Output 1M9 = 45 Turn on Machine Outputs 1,3,4,6 and turn off Machine Outputs 2,5,7,8 45 = 00101101 binary
UTC400P Coordinate SystemsUTC400P Coordinate Systems
Permitted Axis Names: X,Y,Z,U,V,W,A,B,C
Name of axis can be redundant
Scale must be any positive floating point value
Motor direction can be set by Ix04
We can not jog the motor defined in the coordinate system that is running a program. But we can still jog the motors defined in another coordinate system that is not running program in the same time.
Defining Coordinate Systems
Choose a motor and give it a axis name and scale
Unit of scale: counts / user unit
&1#1->800X#2->800Y#3->800Z
&2#4->20X
Suppose the encoder resolution of motor is 4000 counts per revolution, the pitch of ball screw is 5mm :
mmcount
revmm
revcount
8005
4000
&1#1->X&2#2->X
&1#1->X#2->X
This is permitted.The two motors will act asX-axes in independentcoordinate systems.
{
{
Multiple Axis DefinitionsMultiple Axis Definitions(&->Coordinate; #->Motor; X->Axis)(&->Coordinate; #->Motor; X->Axis)
This is permitted.The motors will act on identicalX-axis trajectories, as in agantry system.
&1#1->X#1->Y
&1#1->X&2#1->X
{
{
Multiple Axis Definition (continueMultiple Axis Definition (continue))
This is NOT permitted.A motor cannot perform two different motions at same time in a program.The first axis definition will be cancelled out by the second.
This is NOT permitted.A motor will receive conflictingcommands while running two program.The second coordinate definition will be rejected.
•UTC400P programs
Are executed one move at a time, performing all calculations up to that move
Run in coordinate systems
One program can simultaneously run in multiple coordinate systems
One program can run in any coordinate system
A coordinate system can only run one motion program at a time
Motion ProgramsMotion Programs
•Starting a program
Address to the desired coordinate system using the on-line command: &n
Point the coordinate system to the desired program using the on-line command: Bn
Use the on-line commands: R or ^R
•Stopping a program Point to the desired coordinate system
using the on-line command: &n Use the on-line commands: S, A, or ^S,^A,
<CTRL-K>
Motion Programs (continueMotion Programs (continue))
Move CommandsX1000 Y2000 Z3000U(P1*3.14159) V(20*SIN(Q6))DWELL, DELAY
Modal CommandsABS, INC, FRAX, NORMALLIN, RPD, CIR1, CIR2, SPLINETA, TS, TM, F
Variable Value Assignment{variable} = {expression}
UTC400P Motion Program CommandsUTC400P Motion Program Commands
Logic Control StatementsN, GOTO, GOSUB, CALL, RETG, M, T, (special CALL statements)IF, ELSE, ENDIF, WHILE, ENDWHILE
Miscellaneous StatementsCMD, SEND, DISPENAPLC, DISPLC
UTC400P Motion Program Commands UTC400P Motion Program Commands ((continuecontinue))
Logic Operators & (bit by bit AND)| (bit by bit OR)^ (bit by bit Exclusive OR)
Comparators= (equal to)!= (not equal to)< (less than)<= (less than or equal to)> (greater than)>= (greater than or equal to)
FunctionsSIN, COS, TAN, ASIN, ACOS, ATAN, ATAN2,SQRT, LN, EXP, FABS, INT, ROUND
UTC400P Logic OperatorsUTC400P Logic Operatorsused in Motion Programs and PLCsused in Motion Programs and PLCs
This example shows how to program a simple move on the program specifies how to do the move, then commands the move.
********************* Set-up and Definitions *********************
&1 ; Coordinate System 1CLOSE ; Make sure all buffers are closed#1->X ; Assign motor 1 to the X-axis - 1 program unit
; of X is 1 encoder count of motor #1
********************* Motion Program Text *************************
OPEN PROG 1 ; Open buffer for program entry, Program #1CLEAR ; Erase existing contents of bufferLINEAR ; Blended linear interpolation move modeABS ; Absolute mode - moves specified by positionTA500 ; Set 1/2 sec (500 msec) acceleration timeTS0 ; Set no S-curve acceleration timeF300000 ; Set feedrate (speed) of 300000 units(cts)/minuteX10000 ; Move X-axis to position 10000DWELL500; Stay in position for 1/2 sec (500 msec)X0 ; Move X-axis to position 0CLOSE ; Close buffer - end of program
To run this program:
&1 B1 R ; Coord. System 1, point to Beginning of Program 1, Run
Example 1: A Simple MoveExample 1: A Simple Move
Example 1: A Simple Move
-10000
-5000
0
5000
10000
0 1 2 3 4 5 6
Time (second)
Mtr
1 C
md
Vel
(ct
s/se
c)
Linear Mode TrajectoriesSmall Acceleration Time
V
timeTA TA
V
timeTA TA TA
TM orP/F TM orP/F
TM orP/F
Linear Mode Trajectories (continue)Small Acceleration Time
V
timeTATA TA
V
timeTA TA
TATA
TM orP/F TM orP/F
TM orP/FTM orP/FTM orP/F
Linear Mode Trajectories (continue)Acceleration Time matches Move Time
V
time
V
time
V
time
V
time
TA TA TA
TM orTM orP/F
TM orTM orP/F TM orTM orP/F
Linear Mode Trajectories (continue)Acceleration Time matches Move Time
V
time
V
time
TA
V
time
V
time
TA TA
TA TA
TA TA
TM orTM orP/FTM orTM orP/F
TM or TM orTM orP/F TM orP/F
V
time
V
time
TA TA TA
TA TA
TM orP/F
TM or P/FTM or P/F
Linear Mode Trajectories (continue)Large Acceleration Time
V
time
TA TA TA
TM or P/F TM or P/F
Linear Mode Trajectories (continue)Large Acceleration Time
Motion Acceleration I-Variables
Ix52 Program Acceleration Time (unit: msec)Ix53 Program S-Curve Time (unit: percent)
0 > TS>100Ts=TA*TS/2
Ts Ts Ts Ts T
V
Ta Ta
Motion Acceleration I-Variables (continue)
Ts Ts Ts Ts
2*Ts 2*TsNote that TA=2Ts
T
V TS= 100
Motion Acceleration I-Variables (continue)
TA TA
V
T
TS = 0
0
MAX.
TA
VE
LO
CIT
Y
TIME
2a
aAC
CE
LER
AT
ION
TIME
1.5a
0
Ts Ts
Ts Ts
UTC400P“S” Curve Acceleration
Example 2: A More Complex MoveExample 2: A More Complex MoveThis example introduces incremental and time-specification of moves, looping logic, using variables, scaling of axes, and simple arithmetic. Note that logical and mathematical operations do not delay moves.
;******************** Set-up and Definitions ********************
&1 ; Coordinate system 1CLOSE ; Make sure all buffers are closed#1->1000X ; 1 unit (cm) of X is 1000 counts of motor 1
;******************** Motion Program Text ***********************
OPEN PROG 2 ; Open buffer for entry, Program #2CLEAR ; Erase existing contents of bufferLIN ; Blended linear interpolation move modeINC ; Incremental mode - moves specified by distanceTA500 ; 1/2 sec (500 msec) acceleration timeTS100 ; 1/4 sec in each half of S-curveTM2000 ; 2 sec move time (to start of decel)P1=0 ; Initialize a loop counter variableWHILE (P1<10) ; Loop until condition is false (10 times) X10 ; Move X-axis 10 cm (=10,000 cts) positive DWELL500 ; Hold position for 1/2 sec X-10 ; Move X-axis back 10 cm negative DWELL500 ; Hold position for 1/2 sec P1=P1+1 ; Increment loop counterENDWHILE ; End of loopCLOSE ; Close buffer - end of program
To run this program:
&1 B2 R ; Coordinate System 2, point to Beginning of Program 2, Run
Example 2: A More Complex Move
Repeat 9More Times
-5000
0
5000
0 1 2 3 4 5 6Time (second)
Ve
loc
ity
(co
un
t/s
eco
nd
)
UTC400P Blended MoveUTC400P will blend moves together unless one of the following conditions is true:
The moves are separated by a The moves are separated by a DWELLDWELL statement statement 2 backward jumps in the program are encountered 2 backward jumps in the program are encountered
before the next move statement (before the next move statement (GOTOGOTO, , ENDWENDW)) The move blend enable is not set The move blend enable is not set (Ix50=0)(Ix50=0)
Blending allowed
Blending not allowed
YY
Vx Vx
Vy Vy
XX
t t
t tNon-Blended Blended
Difference Between Blended and non-Blended Move
DWELL Vs. DELAY
DWELL Always uses fixed time base Time does not include preceding
deceleration time Next move will not be calculated until after
end of DWELL
Move Time TM or D P/F
DWELLTime
Calculate Time
TA Move Time TM or D P/F
DELAY Uses variable time base (% value) Time includes preceding deceleration time Minimum time is current TA time Upcoming move calculated at beginning of
DELAY
DWELL Vs. DELAY (continue)
Move Time TM or D P/F
DELAYTime
Move Time TM or D P/F
Vector Feedrate Axes
INCFRAX (X,Y)X3 Y4 F10
84/0.5V
63/0.5V
0.55/10MoveTime
543Dist
y
x
22
INCFRAX (X,Y)X3 Y4 Z12 F10
Dist 3 4 5
Move Time 5 / 10 0.5
V 3 / 0.5 6
V 4 / 0.5 8
V 12 / 0.5 24
2 2
x
y
z
Vector Feedrate Axes (continue)
INCFRAX (X,Y,Z)X3 Y4 Z12 F10
Dist 3 4 12 13
Move Time 13 / 10 1.3
V 3 / 1.3 2.31
V 4 / 1.3 3.08
V 12 / 1.3 9.23
2 2 2
x
y
z
INCFRAX (X,Y)C10 F10
Dist 0
Move Time 0 / 10 0 (< TA)
Acceleration - limited move
+Z
+X +Y
+Z
+X +Y
+Z
+X +Y
+Z
+X +Y
+Z
+X +Y
+Z
+X +Y
NORMAL K-1
NORMAL I-1
NORMAL J-1
NORMAL K1
NORMAL J1
NORMAL I1
CW CW
CW
CW
CW
CW
G17
G18
G19
Vector Direction of Circular Interpolation
YY
(25,20)
JI
I
CENTER(15,20)
START
END(15,10)
XX
Y
Y
CIR2TM1000X15Y10I-10
XSTART (10,0)
END(0,10) CIR2
TM2000X0Y10R-10
CIR2TM2000X0Y10R10
XX
I
Y
J
CENTER(20,20)
START,END(30,10)
XX
Y
Y
NORMAL K-1ABS (X,Y)
CIR1F10X25Y30I20J5
START(10,5)
CENTER(30,10)
END(25,30)
UTC400P Circular Interpolation
Defaults
CIR1F25X30Y10I-10J10orI-10J10
Blended Between Linear and Circular
Line / Line
Line / Arc
Arc / Arc
Non-Tangent Tangent
Vprof (t)) Vprof (t)
) Vprof (t)) Vprof (t)Vx (t) = Vx (
= R (-sin Vy (t) = Vy (
= Rcos
Y
X
1
2
Vprof
t
V
Vy
Vx1
1
2
2
2
Profile of Circular Interpolation
Example of circular interpolation;Setup and definitions&1#1->10000x#2->10000y
;Motion Program Text
open prog4 clearrpd x1 y4f5lin y13cir1 x2 y14 i1 j0lin x3cir1 x4 y13 i0 j-1lin y7cir2 x7 y4 i3 j0lin x13cir1 x14 y3 i0 j-1lin y2cir1 x13 y1 i-1 j0lin x4cir1 x1 y4 i0 j4dwell100rpd x0 y0close
0
2
4
6
8
10
12
14
16
0 2 4 6 8 10 12 14 16
All program calculations and assignments between the movein progress and the move being calculated are performed one line at a time during the look-ahead.
This may be a problem with M-variables, particularly outputs,as the action will take place sooner than expected.
Example: LIN ;linear move modeX10 ;move X-axis to 10 X20 ;move X-axis to 20 M1=0 ;turn on output #1X50 ;move X-axis to 50
The output M1 will be turned on at the beginning of the X20move due to UTC400P’s precalculation of the program
UTC400P Precalculation
CalculateTime1 2
3 4 5
1
2 3 4
time
"R"Execute
Calculate
Timing of UTC400P Precalculation
GOSUB 300 jumps to:N 300 of same motion program,
CALL 500 jumps to:PROG 500, at the top (N0)
CALL 500.1 jumps to:PROG 500, label N10000
CALL 500.12 jumps to:PROG 500, label N12000
CALL 500.12345 jumps to:PROG 500, label N12345
On-line command B700 points to:PROG 700, (N0) ready to run
On-line command B700.34 points to:PROG 700, N34000, ready to run
UTC400P Subroutine CallUTC400P Subroutine Call
{PROG 1}CALL 500 D10E20
{PROG 500}READ (D,E)
sets Q104 to 10sets Q105 to 20
A argument reads into Q101B argument reads into Q102• • •Y argument reads into Q125Z argument reads into Q126
Parameter Passing and CheckingParameter Passing and Checking
Z
2525
25
2
2
Y
2424
24
2
2
F
5
32
20
E
1
4
16
10
D
1
3
8
8
C
000
2
4
4
B
0
1
2
2
A Letter
0 Q100
0 Bit #
1 Bit Value (Dec)
1 Bit Value (Hex)
PROG1CALL 500 D10 E20
PROG500READ (D,E)
• Q100 set to 0 at beginning of READ• Successful read of letter value sets corresponding bit of Q100 to 1
• Bit (n-1) of Q100 set to 1 if “nth” letter passed argument in last READ statement
IF(Q100 & 16>0)is true when “E” (5th letter) has been passed (1=25-1)
For RS-274 compatible motion programs
G 73 is equivalent to
Call 1000.73000
M 3 is equivalent to
Call 1001.03000
T 01 is equivalent to
Call 1002.01000
G,M,T Codes DefinitionG,M,T Codes Definition
Rotary BufferRotary Buffer
Used for DNC or MDIDEF ROT {size} Define specified size of rotary buffer, unit is word B0 Point the program counter to the head of rotary buffer.(the rotary buffer must be in closed status, otherwise it will be taken as move of axis B)OPEN ROT Open rotary bufferCLEAR Clear contents of current bufferR Execute motion programPR Report number of program lines remaining in rotary bufferCLOSE Close rotary buffer (won’t stop program)DEL ROT Delete rotary buffer
Function of Dip SwitchFunction of Dip Switch
SW1
NO. FUNCTION OFF ON 1 Power on re-initializing
(The same as $$$*** command) NO YES
2 00:115200 01: 9600 3
Com1 baud rate 10:19200 11: 38400
4 Com1 handshake YES NO 5 6 7 Power on load from FLASH NO YES 8
OFF ON12345678
UTC400P PLC ProgramUTC400P PLC ProgramUTC400P PLC ProgramUTC400P PLC Program
* Perform many tasks like hardware PLC’s* Cycle through calculations repeatedly and rapidly regardless of status of motion programs
PLCs are used for:monitoring inputssetting outputschanging variablesmonitoring card statuscommanding actionssending messages
UTC400P PLC TypesUTC400P PLC TypesUTC400P PLC TypesUTC400P PLC Types
Foreground PLC (PLC0)Operates on servo interruptRepetition rate is controlled by I10For time critical tasks - KEEP SHORT!!
Background PLC (PLC1-15)Operates between servo cyclesRepetition rate is a function of:
Servo FrequencyNumber and types of motorsCalculation requirements of motion programsLength and complexity of PLC programs
PLC Program ControlPLC Program ControlPLC Program ControlPLC Program Control
I6 = 0 No PLC’s can be enabled = 1 Foreground PLC’s can be enabled (PLC0)
Background PLC’s cannot be enabled = 2 Foreground PLC’s cannot be enabled
Background PLC’s can be enabled (PLC’s 1-15) = 3 All PLC’s can be enabled
All existing PLC’s permitted by I6 are enabled on power-up or reset
Online Command, Motion and PLC command ENAPLC n
DISPLC n
control programs individually or in groupsENAPLC4DISPLC1,2,3,4,5
<CONTROL-D> Disable all PLCs
OPEN PROG and OPEN PLC will disable PLCtemporarily
CLOSE will go back to previous PLC status
PLC Program Control PLC Program Control (continue)(continue)
UTC400P PLC CommandsUTC400P PLC CommandsUTC400P PLC CommandsUTC400P PLC Commands1. Conditional Statements (nestable)
IF({condition})WHILE({condition})AND({condition})OR({condition})
where {condition}={expression}{comparitor}{expression} [AND/OR{expression}{comparitor}
{expression}...]
2. Logical Control StatementsELSEENDIFENDWHILE
3. Action Statements{variable} = {expression}CMD “{on-line command}”SEND{C1/C2} “{message}”DISP “{message}”
PLC TimerPLC TimerSince DWELL and DELAY commands can only be used in motion programs, UTC400P timer registers can be used to issue time delays in a PLC program
M0->536,0,24,S ;Interrupt counter,increase 1 per;millisecond
M71->532,0,24,S ;Timer 1,decrease 1 per msecM72->537,0,24,S ;Timer 2,decrease 1 per msec
Example: If you wanted a 1 second delay in a PLC programopen plc 1 clear.m71=1000while(m71>0)endwhile.close
Note:Note: Statements in the same PLC after endwhile will stop scan temporarily.Statements in the same PLC after endwhile will stop scan temporarily.But it won’t effect the scanning of other PLCs..But it won’t effect the scanning of other PLCs..
PLC COUNTER DELAYPLC COUNTER DELAY
Start
Variable = Initial Value
WhileVariable < Limit
Variable=Variable +1Perform Desired actions
Perform Desired Actions
End
Read OtherPLC's
;********************* Set-up and Definitions*****************CLOSEM11->I:FF41,16,1 ; Machine Input 1;P11 ; Latching flag for M11;****************** PLC Program Text **********************OPEN PLC 1CLEARIF (M11=0) ; Motor 1 jog plus switch on
IF (P11!=0) ; But not on last time CMD"#1J+" ; Issue command P11=0` ; Set latching flagENDIF
ELSE ; Motor 1 jog plus switch offIF (P11!=1) ; But not off last time CMD"#1J/" ; Issue stop command P11=1 ; Set latching flagENDIF
ENDIFCLOSE
PLC ExamplePLC Example
; All These variables are defined in 400V210.UTC, download this file to use, ; M0->9E9,0,24,S; ; INTERRUPT COUNTER ; GENERAL PURPOSE INPUTS AND OUTPUTS M1->22,0,1; ; MACHINE OUTPUT 1 M2->22,1,1; ; MACHINE OUTPUT 2 M3->22,2,1; ; MACHINE OUTPUT 3 M4->22,3,1; ; MACHINE OUTPUT 4 M5->22,4,1; ; MACHINE OUTPUT 5 M6->22,5,1; ; MACHINE OUTPUT 6 M7->22,6,1; ; MACHINE OUTPUT 7 M8->22,7,1; ; MACHINE OUTPUT 8 M9->22,0,8; ; MACHINE OUTPUT 1-8 BYTE M11->I:2F,0,1; ; MACHINE INPUT 11 M12->I:2F,1,1; ; MACHINE INPUT 12 M13->I:2F,2,1; ; MACHINE INPUT 13 M14->I:2F,3,1; ; MACHINE INPUT 14 M15->I:2F,4,1; ; MACHINE INPUT 15 M16->I:2F,5,1; ; MACHINE INPUT 16 M17->I:2F,6,1; ; MACHINE INPUT 17 M18->I:2F,7,1; ; MACHINE INPUT 18 M19->I:2F,0,8; ; MACHINE INPUT 11~18
Suggested M-Variable DefinitionSuggested M-Variable Definition
M21->I:B0,0,1; ; MACHINE INPUT 21 M22->I:B0,1,1; ; MACHINE INPUT 22 M23->I:B0,2,1; ; MACHINE INPUT 23 M24->I:B0,3,1; ; MACHINE INPUT 24 M25->I:B0,4,1; ; MACHINE INPUT 25 M26->I:B0,5,1; ; MACHINE INPUT 26 M27->I:B0,6,1; ; MACHINE INPUT 27 M28->I:B0,7,1; ; MACHINE INPUT 28 M29->I:B0,0,8 ; ; MACHINE INPUT 21~28 ;----- MULTIPLEXER OUTPUT M40->22,8,1; ; MULTIPLEXER OUTPUT 40 M41->22,9,1; ; MULTIPLEXER OUTPUT 41 M42->22,10,1; ; MULTIPLEXER OUTPUT 42 M43->22,11,1; ; MULTIPLEXER OUTPUT 43 M44->22,12,1; ; MULTIPLEXER OUTPUT 44 M45->22,13,1; ; MULTIPLEXER OUTPUT 45 M46->22,14,1; ; MULTIPLEXER OUTPUT 46 M47->22,15,1; ; MULTIPLEXER OUTPUT 47 M48->22,8,8; ; MULTIPLEXER OUTPUT 40~47
;----- MULTIPLEXER INPUT M50->I:B0,8,1; ; MULTIPLEXER INPUT 50 M51->I:B0,9,1; ; MULTIPLEXER INPUT 51 M52->I:B0,10,1; ; MULTIPLEXER INPUT 52 M53->I:B0,11,1; ; MULTIPLEXER INPUT 53 M54->I:B0,12,1; ; MULTIPLEXER INPUT 54 M55->I:B0,13,1; ; MULTIPLEXER INPUT 55 M56->I:B0,14,1; ; MULTIPLEXER INPUT 56 M57->I:B0,15,1; ; MULTIPLEXER INPUT 57 M58->I:B0,8,8; ; MULTIPLEXER INPUT 50~57 M60->1C,8,1; ; RESERVED MACHINE OUTPUT1 (INPOS LED) M61->1C,9,1; ; RESERVED MACHINE OUTPUT2 (B.REQ LED) M62->1C,10,1; ; RESERVED MACHINE OUTPUT3 (FLT LED) M63->1C,11,1; ; RESERVED MACHINE OUTPUT4 (LIM LED) M64->1C,12,1; ; RESERVED MACHINE OUTPUT5 (F.E.1) M65->1C,13,1; ; RESERVED MACHINE OUTPUT6 (F.E.2) M66->1C,14,1; ; RESERVED MACHINE OUTPUT7 (F.E.3) M67->1C,15,1; ; RESERVED MACHINE OUTPUT8 (F.E.4)
M71->9EB,S; ; TIMER1 COUNT M72->9EC,S; ; TIMER2 COUNT M73->9ED,S; ; TIMER3 COUNT M74->9EE,S; ; TIMER4 COUNT M75->9EF,S; ; TIMER5 COUNT M76->9F0,S; ; TIMER6 COUNT M77->9F1,S; ; TIMER7 COUNT M78->9F2,S; ; TIMER8 COUNT M80->8BD,S; ; MASTER AVERAGE INPUT M81->1C,2,2; ; PWM FREQUENCY M82->32,0,16,S; ; DA1 M83->33,0,16,S; ; DA2 M84->860,S; ; HANDWHEEL DECODE CONTROL M85->850,S; ; HANDWHEEL VALUE
;REGISTERS ASSOCIATED WITH AXISx
Mx01 ; #x 16-BIT UPDOWN COUNTER (COUNTS)Mx02 ; #x SPEED CODE (UNIT: 16 COUNT/MSEC)Mx03 ; #x 16-BIT CAPTURE REGISTER (COUNTS)Mx04 ; #x CAPTURED INDEXMx05 ; ADCx 12-BIT ANALOG INPUT (BUFFERED)Mx14 ; #x SERVO ON/OFFMx16 ; #x ENCODER CAPTURED FLAGMx17 ; #x POSITION CAPTURED FLAG (MUST CLEARED AFTER READ)Mx20 ; HMFLx INPUT STATUSMx21 ; -LIMx INPUT STATUSMx22 ; +LIMx INPUT STATUSMx23 ; FAULTx INPUT STATUSMx24 ; HMFLx INPUT STATUSMx31 ; #x POSITIVE LIMIT SETMx32 ; #x NEGATIVE LIMIT SETMx33 ; #x ABORT FLAGMx39 ; #x DRIVER ENABLE BITMx40 ; #x IN-POSITION BITMx41 ; #x JOG IN PROGRESS
Mx42 ; #x HOME IN PROGRESSMx43 ; #x DRIVER FAULT SETMx44 ; #x FATAL FOLLOWING ERRORMx45 ; #x HOME COMPLETEMx47 ; #x INC MODEMx48 ; #x JOG SEGMENT (4 MEANS ACC/DECEL COMPLETE)Mx61 ; #x COMMAND POSITION (COUNTS)Mx62 ; #x ACTUAL POSITION (COUNTS)Mx63 ; #x JOG REGISTER POSITION (COUNTS)Mx64 ; #x POSITION BIAS (COUNTS)Mx65 ; #x COORDINATE TARGET POSITION (USER UNITS)Mx66 ; #x COORDINATE TARGET POSITION (COUNTS)Mx67 ; #x ACTUAL VELOCITY (UNIT: COUNTS/MSEC)Mx68 ; #x PRESENT MASTER VELOCITY (UNIT: COUNTS/MSEC)Mx69 ; #x COMMAND VELOCITY (UNIT: COUNTS/MSEC)Mx91 ; #x AXIS SCALEMx92 ; #x AXIS DEFINITIONMx93 ; #x DEFINED IN WHICH C.S.
;Registers associated with coordinate system x
Mx80 ; &x RUN REQUESTMx81 ; BUFFER OPENEDMx82 ; INS MODEMx83 ; &x PROGRAM HOLDMx84 ; &x PROGRAM NUMBERMx85 ; &x RAPID MODEMx86 ; &x LINEAR MODEMx87 ; &x CIR MODE (-1:CIR1 / 1:CIR2)Mx88 ; &x CALL STACK POINTERMx89 ; &x DWELL IN PROGRESSMx90 ; <RESERVED>Mx95 ; &x HOME IN PROGRESSMx97 ; &x COMMAND FEEDRATE OVERRIDEMx98 ; &x PRESENT FEEDRATE OVERRIDE;M599..631 ;Registers associated with #1 captured dataM649..671 ;Registers associated with #2 captured dataM699..731 ;Registers associated with #3 captured dataM749..771 ;Registers associated with #4 captured data
;DEFINITION OF FIRST MT0170;M900..931 ; IN1..32M932..947 ; OUT1..16;;DEFINITION OF SECONT MT0170;M950..981 ; IN1..32M982..997 ; OUT1..16;0C000FFF M-Var Definition Buffer (1024 words)L:100013FF P-Variables Buffer (1024 words)L:140017FF Q-Variables Buffer (1024 words)1800C3DF Motion and PLC Programs Buffer (44000 words)C3E0C45F Internal Used Buffer(128 words)C460C67F Interpreter Temporary Used Buffer(544 words)C680C6BF Open Buffer, Cleared to 0 on Power Up(64 words)C6C0C6FF Open Buffer (64 words)C700C77F PLC Online Command Buffer (128 words)C780C7FF Online Command Buffer (128 words)C800CBFF M-Variables Buffer (1024 words)