Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CANOpen Communication NI cRIO 9022 (9853 CAN module) - MAXON EPOS2

I'm implementing a velocity control loop on two Maxon EPOS2 70/10 control units,  interfacing them with a NI cRIO 9022 (CAN module 9853). To this aim, I'm using the libraries from NI and they work quite well: for each EPOS2 I can read current, position and velocity using 2 PDO messages and set a desired velocity using 1 PDO message, all in a single timed loop on Labview Real-Time. My VI is based on a NI example included in the mentioned library. Even though the sampling time of the loop is set to 10 ms (as in the example file), I verified that all the operations were executed in about 30 ms.

My target is 1 ms sample time and I'd like to know if there is any chance to get this; are there some limitations in the software/communication protocol I'm using or is it possible to achieve 1 kHz control frequency? Based on the documentation, the EPOS2 CANopen driver is split as follows:

 

1.      Hardware Layer: VIs which interact with the CAN hardware (FPGA Interface folder).
2.      CAN Layer: VIs which construct/deconstruct CAN packets and handle communication between the Hardware Layer and the top level application (CAN folder).
3.      CANOpen Layer: Low level VIs which simplify the generation of the SDOs and PDOs used to communicate over the CAN bus (CANopen folder).
4.      EPOS2 Driver Layer: High level wrappers over the CANOpen Layer simplifying the control of EPOS2 drives (main folder).

 

It seems that the Layer that construct/deconstruct CAN packets is impelemented on the RT level. Is it correct? Do I need to move it to the FPGA level to improve performances?

 

I look forward to hearing any suggestions from you.

 

Best,

 

Nevio

0 Kudos
Message 1 of 7
(9,182 Views)

Hello Nevio,

 

I think that the following document is the response to your question.

 

CAN Engine Reference Example for LabVIEW FPGA

http://forums.ni.com/t5/forums/replypage/board-id/30/message-id/5857

 

Could you please take a look?

 

Regards,

Antonios
0 Kudos
Message 2 of 7
(9,160 Views)

Dear Antonios,

thank you for your indication.

I had a look to the document, anyhow this example seems to be a bit different from my case: I'm using specific libraries developed by NI to communicate with EPOS2 controllers.

The libraries work well but I cannot reduce the whole (velocity) control loop time to less than 30 ms.

I cannot find the source of the problem, any idea is welcome.

Thanks again.

Best,

Nevio

0 Kudos
Message 3 of 7
(8,972 Views)

Hi Nevio, 

I am trying to simply read encoder values from my EPOS2 24/2 control units into Lavbiew. I have been through all the documentation however I am unable to establish communication between the EPOS2 and labview.
I am connecting the two using a USB connection. I can connect to and control the motors in EPOS Studio, but nothing in labview.
I am very new to Labview so I am probably not putting the correct blocks down for initialization.
Could you please help me by suggesting some good examples to look at or linking me to labview sample of initializing communication with the EPOS2 units. 

 

Any help is greatly appreciated

 

Regards,

Kris

0 Kudos
Message 4 of 7
(8,794 Views)

First, don't hijack another one thread.

 

You need to give a lot more description on that you have tried.

What have you done in LabVIEW ?

Was there any errors ?

 

Have you tried any of the simple examples for CAN communication ?

 

0 Kudos
Message 5 of 7
(8,777 Views)

Sorry about hijacking and the snail paced reply.

I have solved the communication errors i was having. I needed to cange the controller bitrate from 'Auto-Bitrate' to a set common value. 

 

Thanks for your quick response. 

 

0 Kudos
Message 6 of 7
(8,765 Views)

I am running into the same error now... error 8012, what did you do to fix it? Thanks. 

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