zerbzhang Posted July 12, 2022 Share Posted July 12, 2022 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 . . . Quote Link to comment Share on other sites More sharing options...
Omron Forums Support Posted July 13, 2022 Share Posted July 13, 2022 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.aMotor[4].pEncCtrl=CK3WAX[3].Chan[0].OutCtrl.aMotor[4].pCaptFlag=CK3WAX[3].Chan[0].Status.aMotor[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)". 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 Quote Link to comment Share on other sites More sharing options...
zerbzhang Posted July 13, 2022 Author Share Posted July 13, 2022 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. Quote Link to comment Share on other sites More sharing options...
Alex Anikstein Posted July 13, 2022 Share Posted July 13, 2022 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. Quote Link to comment Share on other sites More sharing options...
zerbzhang Posted July 14, 2022 Author Share Posted July 14, 2022 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.