Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to use Labview and RP1210 compliant hardware to connect to a truck J1939 bus and receive messages.

I am trying to use Labview and RP1210 compliant hardware to connect to a truck J1939 bus and receive messages. 

Specifically I am attempting  to read data frames using the RP1210_READMESSAGE .   am able to configure the hardware and send a message to the J1939 bus. .    I think I have not configured something correctly.  I can use the RP1210_SENDMESSAGE and see the message I have sent on the bus using CANalyzer   When I use the RP1210_READMESSAGE   I get the timestamp from a message and the return from the function sends back the correct number of bytes (the number matches the number of bytes I sent out plus four bytes from the timestamp).  What I am having trouble with is actually receiving the data. I have had the same type of behavior from two different hardware (Vector CANcase XL and Nexiq USB Link), so I don't think the issue is vendor specific.

Has anyone been able to make the RP1210_RECIEVEMESSAGE function work correctly?

 

Thanks for any help

0 Kudos
Message 1 of 4
(6,540 Views)

Hi,

 

Below I have attached a link to a Community example on our website where there are several examples using RP1210.

 

https://decibel.ni.com/content/docs/DOC-13164

 

I hope this helps!

 

 

National Instruments
0 Kudos
Message 2 of 4
(6,525 Views)

Thanks

I have already tried that.  The links are the NI RP1210 wraper. The problem I am having is using labview to interface with the RP1210 layer.  The RecieveMessage char*fpchAPIMessage this is the output which is a pointer to a cahracter array.  In this variable I can receive the timestamp of the message but not the message.  The retun showns the correct amount of bytes are aviaable (18 for a 8 byte message) but I can only get the 4 byte timestamp  I think I have to dereference this pointer to view the data.  I am not sure how to fix this. 

0 Kudos
Message 3 of 4
(6,514 Views)

I figured out the problem  The data returned contained 00x0 and it was considered a NULL char.  I changed and passed in an array of Unsigned 8 and that solved the issue

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