From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-28-2018 09:05 AM
I have a Talon SRX motor controller which has CAN capabilities and uses SocketCAN protocol. The Talon is typically used with the roboRIO for the FRC, but I'm using for an independent project to control a single linear actuator. I'm using a Kvaser Leaf Light v2 CAN to USB to interface the controller with LabVIEW. The issue I'm running into is that SocketCAN is a Linux-based protocol and I'm running LabVIEW on a Windows computer.
Currently, the Talon recognizes that a CAN signal is coming in, but cannot interpret it. So far, I've just been testing with the stock LabVIEW that Kvaser provides.
Any suggestions for a work around?
10-01-2018 06:54 AM - edited 10-01-2018 06:55 AM
Unlike what you seem to believe, is SocketCAN not a different CAN protocol on the bus but rather a special form of API to access CAN interfaces. Traditionally every CAN interface manufacturer has created its own API library to access their hardware. On Linux they are sometimes modeled around the serial port interface, on Windows they are almost always in the form of a manufacturer specific DLL.
SocketCAN was proposed by VW to the Linux kernel as an extension to the Berkeley socket interface because this allows multiple applications to access the same hardware and a single application to easily access multiple different interfaces.
That does mean that the source code accessing the SocketCAN interface will obviously look different than when trying to access a CAN interface through another API, but the principle as well as the CAN protocol used remains the same.
So you will have to understand how your current app builds up the CAN messages and sends and receives them through SocketCAN, then investigate the Kvaser API that you want to use and how you can send the same CAN messages and receive the answers with this new API.
It is highly unlikely that anyone here has both experience with SocketCAN and the Kvaser API in order to guide you through the conversion process. So you will have to investigate and understand what is being sent and received in the old application and how that can be done with the Kvaser API.
06-02-2019 03:41 PM
Did you ever get your Talon working with LabVIEW? We are trying to do something similar here and would be happy to hear of any progress.
Thanks!
Brian
06-03-2019 03:19 PM
I recommend that you create a new thread/post as older posts often do not get the same exposure and responses from the community.