NI VeriStand Add-Ons Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

J1939 Add-on Feedback

I have been using this for a while and we just ran into an issue that you may have direction on.  We have a device that is sending an address claim request message pretty frequently and we need to respond to all of them, however as the data in the message doesn't change we are only catching the first message.  Is there some method for identfying that a message has been received, even if it is the same data as the last message?

0 Kudos
Message 51 of 175
(4,469 Views)

Hey,

There isn't an option for this with the J1939 custom device.  The code would have to be updated to include a timestamp channel.  The workaround would be to spy the same network with a standard CAN device and use the timing channels from that. 

XNET.png

The downside to this right now is that this port can't be used for anything else.  For example, if the J1939 custom device is on port one, you can't use that same port with the CAN device.  You have to use another port with nothing running on it. 

I hope that helps!

Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
0 Kudos
Message 52 of 175
(4,469 Views)

That helps.  If I have time I may look into the Custom Device and see about adding in time.  For now though, I have one card that is designated for communication and one that was for monitoring.  The communication card is under the J1939 Custom Device, but the monitoring card isn't so I will just grab the time data from that card and pass it onto the model.

Thanks

0 Kudos
Message 53 of 175
(4,469 Views)

Daniel,

I have a functional question about the J1939 custom device.  My setup is a PXI chassis with 1085 CAN cards.  The CAN messages are being sent between a physical terminal that would be used by an operator in a tractor, and an internal controller that would talk to the terminal as well as monitor the rest of the machine.  I have been using the custom device in my VS project for some time now.  Mostly for reading the CAN messages being sent back and forth between the terminal and controller.  However, I recently decided to do some automation of my testing which requires VS to simulate a button press message from the terminal to the controller.  To do this I need to send the same message the terminal itself would send, but on a slightly different message address so it doesn't overwrite any messages being sent from the terminal itself.  Therefore I added a message in my database using the same PGN, Source address, and destination address, but changed the priority so the only thing different between the two signals is the Frame ID.  I assumed this would make it so the two signals wouldn't interfere with each other but would send along the same pathway so the controller wouldn't be able to distinguish between the two.  My message is being updated by a model in veristand that is controlled though the VS workspace.  Basically, when a button on the workspace is pressed, it updates the values in the message causing it to send to the controller.  However, I find that my message is also being sent to the controller every time the terminal sends any message to that same destination.  I'm hoping you can tell me how the custom device differentiates between messages with the same source and PGN, but with different Frame IDs.

Thanks,

Tyler

0 Kudos
Message 54 of 175
(4,469 Views)

I have a seperate question as well.  I have an incoming signal that I am monitoring for a specific value in VeriStand.  I logged all the channels values during an operation using the Embedded Data Logger custom device.  When a specific event happens on that message it will show up with our CanAlyzer device (used to monitor CAN traffic directly), but that signal value does not show up in our log from VeriStand.  Basically even though VS is logging at ~3000 Hz, it is missing a signal.  It does however catch the signals before and after the signal I want.  The transition time between signals is anywhere from .003 to .006 seconds.  Thoughts on how to speed things up or why I am missing some signals?  It happens only 1/10 times, but I would like it to not happen at all.

0 Kudos
Message 55 of 175
(4,469 Views)

Hey,

The custom device only supports one PGN per source address/destination address combination.  Priority is mostly ignored in the custom device expect when generating the message on the bus.  I could be wrong but I thought this was how things had to work.  Take a request for example, a J1939 request only allows you to request a PGN.  There is no priority in PGN.  If you have two of the same PGNs, how do you know which one to respond with?  This is also true with all the transport protocols.  They say which message is being sent by PGN (ignoring priority).  If there are multiple same PGNs, how do you know which one is being sent?  Again, I could be wrong but I thought that was expected operation. 

As for the missing signal, you may want to look at the Incoming Process Rate [Hz] on the J1939 main configuration page.  You may have already done this but it should be set fast enough to see the signal.  Internally, it is limited to 1 kHz.

I hope that helps!

Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
0 Kudos
Message 56 of 175
(4,469 Views)

Hello Daniel,

Thank you for sharing useful add-ons with us. One of our customers has reported us an issue that can improve this add-on.

The add-on includes a workspace control named SPN Indicator. When you put one on the workspace, you will be asked to select a channel for it. After you specify one, you can check which channel is selected by right-clicking the indicator. However, if you close the workspace and open it again, you will find that the information of selected channel cannot be seen. This behavior seems different from those of built-in workspace controls (such as Numeric Indicator - Gauge), which shows the selected channel after the workspace is closed or VeriStand is shut down.

An AE told me that the following web page shows the mechanism that workspace controls can reload the data when the workspace is opened.

Creating Custom Workspace Objects for NI VeriStand - National Instruments

http://www.ni.com/white-paper/9989/en/

It seems some implementation is required for J1939 - SPN Indicator.vi and/or J1939 Select Channel Dialog.vi in J1939 Workspace Objects LLB.llb. Could you update the add-on if you think you need to fix?

Regards,

Naoki Hayata

NIJ AE

0 Kudos
Message 57 of 175
(4,469 Views)

Hey,

Thanks for the feedback!

Just to be clear, I think you are saying that everything functionally works with the control, even after closing and re-opening the workspace.  However, if you right click and try to view the text for the selected channel, it is blank.  So, the channel itself is still actually selected, retained, and working, but the right click selection box show that information.  Is that correct?

Again, thanks for the feedback!

Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
0 Kudos
Message 58 of 175
(4,469 Views)

Absolutely right. Just to be sure, I attach a document that describes what I mean. I have been trying to do this implementation by myself, but it does not work well. Please consider if you can work for this in the future.

Thanks,

NH

0 Kudos
Message 59 of 175
(4,469 Views)

Daniel,

any chance I could get the Source files for LV 2013?  I am thinking about adding some specific functionality to the custom device and would like to take a look at the code.  Thanks.

0 Kudos
Message 60 of 175
(4,469 Views)