LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending J1939 messages from LabVIEW 8.0 to a CAN device using NI USB-8473s

I need to send J1939 messages over a CAN bus using LabVIEW 8.0.  I have been trying to use the example for Event Based Transmission in LabVIEW Example Finder but I cannot figure out what or how to set the arbitration ID or the data bytes.  Can anyone please help?  I am using the NI USB-8473s CAN interface.

For example, a message that I receive from the CAN device using the Frame API CAN Receive VI is:

2CFD93EA

With the Data:

D0 FF FF FF FF FF FF FF

So I just want to reverse this action and be able to send the message from LabVIEW.

Thanks,
Eimear
0 Kudos
Message 1 of 4
(3,785 Views)
Hi Eimear,

Please can you try running the example CAN Transmit Multiple, it is located here:
C:\Program Files\National Instruments\LabVIEW 8.0\examples\nican\Frame - Basic.llb\CAN Transmit multiple.vi

This will allow you to set specific arbitration IDs for every frame you transmit, as well as stating the data length.

I have also found some links for you. If you need to transmit data that is over 8 bytes in length, then you will need to look at this post.
There is also this KB post that might give you a pointer.

Regards
JamesC
NIUK and Ireland

It only takes a second to rate an answer 🙂



Message Edited by JamesC on 04-14-2008 10:28 AM
0 Kudos
Message 2 of 4
(3,757 Views)
James,

Thanks for replying.  I've been trying to use both the Event Based transmit VI and the Multiple transmit VI in the Frame API examples, but cannot get the message to transmit properly to my device.

I have been told that the following message should work:

18EAEA23D3FE00

Where FED3 is the Parameter Group number and 23 is a randomly chosen Source Address.

Therefore, I've taken the Arbitration ID to be 00FED323.

I've taken the message data to be EA EA 18 (3 data bytes).

However, this will not send and perform the operation on the CAN device.  Can anyone help?

Eimear
0 Kudos
Message 3 of 4
(3,739 Views)

Hi Eimear,

There is a few functions from the Frame API CAN interface that we don't support when using our USB 847x devices.  If you are using the Read Multiple and Write Multiple states it would not work

as described in the following link. Are you using some of the functions described in the following link?

http://digital.ni.com/public.nsf/allkb/E1A44077DA6C819186257288006B76D7?OpenDocument

Let us know how you get on,

KostasB

NI UK Applications Engineering

0 Kudos
Message 4 of 4
(3,686 Views)