application input output vs j1939 input output for master modules

Zach 5 years ago in IQANdesign updated by Gustav Widén (System support) 5 years ago 3
I wondered about application inputs and outputs vs j1939 inputs and outputs for master module communication.
If I understood it correctly, an MC2 master received a digital value from an MD4 master module via an application in/out pair.
Then in another location in the program, the MD3 and MD4 exchanged information through J1939 pgns.

How do I know when to use Application in/out or J1939 in/out?
Satisfaction mark by Zach 5 years ago
Hello Zach.

There are a few thing to consider when choosing between the APPIN/APPOUT functionality and J1939.
This is from the IQANdesign instruction book page 344.

"Although normal CAN is highly reliable and has methods for error detection,
this is not considered sufficient for safety functions with a higher integrity.
To solve this and fulfill the requirements of IEC 61508, the real-time data
sent between masters for functional safety has additional methods for error
detection. This error detection is automatic when using APPIN/APPOUT."

So we have better error detection in the APPIN/APPOUT compared to J1939.
And it is much easier to set up compared to J1939, just add a APPIN and connect to a APPOUT and you are done.

One draw back of using APPIN/APPOUT is that everything you sent will use an entire CAN message each.
So if you are sending lets say 20 digital signals from one master to another.
If you use APPIN/APPOUT, there will be 20 CAN messages going out on the bus.
If you on the other hand use J1939, you can fit all those signals in one message and still have room over for more.

Rule of thumb (for 250 kbit/s) CAN utilization
Number of CAN messages * 0.7 ms
Must be lower than system cycle time
Must have margins

So, if you already have a high load on the bus and want to send a lot of different signals it would be better to use J1939.
As long as you don't want to send safety functions that is.

But if you want to send just a few signals it is much easier to use APPIN/APPOUT.

One thing to keep in mind also is that this is for sending real time data that is used in the other application.
If you want to use data from lets say a MC2 on the display of an MD4, you don't need to send the data at all.
This is done automatically via the diagnostic bus.
Just add the display element you want and chose the signal directly from the MC2 as input.
That was really informative, and well written.