PLUS+1 User Forum

PLUS+1 Software => Communication => Topic started by: Cranes on January 23, 2013, 01:24:26 AM

Title: J1939 Generic PGN
Post by: Cranes on January 23, 2013, 01:24:26 AM
I have a J1939 CAN device I need to read length, angle, force and switch status. The vendor is saying I need to create a generic PGN. I see that starting with PGN65280 in the 1939 standard references "Manufacturer Defined Usage". There is not a block for this in the function library. How would I create this? I'm not connecting to an Engine. Could I use an existing Engine PGN block that has the DATA format I need?

Thanks,
Jeff
Title: Re: J1939 Generic PGN
Post by: Neil on January 23, 2013, 06:51:19 PM
Hi Jeff.

I would map the device from the output window in CANking, build my CAN recieve buffer from the information thats transmitted.
Then build into the CAN recieve buffer any scaling that converts the bit/byte value into the length, angle etc you are intersted in.

regards Neil.
Title: Re: J1939 Generic PGN
Post by: Cranes on January 29, 2013, 01:17:25 AM
Neil,
CAN King identified the ID clearly (FF0354). I'm now able to read the data. My problem is the sensor only issues new data when there is a change. I get the correct data but then filled with zeros when logging (see attached). CAN King never shows zero for that ID. Do I have my Rx specified correctly?

Thanks,
Jeff
Title: Re: J1939 Generic PGN
Post by: hproffitt on January 29, 2013, 02:51:00 PM
On the last page of your attachment, you show your program forcing the value to "0" if a message is not received in 120 milliseconds.  Since your sensor only outputs on a change, your program is forcing it to "0" when it doesn't change.  I would suggest either expanding the time on the off delay feeding the switches, or getting rid of it all together if it will not cause an unsafe situation.
Title: Re: J1939 Generic PGN
Post by: Neil on January 29, 2013, 07:41:01 PM
Hi Jeff

Another method would be to capture the last value to memory, see the attached.

Regards Neil.