01-18-2016 11:39 AM
I have selected a suitable USB to CAN interface that I am interested in purchasing. If I can get the data into my PC visa CANbus then I do have some software that comes with the encoder that can read the CANopen data. Only trouble is I dont know if the software allows me to output the CAN open data to LabVIEW. This is the hardware I am considering:
http://uk.rs-online.com/web/p/pc-data-acquisition/9120431/
01-18-2016 11:42 AM
I am looking at buying the following CAN bus to USB interface:
http://uk.rs-online.com/web/p/pc-data-acquisition/9120431/
My concern is how to convert the data to CANopen data and port it into LabVIEW. They do have some software that can read CANopen data but I dont know how it will interact with LabVIEW.
01-18-2016 11:43 AM
I am looking at the following USB to CAN device
01-18-2016 11:44 AM
Looking at the following USB to CAN device
http://uk.rs-online.com/web/p/pc-data-acquisition/9120431/
01-18-2016 11:08 PM
Hmm, I do not want to be annoying, but for such cost you might find analogue encoder. Maybe new, for sure second hand. If you sold the canopen one, you would have enough money to buy even a new analogue encoder, and the dev would be much easier...
01-19-2016 12:22 AM
01-19-2016 03:52 AM - edited 01-19-2016 03:53 AM
I didn't really want to go into the ins and outs of the project as its not really related to the question at hand but basically there aretwo of us working on the project and we do have a compact RIO and a CANopen module but my colleague is using it to develop the actual system. I am developing a small scale mockup of the system as a proof of concept and so the budget is not going to be huge for my part, not enough to justify purchasing two of everything including a cRIO.
I have a cDAQ that I use for prototyping and the motor control works fine on the cDAQ so no need for a cRIO, but the issue is the CANopen module wont work on a cDAQ. So I need another method of reading in the sensor data for the closed loop control of the motor that doesn't involve buying a second cRIO chassis. I was thinking a USB - CAN interface or a microcontroller that can read in the CANopen data and transmit it in some easy to read format to the cDAQ.
Selling it or changing the protocol is not an option because this is the protocol that is used on the main system and there is other hardware that also operates on CAN and they are networked together. All this was planned during system design phase, its not something where I can just sell it and get a different piece of hardware unfortunately.
I did tell you guys that these weren't options and it would have been easier if you just took my word for it rather than I have to explain all the inner political workings of the project.
In terms of why I am posting here, I was looking for advice on the best way to get the CANopen data into LabVIEW on a small budget of a few hundred pounds. My company doesn't mind buying me the USB-CAN interface and I am happy to download some code for the CANopen but I dont know how to do that, hence me posting here for some advice and help.
If it is definitely possible to use a USB-CAN interface then I can go ahead and order it, but I didn't want to order it and then come back to the PM in a few weeks and say "actually we cant use this". I also wanted some advice on choosing the right USB-CAN interface as I was worried about selecting the wrong one and it not working with my hardware. I also am not sure how to get the data into LabVIEW even if I ordered the USB-CAN interface so was just looking for some advice on that so I know what is actually involved with it.
p.s. sorry for the 4 posts above, they weren't showing up yesterday when I was posting them so I kept retrying and they all appeared at once today for some reason.
01-19-2016 04:11 AM
01-19-2016 04:13 AM
Update: I have found a USB-to-CAN interface that comes with some LabVIEW code for CANopen so I will get a quote and see if this is within the price range:
The hardware:
The sample LabVIEW code:
http://www.ixxat.com/support/file-and-documents-download/drivers/vci-samples-tools
If it turns out to be too expensive then I will look at whether the code can still be used with a cheaper USB-CAN interface or if there is another method.
Just in case anyone else has this problem in futurue, thought I would share what I find
01-19-2016 04:41 AM - edited 01-19-2016 04:41 AM
Dennis that looks perfect. The NI USB-CAN interface is considerably cheaper and that library for CANopen should work perfectly.
Is there any compatability issues that I might get between the sensor and the hardware/library or are al CAN and CANopen interfaces pretty much the same?
I will hopefully look at getting the following NI USB-CAN interface.
Thanks for that, looks like the perfect solution. Never used libraries of LLB manager before so guess I will need to start looking at that.
I will give it a go and if it works I will mark that as the solution.