05-15-2012 05:39 PM
I am doing my final year project on machine vision based instrument cluster inspection, I have a good experience with LabVIEW and machine vision, but this project requires running instrument cluster outside of a vehicle before actual vision based inspection to take place, how should I go about interfacing part(moving the needles via usb per se)? should I go for USB CAN devices from NI, I need to stimulate the cluster in what ever possible way I can (speedometer, odometer etc) can anyone guide me on this, what would be the best strategy to go about the project ?
Thanks
Solved! Go to Solution.
05-16-2012 04:53 PM
Hello Nizamani,
Welcome to the forums. That is a great question.
You may need to provide more details that what you have given. What cluster are you using? Do you have a data sheet for it? Does the instrument cluster receive data from the car's computer directly or is it attached to the CAN network of the car. If it uses CAN then you need to know the library of commands.
05-17-2012 03:26 AM - edited 05-17-2012 03:27 AM
Thanks for the reply.
My objective is to be able to stimulate (and communicate with) instrument cluster outside of a vehicle over CAN protocol, what I do know is that the cluster I am going to use, follow CAN, but I don't have its data sheet.
if you could kindly guide me with these questions:
1) Since I don't have its data sheet available to me should I buy a new cluster that has a datasheet? or can I brute force CAN Commands onto it?
2) Is it possible to use OBDii connector to stimulate the cluster instruments ? like using it bidirectionally ? or I need to buy a specific hardware, like CAN usb interface to run the cluster, like what device should I use that replicates the signals requird to run instrument cluster outside of a vehicle and inside of a lab 🙂 ?
Faraz
05-18-2012 09:48 AM
Nizamani,
You can try brute forcing the commands but your overall productivity may be slow. You should try locating the datasheet for the cluster. See if you can find the manufacturer information. Or call a dealership if you know what car it came out of.
Once you establish all the commands either by bruteforce or the datasheet. You may be able to use a OBDii device to sniff for the packets if you had the entire system but assume you don't have that access to the entire system then you might not be able to get that data. You could certainly simulate the response later once you understand on the inputs and outputs to the cluster you are using.
If all you want to do is virtualize a instrument panel you could define your own CAN commands and don't even worry about the hardware but if you want to control hardware then you'll need to know the expectations to interface with it.
05-23-2012 03:04 PM - edited 05-23-2012 03:07 PM
Okay thanks.
Your answer did help me a lot 🙂 I just have a few follow up questions, if you don't mind:
Is there any 'hardware' based virtualised instrument cluster that allows user to RUN user defined CAN commands over it ? (like a universal instrument cluster - Simulator), or it could only be done in a software based environment? also what role would CAN USB Interface from National Instruments would play in it ?
I did try to simulate instrument cluster in labview, but it was purely based on loop rates and preset values to update the vi, with with no standard protocol simulated. one last question would be, Is it possible to simulate CAN Protocol itself within labview?
Beacause if there are such hardwares/softwares capabilities, it would make my work more meaningful and goal oriented.
again, thanks for your time, much appreciated 🙂
05-24-2012 11:02 AM
Nizamani,
Here is an article about how to use virtual CAN ports.
http://digital.ni.com/public.nsf/allkb/ed9cf160dc07f09f862572c90072b13c?OpenDocument
You could write two loops that read and write across the virtual CAN ports. That way you could replace the writes and reads with calls to write to the hardware if needed.
You could use the USB interface to send frames to a physical device. So you could build a virtual instrument yourself to listen while a parallel loop is send information to the virtual device you built.
Look in the Find Examples window to find some simulated devices that may be useful for a starting point. You may be able to find another example posted to the forums or the developer zone.