SNAP-SCM-CAN2B for Vehicle use

I saw that post, and I am using that as a way to time stamp the data as it comes out of the SCM. However, there are 2 issues. Since this is already post buffer, the time stamp is on the packet when I see it, not when it is received. More importantly, since several hundred packets can come in a second, hundreds of packets will have the same time stamp. I ran a seperate chart that runs with a 1ms delay and counts the closest I can get to “milliseconds” and I stamp each packet as I see it with a hh:mm:ss:mmm in a string table. This makes almost, but not all of the packets have a unique time stamp. What I was hoping for was a way to have a clock in the SCM stamp the data as it comes in off the line, but what I need the most is a good way to do milliseconds.

So, you’re saying you’d like an option to expand that timestamp coming from the module? (I’m assuming here that you’re currently getting hh:mm:ss and you’d like to add .mmm or something on the end.) I’m also wondering if those timestamps were not unique (because they come faster than once per millisecond), that would still be a problem?

I’m still not clear on the bigger problem you’re trying to solve here… do you need an absolute time stamp; meaning you want to tell the boss that a particular packet was received on Oct 22, 2015 at 11:01:55.126?Or do you need more of a relative time stamp; e.g. the relative time difference from receiving packet x to receiving packet y?

2 things: I want to use the CAN data to calculate (integrate) energy consumption, and I want a unique time for each message.
The fake time stamp I am using now gives me the unique stamp, and so far that is working fine, but, I can tell things get slowed down when the time stamp ms only go up to the 800s.
The energy calculation requires that I know the exact time between CAN messages, as close to when they were created as possible. They come between 100 and 200 ms. intervals. My current “fake” clock gives me a result that only occasionally looks accurate.

I am about to start using this module and I’m trying to find everything I can get. An example strategy for getting temperature from another device and sending an ascii command via CANOpen would be awesome. Sorry to hijack the thread.

Did you find this integration kit?

Hello All,

I have power (LED 3 is lit) and I can set the correct baud rate for this vehicle (500,000) and flash it to the module successfully. I have tapped CAN-Hi and CAN-Low wires in the truck and connected to pin-2 and pin-3 on the module with and without 120-ohm resistors at both ends. I have also tried grounding pin-4 on the module with chassis ground or signal ground, in addition I have tried applying 12V to pin-1. I am not seeing any data regardless of any of the above configurations.

Can someone help me to understand how to set things up so I can receive data? Obviously I am missing something here.

Thanks,

DigMoto

Hey DigMoto,

I think what you may be “missing” is on the strategy side of things rather than the hardware. Are you having something run a continual loop to read in the received table? Are you keeping track of all arbitrations/node ID’s received? Are you sure something is happening on the bus for you to sniff? Generally I think you do want the 120 ohm resistors on each end between CAN low and CAN hi.

Thanks for the reply, Trezor. We do have a continuous loop running to look for characters received as well as monitoring the module LED’s for blinking status – no activity. Any other suggestions?

Thanks,

DigMoto

For my application a SDO only gets sent (Activity happens) if I ask for it with my strategy. I ask for a specific parameter’s value by using a specific “command” (something like hex 40 if I remember right) along with the address and then I get a reply that includes the parameter’s index and value. For a PDO communication nothing is transmitted if nothing has changed. I found this rather surprising because I was expecting to be able to just look for the data being transmitted on the bus and if I’d missed the transmission it would get magically resent. Ha. I also noticed that if my delays were wrong(the defaults seem to work) that I wasn’t getting the transmissions. I also found that for a high activity bus I had to increase the length of the table in the subroutine. (I think it started at 250, when I put the length at 10 it really didn’t work, at 999 it has been working more like I’d expected.) I don’t remember the name but it is something like the received frames table. Also I couldn’t get the send receive chart to receive very well. (probably my error somewhere, so I’m using the receive only chart on a loop and just call the send only when I want to send something and I just leave the receive chart running.) Another side note- I’m not sure how to take the module “out” of transmit mode, so I only put it into transmit mode on power-up. Hopefully one of these ideas helps, I’d be interested to hear what it was when you get it working. Good luck!

Hi All, resurrecting this thread in a desperate attempt to make progress. I have been stuck at the same point in my development for a month now: Known “good” 11-bit CAN data is arriving at my module physically (electrically), but no matter how wide open (all zeros) I set the masks and filters, and no matter what baud (It’s a GM engine running at 500k), I cannot get the firmware inside the opto CAN module to light up even once to tell me it sees a valid CAN frame pass by. The same port has been used by my USB CAN logger for years, but we could really benefit from rolling everything into Opto instead…

I’m already hooked into support, but if anyone has any ideas why good CAN data would not light up the “1” LED on the module, let me know! Thanks.

–J–