Jump to content
OMRON Forums

how to run motion program


twathit
 Share

Recommended Posts

I’m using 24E2S to output PFM signal to control stepper motor,I don't need encoder, so I connected the controller to driver then the step motor.I attach my setup below. Now I can only make the motor run use open loop mode. But the question is I want to run some motion program,so it should be run under close loop mode,I tried #n J+, #n J/,#n J=100,I monitor motor[x].status[0],It change from $30004000 to $30007800,but there are no PFM signal output(I monitor it from oscilloscope).Do I need more setup?I have been stuck in this for quite a long time, hopefully I can get some answer.

 

 

 

 

Motor[1].ServoCtrl=1

Motor[2].ServoCtrl=1

Motor[3].ServoCtrl=1

Motor[4].ServoCtrl=1

 

Motor[1].pAmpEnable=0

Motor[2].pAmpEnable=0

Motor[3].pAmpEnable=0

Motor[4].pAmpEnable=0

 

Motor[1].pAmpFault=0

Motor[2].pAmpFault=0

Motor[3].pAmpFault=0

Motor[4].pAmpFault=0

 

Motor[1].Servo.Kvfb=0

Motor[2].Servo.Kvfb=0

Motor[3].Servo.Kvfb=0

Motor[4].Servo.Kvfb=0

 

Motor[1].Servo.Kp=40

Motor[2].Servo.Kp=40

Motor[3].Servo.Kp=40

Motor[4].Servo.Kp=40

 

Motor[1].Servo.Kvff=40

Motor[2].Servo.Kvff=40

Motor[3].Servo.Kvff=40

Motor[4].Servo.Kvff=40

 

Motor[1].Servo.Ki=0.001

Motor[2].Servo.Ki=0.001

Motor[3].Servo.Ki=0.001

Motor[4].Servo.Ki=0.001

 

Motor[0].PhaseCtrl=0 // No phase commutation active

Motor[2].PhaseCtrl=0 // No phase commutation active

Motor[3].PhaseCtrl=0 // No phase commutation active

Motor[4].PhaseCtrl=0 // No phase commutation active

 

Gate1[6].Chan[0].OutputMode=3 //CH1A and CH1B ouputs will be DAC and CH1C output will be PFM

Gate1[6].Chan[1].OutputMode=3 //CH2A and CH2B ouputs will be DAC and CH2C output will be PFM

Gate1[6].Chan[2].OutputMode=3 //CH3A and CH3B ouputs will be DAC and CH3C output will be PFM

Gate1[6].Chan[3].OutputMode=3 //CH4A and CH4B ouputs will be DAC and CH4C output will be PFM

 

Gate1[6].Chan[0].EncCtrl = 8 //Simulated feedback for channel 1

Gate1[6].Chan[1].EncCtrl = 8 //Simulated feedback for channel 2

Gate1[6].Chan[2].EncCtrl = 8 //Simulated feedback for channel 3

Gate1[6].Chan[3].EncCtrl = 8 //Simulated feedback for channel 4

 

// Create encoder conversion table entries for all motors

EncTable[1].Type=3

EncTable[1].pEnc=Gate1[6].Chan[2].ServoCapt.a

EncTable[1].pEnc1=Gate1[6].Chan[2].TimeBetweenCts.a

EncTable[1].index1=0

EncTable[1].index2=0

EncTable[1].index3=0

EncTable[1].index4=0

EncTable[1].MaxDelta=0

EncTable[1].ScaleFactor=1/512

 

EncTable[2].Type=3

EncTable[2].pEnc=Gate1[6].Chan[2].ServoCapt.a

EncTable[2].pEnc1=Gate1[6].Chan[2].TimeBetweenCts.a

EncTable[2].index1=0

EncTable[2].index2=0

EncTable[2].index3=0

EncTable[2].index4=0

EncTable[2].MaxDelta=0

EncTable[2].ScaleFactor=1/512

 

EncTable[3].Type=3

EncTable[3].pEnc=Gate1[6].Chan[2].ServoCapt.a

EncTable[3].pEnc1=Gate1[6].Chan[2].TimeBetweenCts.a

EncTable[3].index1=0

EncTable[3].index2=0

EncTable[3].index3=0

EncTable[3].index4=0

EncTable[3].MaxDelta=0

EncTable[3].ScaleFactor=1/512

 

EncTable[4].Type=3

EncTable[4].pEnc=Gate1[6].Chan[2].ServoCapt.a

EncTable[4].pEnc1=Gate1[6].Chan[2].TimeBetweenCts.a

EncTable[4].index1=0

EncTable[4].index2=0

EncTable[4].index3=0

EncTable[4].index4=0

EncTable[4].MaxDelta=0

EncTable[4].ScaleFactor=1/512

 

// Point motors to encoder conversion table entries

Motor[1].pEnc=EncTable[1].a

Motor[2].pEnc=EncTable[2].a

Motor[3].pEnc=EncTable[3].a

Motor[4].pEnc=EncTable[4].a

 

Motor[1].pEnc2=EncTable[1].a

Motor[2].pEnc2=EncTable[2].a

Motor[3].pEnc2=EncTable[3].a

Motor[4].pEnc2=EncTable[4].a

 

Motor[1].pDac=Acc24E2S[6].Chan[0].Pwm[2].a //Command output to CH1A address (default address + 2) for Stepper

Motor[2].pDac=Acc24E2S[6].Chan[1].Pwm[2].a //Command output to CH2A address (default address + 2) for Stepper

Motor[3].pDac=Acc24E2S[6].Chan[2].Pwm[2].a //Command output to CH3C address (default address + 2) for Stepper

Motor[4].pDac=Acc24E2S[6].Chan[3].Pwm[2].a //Command output to CH4C address (default address + 2) for Stepper

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

The "3" in the motor status word tells you that it thinks it is into both minus and plus hardware limits, so refuses to move in either direction. I presume this is a simulated system, so the easiest solution is to disable the HW limit function for each motor by setting Motor[x].pLimits to 0.

 

(This is a Power PMAC question that you posted in the Turbo PMAC list. It may get moved to the proper list soon.)

Link to comment
Share on other sites

  • 1 month later...

The "3" in the motor status word tells you that it thinks it is into both minus and plus hardware limits, so refuses to move in either direction. I presume this is a simulated system, so the easiest solution is to disable the HW limit function for each motor by setting Motor[x].pLimits to 0.

 

(This is a Power PMAC question that you posted in the Turbo PMAC list. It may get moved to the proper list soon.)

 

I am curious about why the initial value of motor[x].status[0] is 30004000, why the motor reach the minus and plus hardware limits before it run? Since I don't use encoder, so I need the minus and plus limit to be the reference position. By set Motor[x].pLimits to 0, I can run motion program, but can't monitor the motor[x].pluslimit or motor[x].minuslimit change, is there any other way?

Thanks.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...