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

Similar Messages

  • 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 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

  • My cRIO (9022 , chassis 9113, module NI 9225)

    Hello, I hope you are doing great
    I create a new project that detects my cRIO (9022 , chassis 9113, module NI 9225) and I copied cRIO both the FPGA VI and Host of the original project NI but problem persists: there appeared another error message at the Host.VI (see attached file).
    I did not get to solve this problem can you help me to find a solution as soon as possible
    thank you for advance for your help
    Attachments:
    erreur1.jpg ‏276 KB
    erreur2.jpg ‏214 KB

    Hi basmasag,
    It looks like you need to specify a top level VI of the Build Specification you're trying to build. You'll need to select the Source Files Category on the left in the build specification properties menu. Then highlight your top level VI (in the example its called NI 9225 Getting Started (FPGA).vi) and select the blue arrow to set it to be the Top-Level VI. I've included and image to better illustrate what I mean. 
    I think the FIFO error your seeing may be due to the Type of FIFO you've configured the Data FIFO to be in your project. In the example it was Tartget to Host - DMA. Make sure that's set correctly by double clicking on the Data FIFO, and setting the type. The second picture I attached should better demonstrate what I mean. 
    It seems like you may be new to LabVIEW FPGA, I think you'll find a lot of useful information here: http://zone.ni.com/reference/en-XX/help/371599G-01/lvfpgahelp/fpga_getting_started/
    Applications Engineer
    National Instruments
    CLD Certified
    Attachments:
    Top-Level.png ‏59 KB
    fifo.png ‏48 KB

  • CRIO-9014 and 9853 CAN Module

    Hello folks,
    When trying to deploy a CAN Receive example from LabVIEW 8.6 onto the 9014 (VxWorks) controller, I keep getting a "shared libarary failed to load" error (nican.*).  Some investigating (i.e. searching and reading on ni.com) revealed that perhaps nican cannot be used with the 9853 and the 9014 combo.
    I still have many questions, that perhaps some of you can answer, please. 
    1. Is the following statement true? 
    The nican "driver" vis cannot be used for a 9853 card in a cRIO-9014 chassis.  Instead, it's necessary to use the 985x drivers.
    2. Do the 985x drivers have to be installed on the 9014?  If so, can it be done using MAX?
    3. Is there an FTP client running continously on the 9014?
    4. Is there a document explaining how/where to FTP software to on the 9014 controller if needed?
    5. Since the 9853 can only be used in fpga programming mode (i.e. scan interface mode is invalid), do I have to have an FPGA host vi running on the 9014 or can I leave the host on an "external" computer?
    This is my first attempt at using a cRIO for anything so please feel free to assume that I don't know anything that isn't explicitly stated in the "getting started with LabVIEW..." document.
    Thanks in advance.
    Chris

    chassan,
    1 - Yes, that's true, as confirmed here.
    2 - Yes, they must be present on the 9014. I believe you should add them via MAX as there are no special instructions in the readme of the drivers.
    3 - Here are a couple articles on ftp and cRIO:
    FTP Transfer of Files between Host and Real-Time Targets in MAX How Can I Use LabVIEW to FTP Files to and from My Real-Time Target
    4 - Same as above
    5 - I am not exactly clear on the quesiton.
    Hope this helps, post again if you have other inquiries!
    Peter Flores
    Applications Engineer

  • How can I set the timebase in the FPGA API for the NI 9853 CAN module?

    Hallo,
    is there anybody familiar with cRIO, especially the NI CAN 9853 Modul?
    When starting communication with a CAN Bus  you can get a receiving CAN Frames from the FPGA I/O Node with a timestamp.
    How can  I set  this  timebase in the CAN Controller, because the CAN communication starts every time with the same timebase.
    Compared to the CAN API  on a PC the timebase for the communication is set when the Open Frame API VI is used?
    From that time the CAN Contoller assume the timebase from the PC.
    Whats about the FPGA API?
    Martin

    Hallo Dirk,
    thanks you
    for your answerer regarding my question.
    The last
    question belongs to my intention, to get absolute Timestamps from the NI 9853
    CAN interface. As you said it always starts from zero when starting the
    application.
    For my application
    I would like to get a timestamp with the local time I start the CAN communication
    and every CAN Frame should be logged with the Timestamp it is actually send on
    the CAN BUS.
    How can I achieve
    it?
    My first
    thoughts were to add up the timestamp for every CAN Frame counted from zero to
    an absolute Timestamp when starting communication. But I have got some wrong values.
    Maybe I did something wrong using the high and low part of the Timestamps I got
    from the CAN API.
    Do you have
    a suggestion for me?
    MartinW      

  • CRIO CAN Module and Bundle to/from U32Array conversion LV FPGA VI

    Ciao,
    I'm looking for a Bundle to/from U32Array conversion VI, running on LV FPGA with cRIO CAN module.
    This conversion has to take place within the FPGA, without leveraging the RT embedded processor
    I'd also like to suggest implementing such utility directly into the LV FPGA function palette, because it's quite common dealing with message contents (bundle is better!) and communicating frames to an external RT application (array is more effective)
    Thanks so much
    ciao

    LV FPGA does include the Cluster to Array and Array to Cluster functions which allow you to convert between these two data types assuming that all elements of the cluster are of the same data type.
    The CAN message cluster does contain elements of different data types (one array and a number of scalars) so it can not be converted directly using the Cluster to Array function.
    Using basic data handling functions you can build a subVI to convert from the CAN cluster to an array. I have attached an example of such a VI.
    Christian Loew, CLA
    Principal Systems Engineer, National Instruments
    Please tip your answer providers with kudos.
    Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
    or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
    to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
    Attachments:
    cRIO CAN Cluster to Array.vi ‏40 KB

  • Communicat​ion ethernet crio avec un modem wireless

    Bonjour,
    je souhaite envoyer des données sur un server FTP via un modem 3G connecté par câble ethernet sur mon compactRIO.
    Le problème est que je suis débutante dans la programmation labview et que je n'ai aucune idée comment réaliser cette fonction.
    J'ai paramétré le modem et le cRIO avec une IP fixe dans une même plage pour qu'il puisse discuter ensemble.
    J'ai recherché des exemples sur NI pour m'orienter dans une direction de programmation, mais je n'ai rien trouvé.
    Si quelqu'un pouvait m'aider..
    Cordialement,
    Julie

    Merci d'avoir épondu si vite.
    Je ne sais pas faire du FTP filaire, pour l'instant j'essais de voir comment fonctionne les VI FTP sur labview, mais j'ai beaucoup de difficultée à avoir un résultat.
    Je n'utilise pas le toolkit NI FTP, devrais je?
    Pour ma connexion 3G j'utilise un modem de chez Sierra Wireless le raven Xe connecté en ethernet sur le cRIO.
    Les paramètres que j'ai configuré sont les suivant:
    cRIO: port ethernet 1: IP 192.168.13.102
             masque de sous réseau: 255.255.255.0
             port ethernet 2: IP 192.168.13.104
             masque de sous réseau: 255.255.255.0
    mon ordinateur : IP 192.168.13.101
    masque de sous réseau: 255.255.255.0
    et le modem IP 192.168.13.102
    masque de sous réseau: 255.255.255.0
    Merci beaucoup pour votre aide
    Julie

  • How can I use a USB camera with cRIO 9022. Please see my strange problem.

    Hi,
            I would like to use a USB camera with NI cRIO 9022. I used the same USB camera with NI USB 6216 DAQ device and developed a VI(within a PROJECT and outside it). So, It is working fine with NI USB 6216 device when I use the Vision Assistant Express VI and gets detected in its Initialization Window.  Please see JPEG File 3 where I get NO ERROR.
            I am facing a problem when I want to use it with NI cRIO 9022. What exactly I am doing in this case is:
    1) Create a NEW PROJECT
    2) Add Targets and Devices(NI cRIO 9022)
    3) Use the Scan Interface mode
    4) Create a NEW VI under the cRIO 9022 device 
    5) Use a Timed Loop(Synchronized with Scan Engine) for continuous Data Acquisition and Sending from the Analog I/O modules.
    6) Use the Vision Assistant available through the NI Vision Acquisition 2010 Module(I get STUCK HERE! The Express VI opens the Initialization Window, but I don't see the USB camera like in JPEG File 3)
    I am facing difficulties with this HOST COMPUTER, cRIO implementation differences. On my host computer I have the software packages as shown in JPEG File 1, and on my cRIO 9022 as shown in JPEG File 2.
    Can someone guide me how to overcome this and get the USB camera detected when I am using NI cRIO 9022?
    NOTE: If this is a problem with software mismatches on HOST and NI cRIO 9022 device, please see JPEG Files 1 and 2 for available software and Host and cRIO 9022.
    Thanks.
    Amar.
    Attachments:
    NI Vision Acquisition Express Error for NI cRIO 9022.JPG ‏39 KB
    IMAQ and dx Modules Installed on my NI cRIO 9022 hardware(No NI Vision Acquisition 2010 SP1).JPG ‏82 KB
    NI Vision Acquisition Express NO Error for NI cRIO 9022.JPG ‏48 KB

    Only GigE comms are supported on the cRIO Real Time OS. Have a look at the following:
    Machine Vision on NI CompactRIO and Single-Board RIO
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • How can I configure one of the gateway NI9792 Ethernet port to communicate with a cRIO PAC ?

    Hi NI Engineers,
    I intend to use my gateway NI9792 the following way:
    1. One Ethernet port for network connection. That's how I'll develop it, download software and monitor my application through my PC at my desk.
    2. Can the other port be used to communicate with a cRIO device? If so, how can I do it?
    It seems to be a stupid question, but I truly could not work this out!
    Thanks in advance,
    Luiz
    "Together we stand, divided we fall..."
    Certified LabVIEW Associate Developer
    Solved!
    Go to Solution.

    Good afternoon, Luiz
    Follow the first link to guide which module can be used and other links to the best part of bore configuration CRIO. Any questions please contact us.
    How Do I Configure My Time Server on the NI WSN-9791 or NI 9792 Gateway?
    http://digital.ni.com/public.nsf/allkb/44FA322FAFF8D58D862575BD00591A54?OpenDocument
    NI WSN Product and Configuration Guide
    http://zone.ni.com/devzone/cda/tut/p/id/8710
    Configuring the Dual Ethernet Ports on Real-Time Controllers
    http://digital.ni.com/public.nsf/allkb/67F94BB93BCE32CF86257367006B3659?OpenDocument
    video setup and installation CRIO
    http://www.ni.com/swf/demos/us/crio/outofbox/
    Automatic Network Configuration for cRIO-9073 and cRIO-9074 CompactRIO Controllers
    http://digital.ni.com/public.nsf/allkb/37C790309A210A748625757000570938?OpenDocument
    Sincerely,
    Mauro Vera.

  • How can I use USB camera with NI cRIO 9022, please see my strange problem.

    Hi,
            I would like to use a USB camera with NI cRIO 9022. I used the same USB camera with NI USB 6216 DAQ device and developed a VI(within a PROJECT and outside it). So, It is working fine with NI USB 6216 device when I use the Vision Assistant Express VI and gets detected in its Initialization Window.  Please see JPEG File 3 where I get NO ERROR.
            I am facing a problem when I want to use it with NI cRIO 9022. What exactly I am doing in this case is:
    1) Create a NEW PROJECT
    2) Add Targets and Devices(NI cRIO 9022)
    3) Use the Scan Interface mode
    4) Create a NEW VI under the cRIO 9022 device 
    5) Use a Timed Loop(Synchronized with Scan Engine) for continuous Data Acquisition and Sending from the Analog I/O modules.
    6) Use the Vision Assistant available through the NI Vision Acquisition 2010 Module(I get STUCK HERE! The Express VI opens the Initialization Window, but I don't see the USB camera like in JPEG File 3)
    I am facing difficulties with this HOST COMPUTER, cRIO implementation differences. On my host computer I have the software packages as shown in JPEG File 1, and on my cRIO 9022 as shown in JPEG File 2.
    Can someone guide me how to overcome this and get the USB camera detected when I am using NI cRIO 9022?
    NOTE: If this is a problem with software mismatches on HOST and NI cRIO 9022 device, please see JPEG Files 1 and 2 for available software and Host and cRIO 9022.
    Thanks.
    Amar.
    Attachments:
    Host Computer Image or Vision Acquisition Software Installed.JPG ‏91 KB
    IMAQ and dx Modules Installed on my NI cRIO 9022 hardware(No NI Vision Acquisition 2010 SP1).JPG ‏82 KB
    NI Vision Acquisition Express NO Error for NI cRIO 9022.JPG ‏48 KB

    When you select My Computer, you are running the program on the PC.  In this case, the camera works because it is connected to the PC.  The scan engine doesn't work because it needs to run on the cRIO, not the PC.
    When you create the program on the cRIO, you can use the scan engine because the program is on the cRIO.  You can't use the camera because it is back on the PC, and can't be found on the cRIO.
    The project is a wonderful tool, but it may be making the programming seem too simple.  It may not be clear to you that by moving a program to a different location (PC or cRIO), it is running in an entirely different environment on a totally different machine, even though it is just a little further down in the project.  You can't easily access the hardware on one machine while running the program on the other.
    So the summary is:  The camera is attached to the PC.  The scan engine runs on the cRIO.  Never the twain shall meet.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • CompactRIO CAN communicat​​ion in custom Driver VI generated by SIT

    Hello,
    For my application I need to use the compactRIO to communicate with a .dll generated from a simulink model with real time workshop, read and wrtie CAN message and read the second ethernet port. I am using a compactRIO running VxWorks (9025 RT controller and 9116 FPGA).
    The communication with the model is ok. Now my problem is for adding the CAN communication in the Base rate loop  of the Driver VI generated by the SIT connection manager.
    I have tried different configuration of the FPGA VI but I always have the same problem.
    The first time the compactRIO is powered up, the writing on the CAN bus is done correctly and the reading seams to miss some messages.
    Then a stop using the stop button from the model control of the front panel of the HOST vi.
    Then I  run again this VI (without restarting the compactRIO) and in that case nothing is written on the CAN bus but the reading is correct. I cannot find where is the mistake. Maybe it is in the FPGA VI but I don't see what I am doing wrong.
    I have tried to change the priority of the timed loop but that has no effect. I put my complete project in attachement.
    Thanks for your help.
    Attachments:
    NI support NET.zip ‏1559 KB

    Hi !
    It's the french forum !
    Link to english forum : http://forums.ni.com/t5/LabVIEW/bd-p/170
    Benjamin

  • Trouble saving images on cRIO-9022

    I'm having trouble saving images on my RT target cRIO-9022 (VxWorks). I get "error 53 occurred at Write GIF File.vi LabView: Manager call not supported" when running the code. What I'm trying to do is save periodic snapshots of front panel charts/graphs locally on the cRIO and download them at a later time.
    I've also tried some of the report generation VIs and had broken arrows and compile errors. from what I've read in help and online, It seems perhaps it is not possible to do what I'm trying to do with my particular target. Is there any reason that I shouln't be able to save images locally to the RT target? has anyone else had a similar problem generating reports or saving images on the cRIO-9022?
    Thanks for any help you can provide,
    truth204

    I've run into similar problem before... I was unable, at the time, to find a good workaround for saving front panel images to file on RT because the necessary report generation functions were unsupported on the RT environment. If you are just saving data from charts and graphs, you might want to consider saving the data as a binary file or a spreadsheet/.csv style file. This is ultimately what I did in my RT application, and then I created a separate desktop application that would read the data from those exported files and reproduce the charts/graphs that were created on the RT target.
    Here is a KB describing your error, for reference: http://digital.ni.com/public.nsf/allkb/39B5B135F32902388625723B00683B27
    Cheers!
    Logan

  • FPGA. Which xilinx tool for Crio 9022 & 9030

    Hi. I will be compiling fpga programs on the Crio 9022 & 9030. Do you need different xilinx compilers to do the task?
    Using LV ver14
    Crio 9022 requires xilinxs tool 14.7?
    Crio 9030 requires the xilinx tools vivado 2013.4?
    Thanks 
     

    Yes, this is because of the different series of FPGAs that are on the 9022's backplane and the 9030 cRIOs.  You can see this KB and this KB to further see why.

  • USB of cRIO 9022...

    Hello,
    I would like to use the USB port of my cRIO 9022 as a port to read a GPS or any other device. Is this possible or I can just use it for interfacing with USB -memories??
    If it is possible, how ??
    Thanks,
    Hector.

    Hello Hector,
    The USB drives of VxWorks controllers like your cRIO only have software for using the USB slot for storage devices.  It is possible to create a custom driver but you would need to develop this driver using a WindRiver VxWorks development seat.  This KnowledgeBase has more information on this topic.
    Regards,
    Jon S.
    National Instruments
    LabVIEW R&D

Maybe you are looking for

  • Imminent Release of new GeoRaptor Version

    Folks, I am pleased to announce, after 4 months of development and testing, that a new release of GeoRaptor should be released hopefully before the 2011 Oracle Spatial User Conference in Washington DC this Thursday 19th. The release manager will make

  • Script to nuke messages in Outlook 2011

    I have the following script for Entourage, and thought it would work under Outlook but it does not. it hangs on the first 'message' Anybody know how to fix this? FYI the script deletes a selected message immediately bypassing the trash. on run tell a

  • WRT310N Drops Connection

    Hello, I recently purchased a WRT310N (version 2.0) after using a WRT54GL for years. Here are my issues with this router: 1. After updating and saving settings the router will drop its IP address and won't renew it without a reset.  Connections to th

  • Create conditional button

    I have searched the forums and don't understand the explanations because I am a total Apex beginner!!!! So, sorry if this is a duplicate question..... I have a form and a report on the same page, but different regions. I deleted the CREATE button fro

  • Windows Explorer crawls with DW 8 running

    If I leave DW running for any period of time, it eventually affects my ability to move/manage files in Windows Explorer. For instance, to simply move or copy a small text file from one network drive to another could take 20 to 30 seconds. If DW is no