08-13-2015 12:20 PM
I am trying to send data over an EtherCAT connection using my NI-cRIO 9025 controller. I have set up the 2nd port in MAX as EtherCAT, and have properly updated the software to have Industrial Communications for EtherCAT 14.0. The 3rd party device is an Anybus X-gateway which is already configured, and has been proven to work with a different EtherCAT master. When data is being sent to the EtherCAT port I am able to monitor it on Online Slave Device State - EtherCAT:Parameters - Input.
The problem I am having is I am not familiar enough with LabView programming to find a command to directly write data to the EtherCAT slave. Is there a function block that does this? Or will I need to use soemthing like the EtherCAT Aquisition Library to access additional blocks?
If someone could give a detailed example of how to read from and write to a 3rd party EtherCAT slave that would be very helpful.
Thank you,
Abram Smith
08-14-2015 10:08 AM
Hey Abram,
Were you able to successfully import the XML device profile into your LabVIEW project? The steps for that can be found here:
http://digital.ni.com/public.nsf/allkb/FDA1318A8909D02C862574510060DB62?OpenDocument
08-14-2015 11:00 AM
Ty,
I did follow these instructions when importing the XML file, and I was able to detect the device and add it to the project. I assume this means the XML file worked properly. Another problem that may be causing none of my communications to go through is I cannot go into Operational Mode with the EtherCAT device I added. Is this a problem with the XML or some other configuration?
I've tried using function blocks like Shared Variable -> Write Variable, and IndComECAT Slave -> WriteSDO but neither appears to be working when the program is running.
08-17-2015 01:50 PM
Hey Abe,
When you import the device profile, it should give you some sort of "File Import Results" window afterwards. Could you try importing it again and taking a screenshot of that window?
Also, could you post the .XML file for your device in your reply so I can take a look at it?
08-17-2015 03:01 PM
Re-importing the .xml file seemed to work! Now I have the individual input and output bytes listed in the project explorer. Thank you for the help.
The xml files were here
http://www.anybus.com/support/support.asp?PID=390&ProdType=Anybus X-gateway
08-18-2015 09:21 AM
Good to hear Abe!
Glad reimporting that added the I/O!
10-30-2016 04:11 AM
Hello Abe
I am a beginner of Ethercat,and I have the same question with you. If you could give a detailed example of how to read from and write to a 3rd party EtherCAT slave that would be very helpful.
10-30-2016 09:02 AM
The first link is a good walkthrough of how to use a 9144 EtherCAT slave but it's the same workflow for any EtherCAT slave. The second link will tell you how to add a third-party slave so it shows up in LabVIEW
http://www.ni.com/white-paper/10555/en/
http://digital.ni.com/public.nsf/allkb/FDA1318A8909D02C862574510060DB62
10-30-2016 10:10 AM
Hi,Jacobson
My third party ethercat slave connects successfully with NI cRIO 9039, then I try several examples supplied by lavbiew. When I try the Read SDO.lvproj ,there is a mistake as shown below.I am searching answer of this problem. I would be appreciate if someone could give me the demo of how to write SDO/PDO to my slave.
10-31-2016 09:22 AM
Hi,
I would use Highlight Execution to see what node is throwing the error. From the error text, I would suspect the ReadSDO Invoke Node. Make sure that the circled input reference coming out of the array function is valid.