Jump to content

Recommended Posts

Hello!

If anyone has any experience or any examples of using the SAEJ1939 Protocol, I would really appreciate some help. I am using a NOx sensor and would like to extract its data to an HMI. 

I am currently trying to figure out how to utilize the parameters of the J1939 Protocol. I have the values of the Protocol from the user manual but I do not know how to interpret it for the Visilogic Function blocks. For example, to extract the NOx value would I say there are 2 bytes of max data allowed? (Since there a low and high bytes). And for data pointers, does it "point" to the address of a byte or a bit? Also, once the data is received, where would it be stored? And how can I convert it to a readable value? Would I have to convert it from a BIT to a NUM eight times (Since I get a bit of information and not a byte)?

I would really appreciate any thought or comments.  I have attached the manual, some screenshots, and my program so far. 

Thanks again. 

Screenshot (2).png

Screenshot (3).png

trial j1939.vlp

 

Conti UniNOx12V_spec_11 03 08 (1).pdf

Link to comment
Share on other sites

Hello, so for that code, it would make an array of all the bits of the J1939 Protocol. Would it be correct to assume that I could convert that array into a a readable number by the function BIT to NUM? And also, I think I figured something out, from what you said. The bit array will start say, on MB 1000, as the example, therefore the first 8 bits would be on MB 1000-10007. So if I needed the first 8 bits only, would it look something like this?  

The formula at the end is to convert the NOx value into ppm (parts per million). 

 

I once again thank you for your help!

Screenshot (4).png

J1939 TRIAL V2.vlp

Link to comment
Share on other sites

  • MVP 2023
20 hours ago, Sergio Ramos said:

The bit array will start say, on MB 1000, as the example, therefore the first 8 bits would be on MB 1000-10007. So if I needed the first 8 bits only, would it look something like this? 

Yes, Visilogic have all needed FB for convertion. One thing that you must do - find the way to test - is it reading from sensor correct.

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.