Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Hi all

 

I am trying to implement a velocity control loop on my Maxon EPOS2 motor controller, by using PDOs sent through my real-time controller (NI cRIO 9022) with a CAN module (9853).

I configured the PDO mapping in the object dictionary of the EPOS2, so that each new RxPDO1 contains the new desired velocity setting value, and I am trying to use the simple example contained in the National Instrument example directory criocanopenbaisc (freely downloadable here http://zone.ni.com/devzone/cda/epd/p/id/5474).

I can change manually in the object dictionary the value of desired velocity by using the EPOS studio tool by connecting via USB the EPOS2 to my computer, but when I connect the EPOS2 to the CAN0 port of cRIO the newly sent values does not make effect.

At the first try the .vi file hung on the Read PDO command, which is right after the Write PDO command. I suppose it means that no real PDO is sent over the CAN bus. However, I excluded the "Read PDO" from the diagram, now the file executes and terminates but no command is sent to the EPOS. I can verify through an oscilloscope that many similar digital waveforms are sent, just like if no ACK signal was received.

 

Looking forward to receiving any hint

 

Fabrizio 

0 Kudos
Message 1 of 4
(8,092 Views)

Some updates on the developments, since no one yet replied... 😞

 

At the current time the PDO sent is structured in the following way:

 

COB-ID (4 bytes containing the U32 representation of the COB-ID for RxPDO1: 531)

Updated value (4 bytes containing the representation of the desired velocity value, U32).

0 in U32

0 in U32.

 

The last two U32 are sent so to be coherent with the example of the NI library nicanopenbasic.

 

At the moment only one signal is sent (no more repetitive signals representing fault communication), but the values are not updated in the EPOS2... 😞

 

Cheers 

0 Kudos
Message 2 of 4
(8,062 Views)

Hi Fabrizio,

Did you already take a look at this post here?

 

http://forums.ni.com/ni/board/message?board.id=30&message.id=4940&requireLogin=False

 

Regards

Luca Gallo
Sales Engineer
0 Kudos
Message 3 of 4
(8,051 Views)

you can also take a look at this:

http://zone.ni.com/devzone/cda/epd/p/id/6093

 

bye

Luca Gallo
Sales Engineer
0 Kudos
Message 4 of 4
(8,041 Views)