-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set the correct MapIO and SYNC DC into erob servomotor #712
Comments
First thing I noticed is your cycletime, you set it to 5000. This is 5000ns or 5us. I think you intended 5ms -> 5000000ns. Did you also implement a real time task where the PDO transfer is done? I see you set dorun=1, but is the other end also implemented? Did you check the actual transfers with Wireshark? Are there any error returns? What is the returned workcounter of the PDO transfer? |
Hi dear @ArthurKetels thanks for your reply. Therefore, the cycle time in the real-time task is: int ctime = 5*SYNC0TIME;// 1ms cycle time
Also, I set the same cycle time in real-time task
And the delay after the SYNC
But. I can not synchronize yet. Another suggestion? |
I think you have to concept of sync0time and cycletime wrong. For 99% of the servo controllers both need to be the same. And my suggestion is to use a cycle time of 1ms and a sync0time of 1ms. Btw, 2000000ns is 2ms. So 5*2ms is 10ms. And most likely the drive will not accept such slow cycle time. |
@paul218 any update on this? |
dear @ArthurKetels
Also I checked if all PDO maping are correct with "slaveinfo etho -map" But, I can not find where is my mistake ! Could you help me ? |
In your code
You link the structures to the pointers of ec_slave[0], but the first slave starts at ec_slave[1]. See also the output of slaveinfo, it mentions slave 1. Always check the vendor and product code in ec_slave to know you have the correct slave. And when it does not work print out the actual pointer address to see if it points to the correct memory location in IOmap. Not rocket science. |
Streamline your eRob integration with our latest open-source software, drivers, and examples now available on GitHub: github.com/ZeroErrControl |
You can refer to this link: https://github.com/ZeroErrControl/eRob_SOEM_linux/blob/main/test/linux/simple_test/eRob_test.cpp. I hope it will be helpful to you. |
Hello, dear community,
I have a problem working with these motors using EtherCAT (erob_servoMotors)
The ESI file ZeroErr Driver3_1_4.txt
The manual reference eRob CANopen and EtherCAT User Manual v1.1_Latest (1)_compressed.pdf
The behaviour is a little strange, I am a little confused about where is my mistake. If it is in mapping configuration or SYNC DC.
When I wrote the register directly with the ec_SDOwrite the motor moved and I can read the PDO TX_PDD. However, I can not write the RX_PDO when the state machine is in operational mode. I attached this version of the code . SDO_ctr.txt
First I explain my mapping process:
The manufacturer recommends this:
Then the code used to map is the next:
The slave info after IO mapping is the next:
To get the PDO mapping I create the next structure and assigned it to the inputs, outputs ec_slave[]
However, to compensate for the aligned empty bytes mention before I assigned an int16_t variable instead of int8_ to Modes_Operation and Modes_Operation_Dsiplay.
At this point. Is my mapping configuration correct to align the empty bytes?
Second, I did not control the motor writing the RX_PDO. I tried to check the SYNC DC
I try to check if is a problem with the synchronization of the distributed clocks. Therefore, I rewrite the code using the suggestion of #487, #520, and #482. I attached the second version of my code. PDO_control.txt
I did the next steps according to #520 , but I can't control the motor using PDO control_word mapping.
What is my mistake ?
The text was updated successfully, but these errors were encountered: