LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW CANopen

Hi dblmm,

 

it misses Heartbeat support, which is quite elementary for CANopen…

 

I also recommend NOT to look out for old deprecated hardware together with old deprecated software drivers.

When you start a development nowadays you should not use hardware created 10-20 years before: use todays hardware with todays (and hopefully future) software support!

 

(I still use the "CANopen library for Series 2 devices" as mentioned in your link, which is quite a hassle. It is was only supported upto LV2010, but I use it with LV2011 right now. I guess I can make it work with LV2017 too…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 17
(864 Views)

Thanks for the shout-out but none of my stuff touches CANopen.  On the hardware level it is just high speed CAN, but the protocol changes thing in ways that you probably shouldn't be mixing CANOpen, with Non-CANOpen devices.  NI did make CANOpen software that uses the NI-CAN hardware (alternate example code), and the XNet hardware does have a compatibility layer allowing to use NI-CAN drivers, on XNet hardware.  So that means it should be possible to use these drivers on XNet hardware.  I've never used CANOpen, but I have used the compatibility layer software and it seemed to work fine.  Not sure if that CANOpen software is available anywhere, or if it is written in G, or a call to another library.

 

One alternative to that would be to write your own software layer.  I'm not super familiar with CANOpen but this seems like a task that is possible for someone really familiar with CAN, and if you have some example CANOpen hardware to communicate with.

 

Another alternative would be to use NI's CANOpen hardware, and their newer more supported software.

0 Kudos
Message 12 of 17
(858 Views)

Hi,

 

Hooovahh linked to that old CANopen library I still use.

  • It can be used with XNET devices when the CAN compatibility layer is installed. (Be aware of some nasty bugs in this software stack (CANopen library, NI-CAN, NI-CAN compatibility layer, XNET hardware) for certain XNET cards leading to hard-to-debug computer crashes (BSOD)…)
  • You cannot use CANopen library calls and (certain) NI-CAN calls on the same CAN port, otherwise you get BSOD…
  • The CANopen library API mostly uses CLFN nodes in the VIs, so you cannot change/improve/adapt functionality.
  • The linked page also states "not recommended for new developments".
  • It's officially only supported upto LV2010.

I still use it, but only for testbenches older than 10 years with hardware at the same age.

 

@dblmm: I strongly advise NOT to go this "CANopen library" way. Really!

 

The USB8473 examples show basic routines to implement CANopen PDO, SDO and NMT using plain NI-CAN functions. You can use them for your own implementation of a "CANopen using CAN" abstraction layer…

 

You can see it this way: when you insist on using older hardware without good software support it's the best way to really learn the CANopen internals in all details! 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 17
(848 Views)

Thanks to you GerdW and Hooovahh,

 

to summarize it:

 

ATM I have these Options if I want to use USB-NI Hardware which meets my requirements:

 

1. USB-8502 and writing my own CANopen implementation on top of the XNET drivers

-> might work if i do it correct, problem is that i have not that much experience in that kind of things

-> requires more unplanned time in the project which i don't really have

 

2. USB-8502 with the linked CANopen library and a compatibility layer

-> strongly not recommended by you

 

3. discontinued USB-8473

-> might not need my full requirements since the examples provide limited functionality

-> no support

 

To me it seems the available NI Hardware is atm not an option for me.

As a third party solution I found the USB-to-CAN v2 from Ixxat. Has anyone experience with that one. They provide a CANopen software package  which includes LabVIEW drivers for that USB-to-CAN Adapter.

 

Greetings dblmm

0 Kudos
Message 14 of 17
(837 Views)

Hi dblmm,

 


@dblmm wrote:

To me it seems the available NI Hardware is atm not an option for me.

As a third party solution I found the USB-to-CAN v2 from Ixxat. Has anyone experience with that one. They provide a CANopen software package  which includes LabVIEW drivers for that USB-to-CAN Adapter.


You still can use dedicated CANopen devices from NI…

 

I use some IXXAT USB-2-CAN devices at work, but not with LabVIEW so far. They came with some special hardware and are used to parametrize that hardware with the vendor supplied software. The hardware works reliable as far as I can tell. I guess their software is also reliable…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 17
(831 Views)

Hi GerdW,

 


@GerdW wrote:


You still can use dedicated CANopen devices from NI…


You mean devices like the NI-9881 C Series CANopen Module and the PXI/PCI-8531 CANopen interfaces?

 

They are not an option for me in terms of price since I don't have CompactRIO or PXI/PCI hardware

0 Kudos
Message 16 of 17
(829 Views)

@dblmm wrote:

 

to summarize it:

...


Yeah I think that summarizes it nicely.  If I were tasked with that I would start with the NI-CAN compatibility layer and the CANOpen examples, then try to write my own native implementation with what I could learn from it and the documentation.  Basically start with 2, and make 1.  But that task would likely take me a while, and my boss might just say to spend the extra money on the official NI hardware which you said wasn't an option for you.

 

Never heard of Ixxat but most of these 3rd party solutions have poor LabVIEW integration.  If you can get a hold of the documentation, and some example code you might have a better idea of how well it will work.

 

0 Kudos
Message 17 of 17
(813 Views)