01-18-2016 03:41 AM
I have a sensor that communicates via CANopen.
I have a cDAQ for this project and the only CANopen modules available from NI are for a cRIO.
I wondered, since CANopen operates on a D-sub for a serial port, is there a way to just read in the CANopen data directly to my laptop and into LabVIEW? I have a USB to Serial D-Sub cable.
Also is there any third party hardware anyone could recommend that would be very low cost that could read in the CANopen data and then pass it to LabVIEW in a readable format either via cDAQ or via ethernet or USB or another route direct to my laptop?
Unfortunately we dont have the budget for a cRIO so I need to find another solution.
Any advice would be greatly appreciated.
01-18-2016
04:00 AM
- last edited on
11-19-2021
03:03 PM
by
NI_Community_Su
Hi David,
I wondered, since CANopen operates on a D-sub for a serial port, is there a way to just read in the CANopen data directly to my laptop and into LabVIEW? I have a USB to Serial D-Sub cable.
If you would read some relevant articles on Wikipedia you would know the answer already: NO.
Also is there any third party hardware anyone could recommend that would be very low cost that could read in the CANopen data and then pass it to LabVIEW in a readable format either via cDAQ or via ethernet or USB or another route direct to my laptop?
Using CANopen isn't "cheap" in general. You might search for other vendors of CAN interfaces, I can name companies like Vector or Peak. But then again: CAN isn't cheap, and it requires some drivers. The best drivers you can use in LabVIEW are those by NI supplied for NI hardware…
01-18-2016 04:16 AM
We do have the NI CANopen module but its for a cRIO and doesn't work with the cDAQ. That would mean spending at least another £800 on hardware for a cRIO chassis which would stretch the budget too much.
I do appreciate that the best method would be to have an NI chassis, module and LabVIEW but given the budget constraints, I wondered if there was any board that I might be able to buy for £100 or something that can take the CANopen data and pass it to the cDAQ or laptop in another more accessable format like RS-232 or something.
I was initially thinking of an Arduino but there is very little out there for reading in CANopen data on an Arduino unfortunately.
I have read through the wikipedia on CANopen but I can't understand why it couldn't be implemented in software on a PC if such a program had been developed.
01-18-2016
04:20 AM
- last edited on
11-19-2021
03:03 PM
by
NI_Community_Su
Hi David-Baratheon,
NI 9881 is just a module, it can't run independently without OS. According to the specification of NI 9881, it "direct access to CANopen port in LabVIEW Real-Time host VI". So you have to support the Real-Time OS to NI 9881.
For the 3rd-party chassis, we have never tested their reliability for compatibility issue. So, I don't recommend another chassis.
Best Regards!
01-18-2016
04:21 AM
- last edited on
11-19-2021
03:04 PM
by
NI_Community_Su
Hi David,
CANopen is "on top" on usual CAN, so you need atleast a CAN driver. And even when it uses DSub9 connectors it uses different electrical parameters than RS232/RS485/...
I never heard of "CAN on Arduino". Did you check the companies I named before? Did you talk to your local NI sales representative on the CAN/CANopen topic?
01-18-2016 04:26 AM
I wasn't thinking of another chassis, but an "Intermediary" between the cDAQ and sensor, that could convert the CANopen to RS-232 or something readable on a digital input module for example on the cDAQ. I appreciate it won't have been tested for realiability but I guess that disclaimer will be relevant to most communication between NI hardware and 3rd part hardware. Guess thats the risk we have to take if we need to go down that route.
01-18-2016 04:28 AM - edited 01-18-2016 04:37 AM
Ok thanks Gerd that makes sense, I wasn't aware of the different electrical parameters of CAN communication. So if I can translate from RS-232 to CAN, could the CANopen element be implemented in software? I think cDAQs have a CAN communication module, just not a CANopen one.
Sorry also forgot to mention, I did check with NI but obviously they can only recommend NI solutions, and my only option is to buy a cRIO chassis unfortunately.
There are some CAN shields available for Arduino, but CAN only provides the bottom two layers of the OSI model, and CANopen covers the other 5 layers of communications. So unless someone has already attempted this and made the code opensource then I didn't fancy attempting to code in 5 layers of CANopen communication onto an Arduino. I couldn't find anything.
I checked out the company you mentioned but their solutions were really expensive, might as well buy a cRIO chassis.
01-18-2016
07:38 AM
- last edited on
11-19-2021
03:04 PM
by
NI_Community_Su
01-18-2016 07:50 AM
"I have a sensor that communicates via CANopen."
May I ask what kind of sensor (type, model, company) you want to use? Did you check the sensor interfaces, anything else beside the CANopen? Do you need to control something for the sensor, or all you need is to read out values? It might have a simple analogue output? It would give a simpler solution, all you need is a AD converter (AI module for cDAQ, etc...).
01-18-2016 07:55 AM
I am reading in data from a GXMMW encoder from Baumer, that is connected to a Mico-Epsilon wire sensoir for sensing distance.
I don't think it outputs an analogue value but if it did, that would be incredibly useful. I could just read the data in via an Analogue Input module on my cDAQ