-
Notifications
You must be signed in to change notification settings - Fork 685
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
Cannot start EL6751 using SOEM because 0x1C32 and 0x1C33 not available #865
Comments
I am sorry, but you do not supply enough data to find out the issue. It could be that the timeout values of the ec_SDowrite() are too short. Always check if there is any error returned, and if so print it out on screen. Another issue could be that you try to write parameters in the wrong state (pre-OP safe-OP OP). A wireshark capture of your initialization sequence is also very helpful. The last screen-shot is in -offline- mode, so there is no way to check if these parameters are actually available in the online slave at the current state. |
@ArthurKetels sorry for late answer, i'm Azzam as a @hernanda16's friend, currently we develop Robot using Elmo driver motor (CANopen) that connect to Beckhoff EK1101 - EL6751, We plan to use SOEM to interract with beckhoff, from now on, we only have a knowledge about CANopen but only have a few knowledge about EtherCAT. I've follow the instruction from EL6751 Manual, it says going to PRE-OP than configure than going to safe-OP than OP. below is my Tshark show sorry for our little knowledge about SOEM, i hope you can help |
@ArthurKetels Another question, why my EL6751 got "Can err with 1hz flashes" (indicate that At least one box state is not equal to 0 (e.g. device not found, wrong configuration, device in error state). But if i program and run it from TwinCAT, that led is off. Even i run it again by using my program using SOEM, everytime after i run it from TwinCAT the led is off. If i power-off my Beckhoff, the led flashes 1hz again. i thought it was TwinCAT wrote some value that my SOEM didn't. That values is not gone even the Beckhoff is re-INIT, but that values will be gone if the power is off. sorry, i and my friend so confused now :) |
update: now the return value of my ec_SDOwrite is 1 for all of my commands, but i can't change my EL6751 state from pre-op to safe-op |
When you want to post a tshark capture, please use the -w option to write the packets to a file in raw format. Zip it and post it here as attached file. Then I can analyse the packets in detail.
If you wait a few seconds, do you get an error on the EL6751? Use something like below snippet:
Most likely. Use wireshark to capture the TwinCAT traffic to the slave in a minimal configuration. Do not forget to put TwinCAT in promiscuous mode, otherwise noting will be captured. With bridge slaves like the EL6751 Beckhoff does some special configuration tricks that are not in the manual. They can be very difficult to get working correctly. If you search on that topic in this forum you will find examples. |
Please explain what you did to solve this part of the issue. Then others, that read this thread later, also know how to do it. |
there is my error: how do i config my el6751? i was copy-paste similarly from the boot startup from TwinCAT about my EL6751 edit: but now, why the led indicator showing that the BUS is OFF? |
Please use the search function as I requested. You will quickly find people that had the same issue and solved it. |
update: but i have another question, @ArthurKetels how do i do SDO communication to my driver? Can i do the SDO from my EL6751? or can i write and send a raw CAN frame to my driver? sorry for my many question, i've so confused right now :) |
@ArthurKetels I want to access EL6751 with SOEM using reference startup from TwinCAT XAE startup for EL6751
ret_wr[0] = ec_SDOwrite(can_slave_ecNum, 0x1C32, 0x02, FALSE, sizeof(cycle_time), &cycle_time, EC_TIMEOUTRXM);
ret_wr[1] = ec_SDOwrite(can_slave_ecNum, 0x1C33, 0x03, FALSE, sizeof(shift_time), &shift_time, EC_TIMEOUTRXM);
ret_wr[2] = ec_SDOwrite(can_slave_ecNum, 0xF800, 0x00, TRUE, sizeof(_F800), &_F800, EC_TIMEOUTRXM);
ret_wr[3] = ec_SDOwrite(can_slave_ecNum, 0x8000, 0x00, TRUE, sizeof(_8000), &_8000, EC_TIMEOUTRXM);
ret_wr[4] = ec_SDOwrite(can_slave_ecNum, 0x8006, 0x00, TRUE, sizeof(_8006), &_8006, EC_TIMEOUTRXM);
ret_wr[5] = ec_SDOwrite(can_slave_ecNum, 0x8008, 0x00, TRUE, sizeof(_8008), &_8008, EC_TIMEOUTRXM);
ret_wr[6] = ec_SDOwrite(can_slave_ecNum, 0x8003, 0x00, TRUE, sizeof(_8003), &_8003, EC_TIMEOUTRXM);
ret_wr[7] = ec_SDOwrite(can_slave_ecNum, 0x8010, 0x00, TRUE, sizeof(_8010), &_8010, EC_TIMEOUTRXM);
ret_wr[8] = ec_SDOwrite(can_slave_ecNum, 0x8016, 0x00, TRUE, sizeof(_8016), &_8016, EC_TIMEOUTRXM);
ret_wr[9] = ec_SDOwrite(can_slave_ecNum, 0x8018, 0x00, TRUE, sizeof(_8018), &_8018, EC_TIMEOUTRXM);
ret_wr[10] = ec_SDOwrite(can_slave_ecNum, 0x8013, 0x00, TRUE, sizeof(_8013), &_8013, EC_TIMEOUTRXM);
ret_wr[11] = ec_SDOwrite(can_slave_ecNum, 0x1C12, 0x00, TRUE, sizeof(_1C12), &_1C12, EC_TIMEOUTRXM);
ret_wr[12] = ec_SDOwrite(can_slave_ecNum, 0x1C13, 0x00, TRUE, sizeof(_1C13), &_1C13, EC_TIMEOUTRXM);
From this code return value of ret_wr[0], ret_wr[1], ret_wr[11], and ret_wr[12] is 0
Also from from TwinCAT XAE we got several data for 0x1C32 as shown below
But using slaveinfo interface -map i got this value which is different with TwinCAT XAE
0x1c12 "RxPDO assign" [ARRAY maxsub(0x83 / 131)]
0x00 "SubIndex 000" [UNSIGNED8 RWR_R_] 0x00 / 0
0x1c13 "TxPDO assign" [ARRAY maxsub(0x89 / 137)]
0x00 "SubIndex 000" [UNSIGNED8 RWR_R_] 0x03 / 3
0x01 "SubIndex 001" [UNSIGNED16 RWR_R_] 0x1a81 / 6785
0x02 "SubIndex 002" [UNSIGNED16 RWR_R_] 0x1a83 / 6787
0x03 "SubIndex 003" [UNSIGNED16 RWR_R_] 0x1a84 / 6788
0x1c32 "SM output parameter" [RECORD maxsub(0x20 / 32)]
0x00 "SubIndex 000" [UNSIGNED8 R_R_R_] 0x00 / 0
0x1c33 "SM input parameter" [RECORD maxsub(0x20 / 32)]
0x00 "SubIndex 000" [UNSIGNED8 R_R_R_] 0x00 / 0
Is there any solution or program to access EL6751 using SOEM?
The text was updated successfully, but these errors were encountered: