Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending a message from PXI CAN Series 2 to device interface

Is it possible to send a CAN message to a device interface? What VIs should be use? I need to send a single message ("x92") to a device interface in order to enable its function.

 

Thanks!

0 Kudos
Message 1 of 6
(6,736 Views)

Hi Nones,

 

Have you tried  looking at the CAN Example VIs that are installed in LabVIEW? These can be found in LabVIEW > Help > Find Examples > Hardware Input and Output > CAN. Depending on whether you are using Frame or Channel API, there are various examples for sending messages that can be found there.

 

You can read more about the differences between Frame and Channel API here. Good luck!

Rasheel
0 Kudos
Message 2 of 6
(6,703 Views)

Hello Rasheel,

 

I've done all of that but still nothing. In detail, I need to send a message of ID x92 which is a heart beat (as described by the manufacturer) that enables the sensor. Without that heart beat, the sensor doesnt communicates. The manufactures came over to help, but they develop the sensor using CAN Analyzer which allows them to send that heart beat to start communications. I'm thinking is something related to a CAN object within the Frame API.

 

So, is it possible to send that "heart beat" throught the CAN card to the CAN device?

0 Kudos
Message 3 of 6
(6,701 Views)

Yes, you could use the transmit periodic example to set up your ID to transmit every 2 ms, for example. Thats the maximum speed for periodic transmission with NI-CAN objects.

 

DirkW

0 Kudos
Message 4 of 6
(6,691 Views)

Great! That worked smoothly! Thanks DirkW

 

 

We now have this VI that sends a message to enable a sensor and then starts reading raw data. We understand this data is CAN frames which now we need to convert to channel in order to get scaled values. We tried "CAN Frame to Channel vs 2_2_2" from NI but it needs some cRIO parameters that we don't have. We also looked at the "CANConversionLibrary" but nothing that applies to our case.

 

How could we process the "Data" shown in the last column of the attached VI?

 

Thanks!

Download All
0 Kudos
Message 5 of 6
(6,664 Views)

Duplicate, please read here.

 

LINK

 

DirkW

0 Kudos
Message 6 of 6
(6,640 Views)