|
|
View previous topic :: View next topic |
Author |
Message |
lecutus
Joined: 12 Aug 2009 Posts: 40
|
Simple CanBus question. |
Posted: Tue Dec 29, 2009 3:17 pm |
|
|
Simple CanBus question. Does the Can bus always send out info or does it have to be asked?
Situ:
I trying to rewrite a engine control package, sending/receiving parameters. Sending parameters to change rpm, gear, etc. Receiving from the engine as to confirm what it thinks it did; on board parameters.
As it stands I can write to the eeprom: id, engine, trans. I can see the display of this information in hyperterminal.
When checking can_kbhit, it reads 0. From what I understand this means nothing in the can buffer. So how to fill it is the question.
What 's supposed to happen
Check buffer
check for id that matches truck to be process – multi truck scenario
yes – parse string to its basic components.
Send via rs232 for further processing and display at outward controller/gui
Send from outward controller/gui parameters back to can bus.
Check buffer.
I'm using j1939.
Thanks
L.
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Dec 29, 2009 5:07 pm |
|
|
CAN bus controllers have a "listen only" mode. It's listed as one of the
modes in the CCS drivers. I haven't used this mode.
Quote: | enum CAN_OP_MODE {CAN_OP_CONFIG=4, CAN_OP_LISTEN=3, CAN_OP_LOOPBACK=2, CAN_OP_DISABLE=1, CAN_OP_NORMAL=0}; |
For more information, Google for this:
Quote: | can bus data logger listen only |
However, I think you're really asking, does your particular vehicle
send out all the information that you desire onto the CAN bus at
a periodic rate. |
|
|
lecutus
Joined: 12 Aug 2009 Posts: 40
|
|
Posted: Wed Dec 30, 2009 8:50 am |
|
|
Awright, let me reiterate.
I, as the user may need to send information, such as gear, rpm, to effect the engine.
The engine is to send back information as to its current situation.
That simple.
L. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|