CANopen Basics cRIO

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

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

Similar Messages

  • CANopen LabVIEW Library for Compact Rio (cRIO) + 985x ?

    Hi
    Has anyone made a CANopen LabVIEW library for the cRIO and the 9852 or 9853 modules ?
    It should not be build on the NI-CAN API but must use the 985x driver "directly"
    The CANopen NI sells does not support cRIO http://sine.ni.com/nips/cds/view/p/lang/en/nid/202614
    Thanks
    Teddy Roerby
    Denmark

    Hi Teddy,
    I know this is late but you can check this link out:
    CANopen Basics for cRIO: http://zone.ni.com/devzone/cda/epd/p/id/5474
    Hope this helps,
    Vincent Carpentier, Ing./P.Eng.
    CLD
    Neosoft Technologies
    www.neosoft.ca

  • Write Control word, read status word Unidrive SP

    All,
    I have a cRIO-9024 with an NI 9853 and I'm trying to configure and control an Emerson Unidrive SP using CAN port 0. I have the Indsutrial Communication for CANOpen 1.0.1 driver installed (on PC and cRIO) and I've been able to successfully read certain registers on the drive using SDOs.
    I'm still confused as to the configuration and use of SDOs and PDOs (learning a lot, though), but what I want to do at the moment is be able to write to the drive control word (parameter 1.42) and read the status word (parameter 10.40). I have been doing a LOT of digging through manuals and LV CANOpen examples, and I think that the addresses that I need to use for these two values are 0x2001, sub-index 2A for the control word and 0x200A, sub-index 28 for the status word.
    I've had no luck in running the CANopencRIOPDODemo VI (from the cRIOCANopenbasic example project), it causes a CANopen module error and kicks the cRIO offline, I end up having to reboot it to restore communication between it and my laptop.
    At any rate, any light anyone can shed on this particular issue, as well as configuring and using SDOs/PDOs in general would be GREATLY appreciated.
    Thanks!

    I can't find the page at the moment. I've been through so many of them it may just be that I'm thinking of the fact that a few places (this one, for instance: http://zone.ni.com/devzone/cda/epd/p/id/5474) state that the 9853 works with CANopen. Now, it indeed does work with CANopen, but it's not a CANopen module, it's a CAN module. The way it works (specifically with FPGA) is to simply use two FPGA I/O nodes (1 read, 1 write) with the default NI CAN frame array of 6 U32 controls. This leads one to the LabVIEW CANopen library, which doesn't work with my cRIO for some reason (confrmed by Richard Van De Graaf at NI). I then ended up attempting to use the Ind. Com. driver, which only supports true CANopen modules like the 9881.
    At this point I've removed all the references to CAN1 from my FPGA VI and I'm having some degree of success. The engineers at NI I've spoken with (Larry Hawkins most recently, and someone named Julianne, through Larry) feel that somehow my network or node is seeing the presense of the two CAN ports as two masters. I've no idea how this is possible as I never once have called CAN1, only CAN0. I/O nodes connected to CAN1 existed in my FPGA VI existed, and that's it.
    There's really no point in me uploading the latest version of my FPGA VI (sorry you couldn't view it, no idea what happened there), as I've changed it back to the same structure as that of the FPGA VI in the CANopen Basics for cRIO example project. I just gave the controls and indicators descriptive names.
    I can now only successfully read index 0x1009, which is the manufacturer hardware version register. I was able to read 0x1008 and 0x100A, but now they just give me back ASCII gibberish. Not sure why, especially since 0x1009 works. I suspect that it's drive-specific.
    The other issue I'm having now is that as soon as I powered the system up this morning, I tried to read 0x1009 and right after the WriteSDO VI wrote the frame to initiate the SDO upload protocol, the following SDO Read kept returning an ID value of 0x701, which is a response to a Node Guard status request. This puzzled me because I don't have any code that requests that status. I hacked in a couple of calls to the NMT VI to stop the node, reset it, the set it to the pre-operational state again. This has cleared the 0x701 response issue, but now only the first read I try to do (I'm just testing SDO reads and writes right now) returns any data to my top-level RT VI. If I stop it and read a different index, I'll get the expected response, but only that one, the others still won't return data.
    I can post my code a bit later if you like, I'm going to go see if any of the default values in the drive have changed somehow.
    Thanks!

  • 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

    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

  • Canopen through visual basic

    Hi i am new i in working with canopen,i am in compulsion to acquire canopen based encoder through visual basic 6 than labview,can anyone suggest the configuration which i need to make in visual basic for the same....
        the hardware wich i have to acquire is pci can series 2
    if someone can sendsome example to acquire the canopen datas through visual basic it will be very helpful &....
    i am eagerly waiting for  all ur reply

    Hi,
    I could not find any examples for VB and CANopen. You could try to program it by using the Frame api;  a fairly good knowledge of NI CAN and CANopen would be needed to do this.  I know you said you wanted to use VB, however NI does have a CANOpen LabVIEW Library which will work with all High Speed Series 2 cards.  The library does not have support for other languages however, so it will not work with VB 6. 
    Regards,
    Adam W
    Applications Engineering
    National Instruments

  • CanOPEN cRIO-9067 & LabVIEW 2014 support

    Hello,
    We have cRIO-9067 and NI 9881 CANOpen communication module.
    According to the NI 9881 product description page the module should work with cRIO-9067. However, the latest NI-Industrial Communications for CANopen 1.0.3 doesn't support LabVIEW 2014 and NI RIO 14.0. This means we can't use cRIO-9067, can we? If so, when the next release of the driver will be availiable? Will it work with cRIO-9030?
    Thank you in advance,
    Nikita.
    Nikita Prorekhin
    Certified LabVIEW Developer
    DigiMetrix GmbH
    web www.digimetrix.com
    Solved!
    Go to Solution.

    Hi Nikita,
    This is an error on the webpage.  Currently, it should actually read:
    The NI 9881 module requires the NI cRIO-911x/9068/908x chassis and the LabVIEW FPGA Module.
    Support for the 906x and 903x targets will come with the NI-Industrial Communications for CANopen 14.5.  Typically, the release is around the time of the LabVIEW 2014 SP1 release.  I apologize for the inconvenience, and have reported this to the person in charge of the page to correct this error.
    Thank you!
    Matt S.
    Industrial Communications Product Support Engineer
    National Instruments

  • EPOS2 y una CRIO con un modulo CAN. ¿Necesito la libreria CANopen?

    Quiero mover un motor Maxon con una controladora EPOS2 y una CRIO con un modulo CAN. ¿Necesito la libreria CANopen?

    Hola,
    Lo más sencillo es que utilices el módulo de CANopen para CompactRIO:
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/209998
    Si optas por utilizar los módulos de CAN estándar 985x, vas a tener que programar parte de la capa CANopen porque la librería “CANopen LabVIEW Library”:
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/202614
    …no funciona en equipos VxWorks. Como indica esta tabla:
    http://zone.ni.com/devzone/cda/tut/p/id/5859
    ...la implementación de CANopen en los módulos 985x es limitada y es a través del ejemplo:
    http://zone.ni.com/devzone/cda/epd/p/id/5474
    http://zone.ni.com/devzone/cda/epd/p/id/6093
    Un saludo.

  • CANOpen Communicat​ion 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.
    After various tentatives, I sent PDOs 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  
    Solved!
    Go to Solution.

    Duplicated post

  • 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 

    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 

  • CANopen with single board RIO sbRIO 9606

    Hello,
    I am searching for any support considering  CANopen functionality applied on single board RIO sbRIO 9606.
    There are some tutorials for cRIO using FPGA, but is it possible to translate the known PDOs or SDOs to the format which can be than used with the available Embedded CAN for sbRIO?
    Thank you in advance for any comment!

    Hello Jesse,
    that the embedded CAN driver doesn't have the CANopen functionality is clear, but according to the fact that the lower level protocol implementing is usually (CAN) it should be possible to write VI which will allow the usage of CANopen commands combined with the embedded CAN driver for single board RIO. Or?
    There are some examples for RIO which do allow CANopen functionality using the CAN module.
    Can you please send me additional information considering the basic CANopen master functionality.
    Thank you in advance.
    zolee

  • Industrial Communications for CANopen - interface create error

    Hello, 
    I am trying to run some basic examples, which I have found with example finder in directory - NI - Industrial communication for CANopen -> cRio -> FPGA bitfiles -> CANopen_cRio_heartbeat.vi.
    But the block "Interface create" gives me the error -2147136667. 
    I am working with cRio with NI 9881 module. The module is connected to Festo robot.
    Do you have please any idea what could cause this error ? 
    Text of Explain Error:
    Possible reason(s):
    You are trying to start an interface that is missing bus power for the transceiver. Some physical layers on NI-CANopen hardware are internally powered, but others require external power in order for the port to operate. This error occurs when starting an interface on hardware that requires external power when no power is detected. Supply proper voltage to your transceiver. Refer to the CANopen Hardware book of the NI-Industrial Communications for CANopen Help for more information.
    Cheers
    Ivo
    Solved!
    Go to Solution.

    Hello IvoK,
    The 9881 needs to be externally powered. You can do it with a CAN Breakout Box or with a CAN cable.
    Regards
    Mélinda B
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure - Nouveau contenu
    34 sessions partout en Fra...

  • I am recieving an Error code when I try to compile a program to an FPGA chp in a cRIO but I don't know what the code means.

    This is the message that I am recieving when I compile to the cRIO I am working with.
    FATAL_ERRORortabilityortDynamicLib.c:358:1.27 - dll open of library
       <C:/NIFPGA85/Xilinx\bin\nt\libGenXstTask.dll> failed due to an unknown
       reason.   Process will terminate. For more information on this error, please
       consult the Answers Database or open a WebCase with this project attached at
       http://www.xilinx.com/support.
    I have no idea what this means.  Thank you in advance for the help.

    UtahTiger;
    First let me ask a few basic questions
    What version of LV are you using?
    What OS is your development machine?
    When in the compile process does this error occur?
    Can you compile other (blank) VI's, id the problem with this particular project?
    Have you been able to compile this project before. what changed?
    Once I know a little more about your system we can narrow down the source of your error.
    Message Edited by Huter on 04-29-2009 04:16 PM

  • Performanc​e of mathscript in RT scan mode of CRIO 9075

    Hello, 
    I am working in active vibration control field. I want real time control of vibration. I am new with Labview and working with Matlab for last 3-4 years. For real time control purpose, I am using NI 9234 AI card, CRIO-9075 Integrated Controller and NI 9263 AO card. I have .m code for controlling process.  I am using RT mathscript module to get required data. The problem is it is taking 45-50 ms for 1 iteration and i am loosing so much data in each iteration. When I am running same matlab code in my system (laptop) with same inputs, it is taking 2-3 ms and in matlab itself it is taking 5-7 ms. Why it is taking time using CRIO-9075? How can i improve the system? Is there any other fast controller or any other better option for this application?
    can anyone help me? 
    Thank you in advance for the help.   

    I have been working on this issue and referred to earlier discussions like:
    http://forums.ni.com/t5/LabVIEW/RT-cRIO-Shared-Variable-Engine-Errors/td-p/1697368
    I have added a delay in my RT code (in initialization phase) and since then I have been able to solve the issue. Basically I think that SVE needs tome to work.
    Please let me know if anyone has any better idea.
    Thanks

  • Visual basic 6.0 with PCI-CAN series 2

    Hi all,
    I'm a newbie in CANOPEN, hopefully I can get some guidance to start off the application development.
    Basically I wished to develope a simple VB program to move/stop the motor at different speed and to monitor the position.
    There is only 1 master which is the PCI NI-CAN and 1 device. The device which is the servo amplifier is Kollmorgen S600.
    http://www.maccon.de/fileadmin/FTPROOT/s400600can_e.pdf
    During the amplifier boot up, I'm able to receive 0x81h 00 00 00 00 00 00 00 00 at both the MAX's bus monitor and the NI's Frame API, thus ensuring that the baud and hardwares are correct.
    I wished to perform a "SDO-READ" and "SDO-WRITE" using the Frame API as followed :
    http://img.photobucket.com/albums/v208/rainman1978/sdoexample.jpg
    The Frame API VB software example given has this abiturary ID, data length, remote frame (YES/NO) and extended frame (YES/NO). In the write procedure it has :
    Transmit.Data(0)=&H0
    Transmit.Data(1)=&H1
    Transmit.Data(2)=&H2
    Transmit.Data(3)=&H3
    Transmit.Data(4)=&H4
    Transmit.Data(5)=&H5
    Transmit.Data(6)=&H6
    Transmit.Data(7)=&H7
    etc etc followed by its standard ncwrite procedure.
    I made change to the transmit datas.
    Transmit.Data(0)=&H40
    Transmit.Data(1)=&H41
    Transmit.Data(2)=&H60
    Transmit.Data(3)=&H0
    Transmit.Data(4)=&H40
    Transmit.Data(5)=&H0
    Transmit.Data(6)=&H0
    Transmit.Data(7)=&H0
    There isn't any response back from  the amplifier and I bet the frame format must be wrong.
    This is what I observed from the NI SPY when I send out the data. (when VB set to ID 5 and data length set as 8)
    05 00 00 00 00 08 00 00 41 60 00 40 00 00 00 (something likethis, which I couldn't relate at all)
    Thanks. Hope I can get a wake up call to this complicated bus protocol.
    Regards,
    Rainman
    Attachments:
    Transmit Receive same Port.zip ‏5 KB

    Got it!!!
    To all that will try to use the VB6 application:
    In the LabView examples the COB ID default is in hex, and in the VB examples the COB ID default is dec !!! The GUI of the 2 examples (VB & LabView) is exactly the same but it will not work unless you use the correct COB-ID.
    So, for example, if you want to use the labview example and you want to enter the ID 601: you Enter 601 in the ID text box.
    However, if you want to use the VB6 example with the same ID you need to insert 1537 (=601 hex!!)
    I hope that with this post I will save some people the 3 days that it took me to find this!
    Shilo

  • What's the maximum counter frequency for the cRIO?

    Hi Everyone,
    First of all, thanks for your input here!
    I'm new to the cRIO, but have been working with LabVIEW for awhile.  I need to accurately measure the time between several digital inputs.  One input starts the counter, another captures and stores the current counter value, and a third stops the timer and also captures and stores the counter value.  It's basically a stopwatch.  The problem is that the counter needs to run at a frequency of 100Mhz or greater.  It also needs to be at least 28 bits wide so that it won't overflow between start and stop inputs.  Is this possible with any of the cRIO systems currently available?  If so, how?  I'm assuming it will need to be implemented within the FPGA, but does the FPGA run that fast?
    Thanks so much!
    -Yohan
    Solved!
    Go to Solution.

    Hi Yohan,
    Unfortunately, the cRIO is not capable of reliable frequencies at 100 MHz or greater.  I would recommend speaking with your local NI Field Sales Engineer or callteh NI Sales department at (888) 280-7645 to discuss the hardware that would accomodate your application.  
    The PXI-6586Rmay be an option: http://sine.ni.com/nips/cds/view/p/lang/en/nid/207297
    I hope this helps!
    Kristen H.

Maybe you are looking for