01-24-2016 06:34 AM
Hi,
I am currently working on a project with a 3 degree of freedom sensor that uses a CAN bus protocol, and the 11 bit standard base frame format. I have a cRIO 9014 and a NI 9853 CAN bus module. I need to send and receive data on one CAN port, to do this I was hoping to use the power port CAN0.
I need to send and receive periodic messages from the sensor on startup to put it into the correct mode. Once the sensor is setup into the correct mode, the sensor will send data every millisecond until stopped. This will need to be logged to a file for interrogation later. Each test will have its own results file ideally to make identification easier.
I must add that I am new to LabVIEW and am currently working through tutorials and self-paced learning to try and increase my understanding.
I have checked through the NI Example Finder, but I struggling to make progress with those. I was just wondering if anyone would have any advice on the best way to approach this problem or could point me in the right direction with this. I want to learn how to use the system correctly but am uncertain at the moment where to start
Many thanks for any help
01-24-2016 06:56 AM
01-24-2016 10:15 AM
If you can, follow GerdW's advice, but I understand that it isn't always an option. If you need to start working on this now just take everything one step at a time.
First, make sure that you can add the cRIO to a LabVIEW project and compile a VI. Try just adding two numbers on the FPGA. Once you know that you can do that, try running a VI interactively that just reads whatever is on the CAN bus. To get that information somewhere you can save it to file, send it through a target to host DMA FIFO. Don't worry about doing anything with the data, just read it to make sure you are receiving the correct data from the FPGA. Once you know that you are receiving the data you need, try saving it to a file. Although long, the link below is a very good resource. If you run into any roadblocks, show us what you have tried.
http://www.ni.com/compactriodevguide/
01-24-2016 10:32 AM
Hi GerdW/Jacobson,
Many thanks for your advice on this. I will certainly try and follow your advice by starting off with something simple. My main restraint unfortunately is time; I need to get the system up and running relatively soon. So that I can start my testing, but I will have to see how I get on.
Just so that I know what I am up against, for someone who is conversant in LabVIEW and FPGA etc., how long would this take to develop? Are we talking a few hours or a few days/week? I know this is a bit of an open question but it would just give me an idea of what I am up against.
I've got the cRIO working with a LabVIEW project and can compile a VI. I had a practice of this earlier, with one of the example problems supplied.
Kind regards
01-24-2016 11:38 AM
If you are familiar with LabVIEW and cRIO, you can start your development with one of the example projects provided for NI 9853 module. It will give you some idea on how to work with the module and communicate with other devices with CAN protocol.
The project can be found in examples while searching for 9853 module examples (LV project name is "CAN Basic").
Thanks,
Arev
CTO | RAFA Solutions
01-24-2016 12:33 PM - edited 01-24-2016 12:34 PM
Hi LR,
how long would this take to develop? Are we talking a few hours or a few days/week?
Well, if I would have to do this: I would take one of my current projects involving cRIO+CAN, adapt the CAN message generation/analysis part and would be done within some hours.
But if I would need to start from scratch, including learning how to handle CAN with 9853 on cRIO, it could easily take weeks…
01-26-2016 11:36 AM
Well I've been doing LabVIEW for 10+ years, I have no existing projects to start from that is similar to this. I'd say a weeks for me to get it going assuming all hardware were available (I got nothing on GerdW), and then maybe a few days to debug, work on any testing, and other integration issues. There are 15 week college courses on just using LabVIEW on Windows. I'm not saying you need to take that long to get up to speed, but one shouldn't be surprised if it takes multiple months to get things done, and done right.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord