LabVIEW: CANopen on PC with USB to D-Sub; LabVIEW. 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. Home Support Software and Driver Downloads NI Software Product Downloads Download Detail Page CANopen Library Toolkit 1-1 of 1 results View 10 20 30 Sort by Title Release Date Descending Ascending.
Active5 years, 4 months ago
I have one of these digital pressure trasmitters that outputs a CANopen (CAN-BUS) signal.
What is the best way to get the data via a USB port on my computer? Can I just wire the
CAN_H
and CAN_L
to the USB +
and USB-
and the V+/-
to an external power supply? Maybe USB isn't the way to go. Can I wire this to the ethernet port?
Once the wiring is done, what's the easiest way to then decode the data on my OS? I won't shy away from a bit of programming, but I'm lost in a sea of CAN protocols and need some direction! I have access to a Linux box, a Mac box, and a PC here.
vimes1984vimes1984
3 Answers
I'm not sure what your application is, but reading the data from this sensor is not that simple. As André said, this is a CAN device; specifically, it is a CANopen protocol device. Wiring it to USB will wreak havoc upon the poor computer to which you connect it.
I would recommend doing some research on the CAN-BUS protocol to see how it works. To get you started, I would recommend purchasing an Arduino (perhaps a starter kit like this or this) and this CAN-BUS Shield (here's a library). Then look at the datasheet for your sensor to see how to communicate with it. The USB connection with the Arduino will allow you to access serial information sent from the Arduino to your computer (e.g. the pressure level). However, the Arduino is a microcontroller, and it may be satisfactory as a controller alone for your application, negating the need for USB.
If all of this seems over your head, you might want to opt for a simpler pressure sensor like this one (datasheet) from the Honeywell MLH series. It is a simple analogue sensor that uses voltage (5V, perfect for the Arduino) to output the pressure value.
The sensor you have is very heavy-duty (metal case with a range of about 1200 PSI), and it is probably overkill for most applications, but I don't know what you are using it for. If it's something simple with not nearly that much pressure, I would recommend purchasing a different sensor that has better precision and accuracy for the pressure range you are gauging.
While you could opt for a CAN to USB adapter like this commercial one or this more documented one, I would bet that you will find yourself rather limited in capability immediately, and/or in the future. That being said, I would recommend the Arduino solution over the USB adapter one.
evan.bovieevan.bovie
CAN-USB conversion adapters that I have seen incorporate a dedicated micro-processorfor handling the conversion details, so I'm not too sure about the possibilityof soldering one for yourself.
An example on Amazon isUSB-CAN USB to CAN Bus Converter Adapter with USB Cable,costing $46.99.I don't know what this device will look like to Windows and whether it requiresa special driver.
harrymcharrymc285k1616 gold badges303303 silver badges618618 bronze badges
That sensor outputs data on a CAN bus, which is a network mainly designed for automobile usage (it's widely used to interconnect ECUs inside vehicles and allow them to communicate together).
CAN is very different from USB and connecting them directly can result in a disaster by damaging the USB controller and possibly the entire motherboard.
If you still want to use this sensor you'll need a device to convert the CAN bus to something your computer can accept, like USB, RS232 (if you have a serial port) or even Ethernet - here's an example CAN<->USB converter.
Note that there is no software already made to read data from a sensor like this, because almost every CAN interface has its own APIs and each sensor itself has different data formats and stuff, so you'll need to program an application to read the sensor.
Look at the SDK and examples provided with your CAN interface for how to 'talk' to the CAN bus, and then look at the datasheet of your sensor for how to actually 'talk' to it and get its values.
user256743
Not the answer you're looking for? Browse other questions tagged usbnetwork-protocolscan-bus or ask your own question.
Active5 years, 4 months ago
I have one of these digital pressure trasmitters that outputs a CANopen (CAN-BUS) signal.
What is the best way to get the data via a USB port on my computer? Can I just wire the
CAN_H
and CAN_L
to the USB +
and USB-
and the V+/-
to an external power supply? Maybe USB isn't the way to go. Can I wire this to the ethernet port?
Once the wiring is done, what's the easiest way to then decode the data on my OS? I won't shy away from a bit of programming, but I'm lost in a sea of CAN protocols and need some direction! I have access to a Linux box, a Mac box, and a PC here.
vimes1984vimes1984
3 Answers
I'm not sure what your application is, but reading the data from this sensor is not that simple. As André said, this is a CAN device; specifically, it is a CANopen protocol device. Wiring it to USB will wreak havoc upon the poor computer to which you connect it.
I would recommend doing some research on the CAN-BUS protocol to see how it works. To get you started, I would recommend purchasing an Arduino (perhaps a starter kit like this or this) and this CAN-BUS Shield (here's a library). Then look at the datasheet for your sensor to see how to communicate with it. The USB connection with the Arduino will allow you to access serial information sent from the Arduino to your computer (e.g. the pressure level). However, the Arduino is a microcontroller, and it may be satisfactory as a controller alone for your application, negating the need for USB.
If all of this seems over your head, you might want to opt for a simpler pressure sensor like this one (datasheet) from the Honeywell MLH series. It is a simple analogue sensor that uses voltage (5V, perfect for the Arduino) to output the pressure value.
The sensor you have is very heavy-duty (metal case with a range of about 1200 PSI), and it is probably overkill for most applications, but I don't know what you are using it for. If it's something simple with not nearly that much pressure, I would recommend purchasing a different sensor that has better precision and accuracy for the pressure range you are gauging.
While you could opt for a CAN to USB adapter like this commercial one or this more documented one, I would bet that you will find yourself rather limited in capability immediately, and/or in the future. That being said, I would recommend the Arduino solution over the USB adapter one.
evan.bovieevan.bovie
CAN-USB conversion adapters that I have seen incorporate a dedicated micro-processorfor handling the conversion details, so I'm not too sure about the possibilityof soldering one for yourself.
An example on Amazon isUSB-CAN USB to CAN Bus Converter Adapter with USB Cable,costing $46.99.I don't know what this device will look like to Windows and whether it requiresa special driver.
harrymcharrymc285k1616 gold badges303303 silver badges618618 bronze badges
That sensor outputs data on a CAN bus, which is a network mainly designed for automobile usage (it's widely used to interconnect ECUs inside vehicles and allow them to communicate together).
CAN is very different from USB and connecting them directly can result in a disaster by damaging the USB controller and possibly the entire motherboard.
If you still want to use this sensor you'll need a device to convert the CAN bus to something your computer can accept, like USB, RS232 (if you have a serial port) or even Ethernet - here's an example CAN<->USB converter.
Note that there is no software already made to read data from a sensor like this, because almost every CAN interface has its own APIs and each sensor itself has different data formats and stuff, so you'll need to program an application to read the sensor.
Look at the SDK and examples provided with your CAN interface for how to 'talk' to the CAN bus, and then look at the datasheet of your sensor for how to actually 'talk' to it and get its values.
user256743