Author Topic: Transmit to J1939 device  (Read 6507 times)

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 108
  • Karma: +0/-0
    • Dewind Dewatering
Transmit to J1939 device
« on: January 13, 2016, 05:37:01 PM »
I have an inclinometer hooked up and reading my angles on my boom. I am able to read the angle values just fine but I need to reset where zero is. Due to how I have the device mounted I am on the edge of 359 and 0 degrees so it gives me some crazy numbers. I am attempting to send information to the sensor to do the reset. From what I can tell via the canking I am transmitting on the correct ID and byte 1 and 2 are the values I am needing to send. Could someone check this out to see if what I intend to transmit is not what I am transmitting?

I have included the canking output, the top line is from the MC024-020 the bottom line is the sensor, values on byte 2 and 3 should be 0 and 5 respectively if the setting takes.

Any suggestions?

Thanks,
Mike

Offline spittet

  • PLUS+1 Guru
  • *****
  • Posts: 113
  • Karma: +5/-1
Re: Transmit to J1939 device
« Reply #1 on: January 13, 2016, 06:37:30 PM »
The only thing I can say based on the info you provided is that the CANKing output reflect exactly what you are sending in your PLUS1 GUIDE screenshot. Now, is it the way the angle sensor want it to be, nobody can verify unless you post a datasheet of the actual sensor with a detailed description of the CAN communication protocol.

Sam

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 108
  • Karma: +0/-0
    • Dewind Dewatering
Re: Transmit to J1939 device
« Reply #2 on: January 13, 2016, 07:00:48 PM »
I signed an agreement not to share the "proprietary confidential information" so for now I guess I'll just wait for a response back from the manufacturer.

Thanks anyway sam

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 108
  • Karma: +0/-0
    • Dewind Dewatering
Re: Transmit to J1939 device
« Reply #3 on: January 14, 2016, 02:34:59 PM »
Alright, so I think my issue is in how the controller sends data onto the bus.

I need to send

0x0CEFEC19, with data 0xAB 0xCF

which should translate to

 0b11001111

I need to somehow send that to my device.

I think the controller is just sending a value rather than binary?

Any ideas?

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 108
  • Karma: +0/-0
    • Dewind Dewatering
Re: Transmit to J1939 device
« Reply #4 on: January 14, 2016, 03:18:24 PM »
I finally got it to work. My issue was the last 2 of the can ID, instead of 19 which is my device ID I changed this to FF and it worked. Also I used the can message on canking to transmit.

YAY!

Offline spittet

  • PLUS+1 Guru
  • *****
  • Posts: 113
  • Karma: +5/-1
Re: Transmit to J1939 device
« Reply #5 on: January 14, 2016, 06:57:25 PM »
If I'm not mistaken, the last 2 digit are the CAN ID node and setting it to FF means "broadcast to everyone". So, maybe the real CAN node ID of your device wasn't 19.

In your CanKing output picture in your post #1, is the other CAN frame what you are receiving from the device? In this case, I would say that your device CAN node ID is EC (217060588 converts to 0x0CF014EC).

Anyway, it's a good thing you have it working.

Sam