Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Inconsistent EtherCAT

Solved!
Go to solution
  • System:
    • fairly simple
    • CRIO with analog and discrete I/O
    • 6 EtherCAT slaves (Parker Compax3 motor drives)
    • place EtherCAT slaves in cyclic torque mode (op mode 10?)
    • read analog command in and place on EtherCAT bus for each drive
    • read feedback from EtherCAT and generate analog out put
    • control a few discrete I/Os
  • problem
    • reading off the bus is inconsistent.  sometimes I get the feedback and sometimes I don't
    • seems to me I need to initialize the EtherCAT and CRIO to force into a consistent mode
    • can't find an example that does this

Thanks
CC

0 Kudos
Message 1 of 11
(3,632 Views)

Hi CC,

 

Can you write down the detailed reproducing steps for your problems? What do you mean by saying "inconsistent"? I see you're writing to the I/O Alias instead of the actual IO. Have you tried to write directly to the I/O variables under the slave item?

 

-YW

0 Kudos
Message 2 of 11
(3,607 Views)

Thanks for the questions.  Responses below in red.

 

Thank you,

CC

 

 

Can you write down the detailed reproducing steps for your problems? <CC:  No, that's really what I mean by inconsistent.>  What do you mean by saying "inconsistent"? <CC:  When I run the program sometimes I get feedback, sometimes I don't.  Doesn't seem correlated to anything I am doing in terms of power cycles, run program, deloyments, etc...  I think it might be how I've configured the EtherCAT bus to run, which is why I attached the code.>

 

 

I see you're writing to the I/O Alias instead of the actual IO. Have you tried to write directly to the I/O variables under the slave item?

<CC:  Yes, same results.>

0 Kudos
Message 3 of 11
(3,589 Views)

Hi CC,

 

Thank you for the input. Have you checked the Scan Engine mode and errors when the inconsistent happened? If the Scan Engine mode is Active and there is no error, can you try to record a video (e.g. use Jing) when the inconsistent happens? I also need the Wireshark log when the inconsistent happens.

 

Thanks,

YW

0 Kudos
Message 4 of 11
(3,586 Views)

Thank you your help.

 

1.  Active mode appears to be the issue.  I get best results when I deploy and have to switch to active mode.

2.  I've been trying to force the scan engine into active mode with the set scan engine vi, but haven't had luck yet.

3.  I'll capture video tomorrow - I don't have network access onsite.

4.  I don't have way of intercepting the ethercat signals for wireshark.

 

Thank you,

CC

0 Kudos
Message 5 of 11
(3,582 Views)
Solution
Accepted by topic author clintoncathey

Hi CC,

 

1.  Active mode appears to be the issue.  I get best results when I deploy and have to switch to active mode.

NI EtherCAT master relies on the Active mode of Scan Engine to trigger the input / output telegrams. If the Scan Engine's mode changes to Config mode, NI EtherCAT master stops the input / output telegrams. User will see that the EtherCAT I/O variables stop updating when the Scan Engine is in Config mode.

 

2.  I've been trying to force the scan engine into active mode with the set scan engine vi, but haven't had luck yet.

Is this VI included in the previously attached LV project? In my experience, this VI rarely throws errors. Have you checked if there is any error reported by the set scan engine VI? 

 

3.  I'll capture video tomorrow - I don't have network access onsite.

OK.

 

4.  I don't have way of intercepting the ethercat signals for wireshark.

Sorry to hear that. Wireshark log is the best way to trace how errors happen.

 

Thanks,

YW

0 Kudos
Message 6 of 11
(3,573 Views)

YW-

 

Thanks for all your assistance and great help.  I found the problem was some corruption in how I had initially loaded labview on my computer.  I am able to resolve the problem by:

 

1)  Wiping Labview and all NI software off my laptop

2)  Re-installing Labview on my laptop

3)  Reformatting my CRIO

4)  Re-installing Labview on my CRIO

5)  starting my project from scratch

6)  making sure the CRIO is in active mode "right click > Utilities > Scan Engine Mode > Switch to Active"

 

-----------------------------------

I've attached my Labview project.

 

So now I can get consistent communications and reliable feedback. 

 

Right now I am fighting getting a torque command sent from the CRIO to the Parker Drive.  Which I haven't been able to do at all

 

Thanks

CC

0 Kudos
Message 7 of 11
(3,553 Views)

Hey CC,

 

Glad to hear that your original problem is solved now!

 

Do you know NI SoftMotion Drive Interface? SDI will save your effort on developing applications for drives. Typically, it's time consuming and error-prone to design and implement motion applications using EtherCAT APIs directly.

 

Thanks,

YW

0 Kudos
Message 8 of 11
(3,550 Views)

Started working with SoftMotion, but can't get even simple feedback to work.  Will take another look.

0 Kudos
Message 9 of 11
(3,546 Views)

My application is VERY simple.  Read and write some I/O over EtherCAT - no loop closures

0 Kudos
Message 10 of 11
(3,545 Views)