EtherCAT driver for a 6 axis robot

More
20 Jul 2022 11:05 - 20 Jul 2022 11:14 #247830 by ftree
I believe I may need to look at "immediate homing" for the Meca500 if the robot provides its own homing mechanisms.  Thoughts?

SEARCH_VEL = 0
LATCH_VEL = 0
USE_INDEX = NO
HOME_SEQUENCE = 0

#homing
net a1-home-index <= joint.0.index-enable => lcec.0.Meca500.status.homed
net a2-home-index <= joint.1.index-enable => lcec.0.Meca500.status.homed
net a3-home-index <= joint.2.index-enable => lcec.0.Meca500.status.homed
net a4-home-index <= joint.3.index-enable => lcec.0.Meca500.status.homed
net a5-home-index <= joint.4.index-enable => lcec.0.Meca500.status.homed
net a6-home-index <= joint.5.index-enable => lcec.0.Meca500.status.homed
Last edit: 20 Jul 2022 11:14 by ftree.

Please Log in or Create an account to join the conversation.

More
20 Jul 2022 12:06 #247837 by ftree
db1981 Are you suggesting a comp "glue" layer similar to
github.com/dbraun1981/hal-cia402/blob/main/cia402.comp

Please Log in or Create an account to join the conversation.

More
20 Jul 2022 14:16 #247849 by ftree

Please Log in or Create an account to join the conversation.

More
20 Jul 2022 18:11 #247867 by db1981
yes, similar to this but only for the robots complete control pins and the axis enables...

Please Log in or Create an account to join the conversation.

More
21 Jul 2022 09:14 #247922 by db1981
oh, i have not noticed a few of the last posts.

-initial values would be set with the inital data at variable initialization in c.


I don't know if this is practicable in the whole system but my way of implementation would be:

safty chain (estop btn, power_on btn implemented in Hardware)

estop case : ctrl.deactivate = 1; motion.set-point 0
safty chain on (estop disabled) :
-ctrl.deactivate = 0;ctrl.activate = 1
-wait for status.activated -> set ctrl.home
-wait for status.homed -> reset ctrl.home, at this moment in time first set emc-enable-in true (the power on btn in gui will gets accesable)
-now set this
setp lcec.0.Meca500.vel-command 21
setp lcec.0.Meca500.motion.set-point 1
setp lcec.0.Meca500.motion.move-id 0


for lcnc homing use absolute encoders...

Please Log in or Create an account to join the conversation.

More
21 Jul 2022 10:55 #247928 by ftree

Please Log in or Create an account to join the conversation.

More
21 Jul 2022 11:06 #247929 by ftree

I don't know if this is practicable in the whole system but my way of implementation would be:

This is where my experience and knowlege of the workings of lcnc falls off a cliff.  If you're available for contract work let me know.  The resulting work would be open source.
 

Please Log in or Create an account to join the conversation.

More
21 Jul 2022 11:26 - 21 Jul 2022 11:26 #247931 by ftree
Would you also check for the robot existence on the EtherCAT bus as part of the safety chain?

lcec.0.Meca500.slave-online
lcec.0.Meca500.slave-oper
lcec.0.Meca500.slave-state-op
lcec.0.Meca500.slave-state-preop
lcec.0.Meca500.slave-state-safeop
Last edit: 21 Jul 2022 11:26 by ftree.

Please Log in or Create an account to join the conversation.

More
21 Jul 2022 13:30 - 21 Jul 2022 13:35 #247938 by db1981
yes, checking the whole ec-bus is an good thing.

this is a part from out standart safty/error handling comp, this comp works together with the safty-plc in the cabinet.
ec_slaves_responding_ok = (ec_slaves_responding == ec_slaves);
if (!ec_slaves_responding_ok) {
  emc_enable_out = 0;
  if (data.last_ec_slaves_responding_ok) {
    rtapi_print_msg(RTAPI_MSG_ERR, "EtherCAT: Not all %d slaves responding!\n",    ec_slaves);
}}
data.last_ec_slaves_responding_ok = ec_slaves_responding_ok; 
if (!ec_link_up) {
  emc_enable_out = 0;
  if (data.last_ec_link_up) {
    rtapi_print_msg(RTAPI_MSG_ERR, "EtherCAT: Link down!\n");
}}
data.last_ec_link_up = ec_link_up; 
if (!ec_all_op) {
  emc_enable_out = 0;
  if (data.last_ec_all_op)
  {rtapi_print_msg(RTAPI_MSG_ERR, "EtherCAT: Not all slaves in OP mode!\n");
}}
data.last_ec_all_op = ec_all_op;
Last edit: 21 Jul 2022 13:35 by db1981. Reason: hating windows formatting

Please Log in or Create an account to join the conversation.

More
21 Jul 2022 13:40 #247940 by db1981
[quote]I don't know if this is practicable in the whole system but my way of implementation would be:[/quote]
This is where my experience and knowlege of the workings of lcnc falls off a cliff.  If you're available for contract work let me know.  The resulting work would be open source.

with whole system, i am thinking about the safty regulations, hardware design of the complete machine.

If you're available for contract work let me know 


this is my daily business, which country you are living?

Please Log in or Create an account to join the conversation.

Time to create page: 0.153 seconds
Powered by Kunena Forum