Jump to content
OMRON Forums

Motor[4] changed the home reference index address, the position of returning to zero is random


zerbzhang

Recommended Posts

   The homing reference index of Motor[4] is changed to the TTL signal accessed by Acc24E3[1].Chan[0];

pCaptFlag and pCaptPos change from Acc24E3[0].Chan[3] to Acc24E3[1].Chan[0] as the reference signal, the configuration is as follows:

Motor[4].pCaptFlag=Acc24E3[1].Chan[0].Status.a //Modified Motor[4].pCaptPos=Acc24E3[1].Chan[0].HomeCapt.a//Modified

EncTable[4].pEnc = Gate3[0].Chan[3].ServoCapt.a

EncTable[4].pEnc1 = Gate3[0].Chan[3].AtanSumOfSqr.a

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

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

Motor[4].pEncCtrl =Acc24E3[0].Chan[3].OutCtrl.a

Motor[4].pEncStatus=Acc24E3[0].Chan[3].Status.a

  The bad problem is that the home reference of Motor[4] is not the reference signal connected to the set Acc24E3[1].Chan[0]!I don't know what's wrong . . .

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I believe you are trying to set up Motor 4 as Gate3[1].Chan[0], even though the IDE expects it to be Gate3[0].Chan[3]. This was an issue in previous IDE versions, I am not sure exactly when it was corrected, but it seems to work fine in my IDE 4.6.0.14.

If you do not wish to update the IDE, you will have to set the following variables. These can be dragged into the terminal from the editor window.

Motor[4].pEncStatus=CK3WAX[3].Chan[0].Status.a
Motor[4].pEncCtrl=CK3WAX[3].Chan[0].OutCtrl.a
Motor[4].pCaptFlag=CK3WAX[3].Chan[0].Status.a
Motor[4].pCaptPos=CK3WAX[3].Chan[0].HomeCapt.a

To sync these settings with the IDE project, right click on the motor folder and select "Sync All Motor Settings (PMAC to Project)".image.png.c25ea1a97a436234a8418db5a35b196c.png

If this is a sinusoidal encoder, you may also want to make sure the following settings are in affect:

Arctangent Enabled:
Gate3[1].Chan[0].AtanEna = 1

 

With Standard Sinusoidal:
Motor[4].EncType = 6

 

With ACI:
Motor[4].EncType = 7

Link to comment
Share on other sites

Eric, thanks for your reply;

Motor[4] runs correctly.

 My problem now is that the reference position is incorrect;

The index home reference position of motor[4] comes from Acc24E3[1].Chan[0], not Acc24E3[0].Chan[3]. But the 1vpp feedback signal is from Acc24E3[0].Chan[3].

(The 1vpp encoder has no home index signal; the home index signal is accessed from Acc24E3[1].Chan[0])

I modified the settings.

Motor[4].pCaptFlag=Acc24E3[1].Chan[0].Status.a // Motor[4].pCaptPos=Acc24E3[1].Chan[0].HomeCapt.a//

The above settings have no effect;This is confusing.

 

Link to comment
Share on other sites

If you monitor Acc24E3[1].Chan[0].Status in the watch window, do you see the correct bits changing when you physically engage your flags?

Do you have Motor[x].CaptFlagBit set correctly for the signal(s) you want to use?

 

I think there may be a more fundamental issue, though.

Do you actually have an alternate position sensor configured to Acc24E3[1].Chan[0], or is it just the flags?

If you set pCaptPos to look at Acc24E3[1].Chan[0].HomeCapt.a, then ultimately that will be the position you use as your home value.

If you don't have a secondary encoder that Acc24E3[1].Chan[0] can read, this will likely not work how you want.

Especially if the encoder and signals are coming into different Gate devices (ie, encoder in Acc24E3[0] and flags in Acc24E3[1]), now the capture cannot be handled entirely in the hardware of the Gate3 ASIC since no one ASIC has all of the information.

Link to comment
Share on other sites

AAnikstein,thanks.

        The current situation is what you said. Encoder in Acc24E3[0] and flags in Acc24E3[1].

      I currently switch the motor[4] encoding channel to Acc24E3[1].Chan[0] (both encoder and home flag can work normally), and start returning to zero;

     Finally switch to Acc24E3[0].Chan[3] (1vpp signal, no home flag signal) to achieve high-precision positioning

 

 //IVPP
Motor[4].EncType=6
EncTable[4].pEnc = Gate3[0].Chan[3].ServoCapt.a
EncTable[4].pEnc1 = Gate3[0].Chan[3].AtanSumOfSqr.a

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

Motor[4].pEncCtrl =Acc24E3[0].Chan[3].OutCtrl.a
Motor[4].pEncStatus=Acc24E3[0].Chan[3].Status.a
Motor[4].pCaptFlag=Acc24E3[0].Chan[3].Status.a
Motor[4].pCaptPos=Acc24E3[0].Chan[3].HomeCapt.a

//TTL
Motor[4].EncType=5
EncTable[11].pEnc1=Sys.pushm
EncTable[11].pEnc=Acc24E3[1].Chan[0].ServoCapt.a

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

Motor[4].pEncStatus=Acc24E3[1].Chan[0].Status.a
Motor[4].pEncCtrl=Acc24E3[1].Chan[0].OutCtrl.a
Motor[4].pCaptFlag=Acc24E3[1].Chan[0].Status.a
Motor[4].pCaptPos=Acc24E3[1].Chan[0].HomeCapt.a

     A little necessary work needs to be done. After implementing the encoder switching, different PID parameters and speed settings are required.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...