Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sensor device for LV subroutine using CAN?

1 view
Skip to first unread message

Nones

unread,
Aug 1, 2008, 4:40:08 PM8/1/08
to
The product of our project will be a LabView subroutine that would take in a list of messages and output the responses to those messages. A named cluster might be an appropriate format for the output. The subroutine should be generic in that once it is fed the appropriate message(s), it can query across the CAN to the appropriate sensor. We need this capability because many new sensors that we use for testing come only with CAN outputs rather than the traditional voltage outputs. These are relatively simple transducers that don't have extensive vocabularies. Six messages may be sufficient for each of these applications.
CAN subroutine suggestions:
-six message (word?) capability These messages can be fed in as inputs specific to the particular transducer the routine to be used.
-named cluster output
-should be able to run in a 20 hz main loop if possible
**In order to proceed with this project, we need communication between the sensor and the bus, which is our main problem. When using MAX, we only get error transmission with a 100% bus load, does this means the sensor is actually working? Also, does anyone knows how to insert the sensor as a LV subroutine, once is communicating?
Thank you!

Nones

unread,
Aug 4, 2008, 4:40:09 PM8/4/08
to
Hello Rasheel,
 
"What happens when you try to communicate with the sensor in MAX? What CAN interface are you using, and are you using an NI-CAN cable? "
I will fix my wiring tomorrow and will let you know. Are the termination resistors required for the sensor to function? Since it is only one sensor I thought it wouldnt ne necessary.
 
"Could you tell me what you were doing in MAX that you saw the above information?"
I was checking the Bus Monitor tool from the Devices and Interfaces tab.
 
"Also, what exactly do you mean when yo usayd "insert the sensor in the LV subroutine"?"
I was refering to a Lab View subroutine or a sub-VI that could be arranged as a named cluster for further use in larger VIs. Basically a readout of the sensor data, expressed as an data indicator or graph to be displayed on a set of other tools (more comprehensive VI).
 
Thank you!
 
 

Nicholas_K

unread,
Aug 5, 2008, 9:40:10 AM8/5/08
to
********************************************* Sensor Specs from other post by Nones:Here are some sensor specs on CAN Communication:
 
-SAE J1939 (BOSCH CAN 2.0B active)
-Driver: 82C250
-Length of Message ID: 29 bits
-Baud Rate: 500kbps
 
**How does kbps converts to kBaud?*********************************************Regards,Nicholas K

Sputnikrent

unread,
Aug 5, 2008, 4:40:12 PM8/5/08
to
If you are using an NI-CAN cable, you will not require termination.
However, if you are NOT using an NI-CAN cable, you will need to
terminate accordingly.

Please run the some of the example code I pointed to in my previous
post to check for communication with the sensor. The Bus Monitor just
checks on the CAN bus activity, and does not actually communicate with
the device. I imagine that there were error messages possibly because
the sensor saw that it was the only device on the network.

Let us know how that goes!

Nones

unread,
Aug 5, 2008, 5:40:08 PM8/5/08
to
I just got back from lab. I fixed the wiring (added termination resistance), and there are no error frame messages on the CAN bus monitor, and actually can see the arbitration ID of the device on the CAN bus monitor. However, there are some new issues:
 
1) One of the capabilities of the sensor is temperature which is allocated within byte 1, however when I run the test panel for the temperature channel and increase the external temperature, the temperature goes down on the panel. I used the following numbers when setting up the channel: start bit 0, number of bits 8, byte order motorola, data type unsigned, the min max and offset values were given by the manufacturer but not the scaling factor which I figured out by assuming room temperature at lab. Are these setup parameters correct, am I ignoring or not knowing something?
 
2) Once the CAN communication with the sensor is up and running, the next step is to write a simple labview cluster to show the readings of the sensor. However, we must include some capabilities (see the initial post for details) and don't exactly know how to do it:

-six message (word?) capability These messages can be fed in as inputs specific to the particular transducer the routine to be used.
-named cluster output
-should be able to run in a 20 hz main loop if possible

Ay suggestions? Thanks!!!

Nones

unread,
Aug 7, 2008, 5:10:07 PM8/7/08
to
Ok, lets assume the device channel parameters are alright.
 
By named cluster I mean, just that, a cluster with a name that if save as a subVI, when use in a VI it displays as a cluster within the main VI. But thats not a big issue.
 
Today I finally created the subVI and is reading form the CAN device, now...how do I get it to writethe data is gathering into a file, preferably Excel? I am attaching what I have sor far, which works given a CAN device.
 
"Could you also describe more what you mean by six message/word capability?"
 
- The subroutine should be generic in that once it is fed the appropriate message(s), it can query across the CAN to the appropriate sensor. We need this capability because many new sensors that we use for testing come only with CAN outputs rather than the traditional voltage outputs. Some examples are the urea quality sensor that I've shown you, NH3 sensor, and NOx/O2 sensors all are CAN based. These are relatively simple transducers that don't have extensive vocabularies. Six messages may be sufficient for each of these applications, but this should be confirmed.
 
Thank you.


uqs2.0temp.vi:
http://forums.ni.com/attachments/ni/30/3679/1/uqs2.0temp.vi

Nones

unread,
Aug 8, 2008, 1:10:06 PM8/8/08
to
Some clarification about the purpose of the subroutine:
 
We are dealing with a series of CAN based sensors to do testing on vehicles. The project is to write a Labview subroutine (ie subVI) which can be incorporated to a mainframe VI which involves other devices and read outs. The message capability of our project consists of inputing a list of messages and output the responses to those messages. As in a CAN system, we want to get, lets say, a reading for the sensor and if its passes a treshold, then query the messages through the network into other devices or panels.
 
Please let me know if further clarification is needed.
 
Thanks!
0 new messages