From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Components

cancel
Showing results for 
Search instead for 
Did you mean: 

J1939 Transport Protocol

Hello,

 

I am trying to use J1939 NI CAN Frame Example.vi available at: http://www.ni.com/example/31215/en/

 

My requirement is to read various messages and two of them may have size greater than 8 bytes. The message which may have size > 8 bytes is received at 1s while other messages which are of 8 bytes are received at 10ms.

 

When this VI is executed, I am able to see only one message which is transmitted at 1s. Other messages which are transmitted at 10ms are not seen as output in "Read Processed Incoming Message" loop.

 

Any idea on this?

0 Kudos
Message 11 of 17
(7,486 Views)

Hey,

 

I apologize but I need a little more information.  What are the messages you are trying to monitor (IDs)?  What driver are you using (NI XNET or NI CAN)?  Have you tried probing the NI XNET or CAN read VI to see if the messages some in at all?  What device address are you using for the code?

 

Ultimately, the code does some level of filtering out of messages based on who the message was intended for, etc.  Once I know the IDs and device address, I could tell you which ones should pass through.

 

More specifically, J1939 has the idea of peer to peer messages (PDU1 and Connection Mode) and global messages (PDU2 and BAM).  The code respects those rules so it will filter out messages that are peer to peer and not addressed to it.  If you open the Process Incoming Messages VI you can see the filter subVI and see that I don't pass through messages that aren't intended for the device.  You are welcome to modify that.  That said, it is outside of the intended use case so I am not sure how everything will work with that change.

 

I hope that helps!

Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
0 Kudos
Message 12 of 17
(7,469 Views)

Hi,

 

I have the J1939 Transport Protocol VI that can read or write CAN signals with the SAE J1939 protocol.

 

I would like te control the PVED-CC module, it is a Sauer Danfoss CAN Communication Interface Module (actuator)

This module is used to control a hydraulic PVG 32 (proportional valve group)

 

I know that the actuator send short SAE J1939 signals, because I measured it with a digital oscilloscope,  the signals are not log because they are fault messages. Because I didn't connect the valve group yet.

 

I have used two resistors of 220 Ohm, to make the bus terminations. I assume that the RIO Evaluation board (sb-9636) doesn't have a jumper where you can change the resistor onboard of the connector (on the CAN0 connector). So I took my own resistors to make the termination.

 

I can't get communication with the CC module in Labview, when the VI runs there is nothing that happens

I am not sure that with the VI, I can control the CC-module I used 254 as the current device adress and a baud rate 250000kbps and a Receive queue size of 5. 

 

I made two concersions in the Process Incoming Messages and the Output Processed Outgoing Messages loops. Because the clusters where not the same as the NI CAN , NI XNET or cRIO drivers uses. I uses bundle and unbundle function for clusters, to make the VI excecutable.

 

I attached the VI, as some information of the fault mode of the actuator

 

I can send messages from the VI to the bus, I measured them with my scope. But I can't confirm that they are SAE J1939 compatible

 

I am dutch student, and I need some help for my thesis. I would like to know if it is possible to control the CAN module by using controllers of National instrument

If the test suceed, we will buy the cRIO-9030 controller with the NI 9853 CAN module. Because it is almost the same hardware as the evaluation kit, I would like to use it as a test to proove that the hardware is compatile.

 

Links

 

NI J1939 transport protocol:

http://www.ni.com/example/31215/en/

 

Sauer Danfoss PVED-CC module:

http://files.danfoss.com/documents/520l0665.pdf

 

Thanks!,

 

Best Regards,

 

Gautier

0 Kudos
Message 13 of 17
(6,841 Views)

Hi,

 

This is a bettec picture of the VI

 

 

Thanks,

 

 

Gautier

0 Kudos
Message 14 of 17
(6,834 Views)

Is there a version of this example for LabWindows/CVI?  If not, could we please get one?

0 Kudos
Message 15 of 17
(6,729 Views)

I'm looking to extend the example code here to talk to multiple device addresses.However, I faced difficulties trying to extend it to multiple devices as I went into the sub-VI's such as J1939 Process Incoming Messages.vi. I am using NI-XNET communication.

0 Kudos
Message 16 of 17
(4,926 Views)

The ref document <http://www.ni.com/example/31215/en/> has an error:

In the description of the PDU S field, the value of PDU F is divided into two categories:

... If PDU F is greater than or equal to 240

... "If PDU F is intended for a specific device (less than 239)"

 

which of course does not include the value 239 itself.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 17 of 17
(3,847 Views)