KiraYamato
-
Posts
17 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Downloads
Posts posted by KiraYamato
-
-
-
Kira,
I'm sorry - in my earlier post I referred to Ixx24 bit7 & I should have said Ixx24 bit17
I think you should review the setting of I124 = $920001
$9 = 1001 bit23=1 amp fault polarity set as needed for your amp
_________bit20=1 amp fault function is turned off (are you sure you want to do this?)
$2 = 0010 bit17=1 ignore OT limits This is why you do not see the OT status change in PWin when you operate the switch
$0 = 0000 bit15=0 disable soft overtravel function
$0
$0
$1
Bit 15&17 set as they are disables all overtravel protection (soft & hard) which is often ok for a rotary axis. Although you are reading the switch operation with M121, it is not being used as an OverTravel by PMAC. Since the OT function is disabled, you could use these inputs as general purpose inputs.
Bit 20 disables the amplifier fault which is generally not a good idea. If you enable this function, you will need to verify bit 23 for correct polarity. If your amplifier does not have a fault output, then leave disabled.
I would consider I124 = $108001 The most significant hex digit will change to either $8 or $0 if you use the amplifier fault function.
With the soft overtravels enabled by bit15=1, you will need to set I113 & I114 to appropriate values. Generally these should be set to a value just before the hard OT switches are reached.
You can set these to zero to disable soft OT temporarily while setting up.
Since the LIM inputs are disabled I think the Home function is reading the input as always true (no overtravel fault) & homing to the marker. Your graph indicates this.
Review the I124 configuration and see if this helps.
thank you, mbalentine
but the user manual said that I should disable the OT limit so as to use it as a normal trigger for a trigger move——home search, for example.
Here are the codes I found, and the only difference is that I set I124 $920001 instead of $20000.
P.S.: You said that :the Home function is reading the input as always true (no overtravel fault) & homing to the marker. Your graph indicates this.
would you spare me a moment and explain more about that?
;*********** Motion Program Set-up Variables (to be saved) *************
CLOSE
I123=-10 ; Home speed 10 cts/msec negative
I124=$000000 ; PMAC-style flags, normal mode
I125=$78000 ; Use Servo IC 0 Channel 1 flags for Motor 1
I126=32000 ; Home offset of +2000 counts
; (enough to take you out of the limit)
I7102=3 ; Capture on rising flag and rising index
I7103=2 ; Use +LIM1 as flag (negative end switch)
;*********** Motion program to execute routine *********************
OPEN PROG 101 CLEAR
I124=$20000 ; Disable +/-LIM as limits
HOME1 ; Home #1 into limit and offset out of it
I124=$0 ; Re-enable +/-LIM as limits
CLOSE ; End of program
-
The diagram you are looking at from the manual does not explicitly show this, but you should also connect pins 3&4 of the header to the 0v side of the power supply. (If you are using a seperate supply, this is definately true. If you are powering the flags off the same supply as the Clipper then you may not need this connection. I would highly recommend a dedicated supply for the controller and seperate supply for any "field connected" hardware such as I/O)
I would also connect pin 2 to the +V of the supply; but it is only required if using the flags for channels 3 or 4. If not using flags for channel 3 or 4 you can leave it unconnected, but Do Not connect pin2 to 0v or ground.
Also be sure Ixx24 & Ixx25 are set correctly. In particular Ixx24 bit7 should be zero so that the OT inputs are recognized.
Sir:
Thank you for your attention.
I connected as the manual shows.
I set the M121:->X:$078000,17
And when I turned the switch, I saw that M121 chaged, but the flag monitor the state for PLIM hardward did not change
and my setting for the variable is almost the same as the example user manual gives:
;*********** Motion Program Set-up Variables (to be saved) *************
CLOSE
I123=-10 ; Home speed 10 cts/msec negative
I124=$920001 ; PMAC-style flags, normal mode
I125=$78000 ; Use Servo IC 0 Channel 1 flags for Motor 1
I126=32000 ; Home offset of +2000 counts
; (enough to take you out of the limit)
I7012=3 ; Capture on rising flag and rising index
I7013=2 ; Use +LIM1 as flag (negative end switch)
and I use the on-line command to make the axis 1 home,
but the axis showed that it complete home search while I did not turned the passive switch.....
here is the position-time curve I got during the "homing" process:
would you please give me some advice?
Thank you very much~
-
Hi, everyone~
I need to connect the limit and home signal to my Turbo PMAC2 Clipper now.
I read in the HRM that :
I use a 34 pin passive Flat Cable commutator for the JMACH2 prot.
So if I use the positive limit for axis 1,
I just connnect pin 1 to a +5V power and pin 7 to a switch linked to the ground of the +5V power?
But I can not see the text "soft or hardware limit" in the flag monitor change its color when I turned on and off the switch.
What should I do?
And what shall I do with pin 2(GND)? No connection?
Thank you for your attention~
-
That should not matter. Setting the TM time inside the loop as you had in your original example should work fine. Many people do this, especially if they need to change the time each loop. In your case, with a constant time, it would make a little more sense to put the TM command above the loop, saving a little calculation time, but it should not affect the trajectory at all?
Did you change anything else? What are your TA and TS times? (If not set in the program, they rely on the saved values of Isx87 and Isx88, respectively.)
Sir:
thank you for your attention, but I really made no change else, and this time, it works successfully. Maybe I should change it back and see the difference.
-
Hi KiraYamato,
The blending depends on acceleration time or TA setting in your program. I would suggest changing the TA in you motion program and observe the result.
PS: Why don't you use PMAC's built-in circular interpolation and segmentation?
The problem was solved, by moving the TM(P6) command
It seems that I can not set the motion time in dynamic......
-
The blending is controlled by the acceleration time parameters, which you have not specified in your provided code. When you use Linear mode for smooth contouring, the TA time should be set equal to the TM time, and the TS time should be set equal to 0. If the TM time is greater than the acceleration time, you will get "flats" in between blends in your contour.
I notice you are using PI explicitly in your angle calculations to convert radians to degrees. If you set I15 to 1, the trig functions will use radians directly.
Thank you ,sir
I will try it~
Hope I can get a good result~
-
Hi KiraYamato,
The blending depends on acceleration time or TA setting in your program. I would suggest changing the TA in you motion program and observe the result.
PS: Why don't you use PMAC's built-in circular interpolation and segmentation?
Dear Sina:
Thank you for your instruction. I just want to use the circular interpolation as a test fot the effect.
I have a spatial curve to be followed, and I can generate the position and velocity commands for each axis. Then I should decide what kind of move modes should I use to give the commands.
I tried the PVT command, but I got a peak in the velocity curve, which would enlarge the position error, so I want to see how about the LINEAR mode.
-
Hello, everyone
I am doing a circular interpolation under LINEAR mode
I divide the radius angle by N so I have a constant move segment time
then I compute each point on the circle and give them to the X and Y axis
I read in the user manual that: PMAC will blend between the segment
so if N is large enough the velocity of each axis will change smoothly
but I did not get the expected result
the shape of axis velocity looks like many peaks
can you tell me how should I set PMAC to make the move blend?
Here are my motion program:
***********************************
&1
CLOSE
UNDEFINE ALL
#1->X
#2->Y
;****** Motion Program Text *******
OPEN PROG 1 CLEAR
abs
P1=2000 ;radius
P2=1000 ;divide central angle by N
P3=3.1415926 ;Pi
P4=0.32*P3 ;angular speed
P5=1000*2*P3/P4 ;total move time
P6=P5/P2 ; time between the interpolation points
P11=0 ;loop counts
LINEAR
TM 100
X 0 Y 0
DWELL 500
While (P11 < P2+1)
P21=2*P3*P11/P2 ;central angle
P22=P1*(1-cos(P21*180/p3));
P23=P1*(sin(P21*180/p3));
P24=P4*P1*sin(P21*180/p3);
P25=P4*P1*cos(P21*180/p3);
TM(P6)
X (P22) Y (P23)
P11=P11+1
EndWhile
CLOSE
-
KiraYamato,
The forward and inverse kinematics can be downloaded as one file or separate files, as long as both routines are downloaded and stored in PMAC before executing a motion program. There can only be one inverse and one forward routine available for each coordinate system. In the example code that you have posted, there are 2 inverse routines, where the second one will replace the first one because of using CLEAR command when buffer was opened.
To learn more about motion programs, please read the chapter called "WRITING AND EXECUTING MOTION PROGRAMS" in Turbo PMAC Users Manual.
Sina:
Thank you for your edification.
I found an easy example about kinematic program, and it works.
And I followed your instruction and I can run the program given in the user manual.
Now I will try to modify the code so that it will our virtual equipment, and my friend is dealing with the downloading of the program.
Thanks again~
-
Hello, everyone
I am trying to use Turbo PMAC 2 Clipper to control the servo motors in a robot system,
I find the the example in Turbo PMAC USER MANUAL from page 261 to 266,
and I get the codes.
Now my question comes:
How to deal with these code?
Should I piece them together as a *.pmc file and download it directly?
Or should I down load it separately,just like the *.h file and *.cpp?
And where should I write my codes for motion program ?
I attach the codes in the end
Thank you for your attention~
;---------------------------------------------------[/size][/font]
; Setup for program
I15=0 ; Trig calculations in degrees
&1 ; Address CS 1
M145->Y:$0000C0,10,1 ; Motor 1 home complete bit
M245->Y:$000140,10,1 ; Motor 2 home complete bit
M5182->Y:$00203F,22,1 ; CS 1 run-time error bit
Q91=400 ; L1
Q92=300 ; L2
Q93=1000 ; Counts per degree for A and B
; Forward-kinematic program buffer for repeated execution
&1 OPEN FORWARD ; Forward kinematics for CS 1
CLEAR ; Erase existing contents
IF (M145=1 AND M245=1) ; Properly position referenced?
Q7=Q91*COS(P1/Q93)+Q92*COS((P1+P2)/Q93) ; X position
Q8=Q91*SIN(P1/Q93)+Q92*SIN((P1+P2)/Q93) ; Y position
ELSE ; Not valid; halt operation
M5182=1 ; Set run-time error bit
ENDIF
CLOSE
; M-variable definitions for actual position registers
M162->D:$8B ; Motor 1 actual position
M262->D:$10B ; Motor 2 actual position
; Forward-kinematic PLC program buffer for position reporting
OPEN PLC 10 ; Forward kinematics for CS 1
CLEAR ; Erase existing contents
P51=M162/(I108*32*Q93) ; Actual A position (deg)
P52=M262/(I208*32*Q93) ; Actual B position (deg)
Q27=Q91*COS(P51)+Q92*COS(P51+P52) ; Actual X position
Q28=Q91*SIN(P51)+Q92*SIN(P51+P52) ; Actual Y position
CLOSE
; Setup for program
&1
#1->I ; Motor 1 assigned to inverse kinematic axis in CS 1
#2->I ; Motor 2 assigned to inverse kinematic axis in CS 1
M5182->Y:$00203F,22,1 ; CS 1 run-time error bit
; Pre-compute additional system constants
Q94=Q91*Q91+Q92*Q92 ; L1^2 + L2^2
Q95=2*Q91*Q92 ; 2*L1*L2
Q96=Q91*Q91-Q92*Q92 ; L1^2 – L2^2
; Inverse-kinematic algorithm to be executed repeatedly
&1 OPEN INVERSE ; Inverse kinematics for CS 1
CLEAR ; Erase existing contents
Q20=Q7*Q7+Q8*Q8 ; X^2+Y^2
Q21=(Q20-Q94)/Q95 ; cos(B)
IF (ABS(Q21)<0.9998) ; Valid solution w/ 1 deg margin?
Q22=ACOS(Q21) ; B (deg)
Q0=Q7 ; X into cos argument for ATAN2
Q23=ATAN2(Q8) ; A+C = ATAN2(Y,X)
Q24=ACOS((Q20+Q96)/(2*Q91*SQRT(Q20))) ; C (deg)
Q25=Q23-Q24 ; A (deg)
P1=Q25*Q93 ; Motor 1 = 1000A
P2=Q22*Q93 ; Motor 2 = 1000B
ELSE ; Not valid, halt operation
M5182=1 ; Set run-time error bit
ENDIF
CLOSE
&1
OPEN INVERSE
CLEAR
{Position calculations from above}
IF (Q10=1) ; PVT mode?
Q26=SIN(Q25) ; sin(B)
IF (Q26>0.0175) ; Not near singularity?
Q27=Q91*Q92*Q26 ; L1*L2*sinB
Q28=COS(Q25+Q22) ; cos(A+B)
Q29=SIN(Q25+Q22) ; sin(A+B)
Q30=(Q92*Q28*Q17+Q92*Q29*Q18)/Q27 ; dA/dt
Q31=(-Q7*Q17-Q8*Q18)/Q27 ; dB/dt
P101=Q30*Q93 ; #1 speed in cts/(Isx90 msec)
P102=Q31*Q93 ; #2 speed in cts/(Isx90 msec)
ELSE ; Near singularity
M5182=1 ; Set run-time error bit
ENDIF
ENDIF
CLOSE
-
Thank you for your explanation. By the way,my Turbo PMAC works in PWM mode, it give the amplifier a analog voltage signal as a velocity command, so PMAC also look at counts only?
That is correct. If you use the motor in a coordinate system, then you can scale counts to real world units, but as far a PMAC is concerned, it only looks at counts.
-
So, you mean that PMAC never knows how much rpm 1 V means, and how many counts one rev generate?
No. That is the way it has always worked, and it works very well. Direct PWM is better, but analog still works well.
-
BUT, DO N'T YOU THINK THAT IT WILL RESULT A LONG DYNAMIC PROCESS AND A BAD RESULT FOR A TRAJACTORY FOLLOWING?
Hello, everyone, here I come again~
I am using Turbo Pmac2 Clipper to control Fuji Servo systems,
and I set it to work in the analog mode.
So the PMAC gives out an analog voltage command which present a rotation velocity
but you see that the command in a motion program has the unit of counts/msec,
So how can PMAC know that what a speed 1V means?
Or How can PMAC know that what a voltage should output when receive a speed command in the unit of cts per second?
thank you for your attention~
PMAC doesn't know and doesn't care about the relationship of volts to speed(or torque). It will adjust the analog signal to match the commanded position. All scaling of what the analog signal means is done in the drive. PMAC is blind to the scaling, and whether the drive is in torque or velocity mode.
-
On the page 204 of Turbo SRM, it says that:
• I7mn6 = 0: Outputs A and B are PWM; Output C is PWM
• I7mn6 = 1: Outputs A and B are DAC; Output C is PWM
• I7mn6 = 2: Outputs A and B are PWM; Output C is PFM
• I7mn6 = 3: Outputs A and B are DAC; Output C is PFM
and according to the page 21 of Turbo PMAC HRM:
On Pmac1, there is only one output and one output mode: DAC output.
On PMAC2 boards, each channel has 3 outputs, and there are 4 output modes.
We know that on the JMACH1,there are DAC1 and DAC1/ pins for channel 1, and there are PUL_1 and DIR_1 on JMACH2 for channel 1.
My question is : what do you mean by Outputs A 、B and C?
Does A = DAC and B = DAC/ and C=PUL+DIR ?
Thank you for your attention
-
Hello, everyone, here I come again~
I am using Turbo Pmac2 Clipper to control Fuji Servo systems,
and I set it to work in the analog mode.
So the PMAC gives out an analog voltage command which present a rotation velocity
but you see that the command in a motion program has the unit of counts/msec,
So how can PMAC know that what a speed 1V means?
Or How can PMAC know that what a voltage should output when receive a speed command in the unit of cts per second?
thank you for your attention~
command vel oscillate during pid tuning
in Turbo PMAC
Posted
hi, everyone
i meet some problems when i use turbo pmac 2
to tune the pid parameter of an axes
the motor i used pull via a screw
I set kd=0 and a proper kp and ki
and it seems that a step folloing is acceptable
but the command velocity oscillated during a sine wave following
the period of the oscillation and following error appears to coincide
but i do not think that is a reasonable answer
can any one spare me a help?
3q