12-02-2010 04:18 AM
Hello,
I'm trying to use this example of CAN open with the cRIO but i'm having some difficulties!
I'm using a cRio 9022 with chassis 9116 and Fpga CAN module 9853 and I need to comunicate to a LinMot controller using CANopen!
Has someone used this example or knows how it works?
While i run the PDOExample i have a connection error that reset the connection with the cRIO.
as suggested I tryed to do this
CANopen Basics problem solving If the connection to your cRIO gerts lost using this example take a closer look at "Read PDO": - Place loop timing in both while loops - Program a timeout condition so the loops exit if no PDO is received Hope this helps
The connection reset is solved but the PDOExample still remains stucked in the loops of the READPDO.vi
Maybe i'm setting up wrong timing but I'm really lost.
I also tryed to connect a CAN analyzer to the Fpga module but i cannot find any network activity!
Please can/knows someone how to make this example working?
Thank's in advance!
Davide Galli
12-03-2010 03:27 AM
Hi Davide,
if you are using a cRIO-9022 controller (running VxWorks OS), maybe the problems you are encountering are due to the fact that CANOpen and NI-CAN is not supported on VxWorks controllers.
In fact, CANOpen is built upon the NI-CAN driver. NI-CAN only supports the 9002 and 9004 Compact RIO controllers running the Pharlap operating system. Because there is currently no NI-CAN support for other Compact RIO controllers using the VxWorks operating system, those controllers cannot use the CANOpen Library.
However, a resource for using CANOpen on the cRIO without NI-CAN can be found here.
You can find more details here and here.
I hope this helps.
Bye,
Licia
12-03-2010 05:28 PM
Hello Licia,
thank you for the answer!
I use Labview for programming and I think the RealTime OS in the cRIO is NI-RIO(3.4). I think because I'm not already a long term user....
So i hope this configuration is a good one for the CANopen to work!
Today i spent a lot of time compiling the Fpga CAN_engine_basic.vi in many configurations and at the end i think the problem is given by the Baud Rate settings that have to be perfecly the same.
In the Fpga module properties i setted for example 500k baud and in the CanAnalyzer (canalyzer for friends;) too,
than I just tried to write in the CAN0 port an array of 6 elements but in output i cannot receive anything alse than an error frame.
In the CanOpen example you posted me I'm struggling too, if i try to write an SDO message in the SDOexample ... nothign happens.
But i'd like to make work the first basic example before; just because it's extremely basic but it do not work!
Am I doing something wrong?
Any suggestion is appreciated!
Bye
Davide