Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

CoE with cRIO 9074 and LabView 2011

I’ve a cRIO 9074 v4.1 with NI Industrial communication for EtherCAT 2.2

I’ve to connect a device that communicate via CoE (CANOpen over EtherCAT)  as slave while cRIO is masters. The XML of this device is attached.

 

The device has non pre-allocated PDOs. The producer - who doesn't use a NI master - says that PDOs has to be allocated programmatically by SDO messages.

 

Relating to http://www.ni.com/white-paper/10555/en I’ve enabled the second port of cRIO as EherCAT port using MAX.

From labview Project explorer: New target and device, Existing  Device -> an Ethercat Device has been discovered.

I’ve imported and deployed the XML file. (The name of the device is the same as into XML)

Right mouse button on Device and selecting  “Online device state” I can see the internal status of device and change to Init do PreOperational and viceversa  (and it works on the devices) and I can see how the device is internally mapped.

But now How can I do to have a VI that write and read PDOs (and maybe SDOs ?) Which layer of sw have I to use?

Thanks in advace

Roberto

0 Kudos
Message 1 of 8
(8,676 Views)

The device is a modular device as far as I can see from the XML file. I guess the concept is that you can add the PDO set in a modular fashion. The module then comes with INIT commands to do the mapping.

In project did our Master driver detect any modules if you right click your device and choose New>> Targets and Devices? Like in the Picture below:

 

Capture.JPG

 

If not that means it has indeed no mapping. 

In general the NI master driver comes with examples that includes a SDO example. 

However if you want to use SDO you have to switch the concept of programming away from project device detection and deployment towards programmatic detection and deployment.

And now it becomes tricky. The programmatic access can not detect devices that do not have any PDO mapping, compared to the project that can. ;-( But you caan give it a try and let us know how it went before we go into SDO details. Or better if the vendor has a serial or USB connected software tool that allows you to make the mapping that could solve your problem too.

 

 

DirkW

Message 2 of 8
(8,671 Views)

Hi sgnage,

 

There is an example in the example finder "Read SDO.lvproj" that shows how to read SDO. You can right click on the property node and change it to be a write to send SDO. 

 

 

 

After you setup the PDO communication on the actual device, using the method calls above, you will need to configure the project with the same PDO. Labview schedules PDO communication based off the variables configured in the project. Setting the same variable layout up in the project, by right clicking on the Robox slave and selecting New>>Targets and Devices

 

Once the project layout matches what you configure over SDO, you should be able to pull variables from the project to the block diagram of a VI to read them via PDO.

 

Good luck and post back with problems.

 

 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 3 of 8
(8,668 Views)

Thanks for your answer, but where can I find "Read SDO.lvproj" ?

 

 

0 Kudos
Message 4 of 8
(8,665 Views)

Hell DirkW, thanks for your answer.

With a serial comunication I've configured a PDO in the device, and I can see it in Labview Project Explorer by right mouse on the device icon, "Online device state" category: Ethercat:Parameters as shown in the attached window.png

 

But selecting "new target and device" I get the attached message.png

 

 

So I think that there is something missing, but I don't know what.

By

Roberto

 

 

Download All
0 Kudos
Message 5 of 8
(8,663 Views)

The problem is that your device mapping has to match the XML file module assignement to the Sync managers in order to detect it.

I would recommend to look into the manual of the device to figure out the correct module mapping in that XML file. You might have to call the support for this device.

 

DirkW

0 Kudos
Message 6 of 8
(8,632 Views)

I am also looking for that example.

 

This post states that the example should come with the EtherCAT driver, but I still can not find it on my system.

0 Kudos
Message 7 of 8
(8,115 Views)

Hi Jack, 

 

Try repairing your driver. I would expect something like that if you installed ethercat before your current version of LV. 

 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 8 of 8
(8,112 Views)