I make my own IO board with CAN communication.
Problem is, when I try to use digital ports. Setting CANOUT1-8 on CAN parameters.
Megasquirt send's CAN messages ok with remote CAN id, Table and offset. But when Output goes 0 --> 1 only one message is right value with "1" and next messages with "0". So the output is only very short time on but it shod be on all time.
Example:
Shift light is set to CANOUT1
RPM's go up, shift light shoud lit.
ID 19661496 (table 7, to_id 5, from_id 0, msg_type 0, offset 75) ext=1 len=1, data in byte[0] = 1000000 // This message is ok.
Next messages:
ID 19661496 (table 7, to_id 5, from_id 0, msg_type 0, offset 75) ext=1 len=1, data in byte[0] = 0000000 // wrong, should be same as above.
ID 19661496 (table 7, to_id 5, from_id 0, msg_type 0, offset 75) ext=1 len=1, data in byte[0] = 0000000 // wrong, should be same as above.
ID 19661496 (table 7, to_id 5, from_id 0, msg_type 0, offset 75) ext=1 len=1, data in byte[0] = 0000000 // wrong, should be same as above.
CAN communication problem CANOUT *SOLVED*
Moderators: jsmcortina, muythaibxr
CAN communication problem CANOUT *SOLVED*
Last edited by micco80 on Thu Mar 01, 2018 1:18 am, edited 1 time in total.
Re: CAN communication problem CANOUT
Can you post a screen shot of the settings for the shift light? You may have something wrong there.. ie. if RPM == 6000 then on, should be.. if RPM >= 6000 then on.
Ryan
What hardware are you working with, MS and IO board?
Ryan
What hardware are you working with, MS and IO board?
306 SBFord, Torquer II EFI intake, 60 lbs injectors, 8 LS2 coils, VS Racing 7668 turbo, 4R70W, MS3x fw1.4 w/built in trans controller.
Re: CAN communication problem CANOUT
Here the settings of CAN and shift light. I think at those are Ok.
I use Arduino leonardo board with MCP2512 CABbus-controller.
I'll upgrade the old mechanical gauge cluster to CANbus version.
Speedo, Odo and Rpm gauges use stepper motors and warning lights control through the CANbus.
http://www.hobbytronics.co.uk/arduino/leonardo-canbus
I use Arduino leonardo board with MCP2512 CABbus-controller.
I'll upgrade the old mechanical gauge cluster to CANbus version.
Speedo, Odo and Rpm gauges use stepper motors and warning lights control through the CANbus.
http://www.hobbytronics.co.uk/arduino/leonardo-canbus
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 39618
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: CAN communication problem CANOUT
Attach an MSQ and a datalog of it happening.
EDIT: Also, for a straightforward dash, listening to the standard CAN broadcasts is typically easier.
James
EDIT: Also, for a straightforward dash, listening to the standard CAN broadcasts is typically easier.
James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Re: CAN communication problem CANOUT
I find the problem.
In MS3 setting I have CANIN and CANOUT active because I need both.
When MS3 reads CANIN with MSG_REQ message for CANIN. In the message a variable msg_req_data.values.varbyt say's how many bytes are the MSG_RSP reply message.
In my code it was the permanent 8 bytes. So I tested and verify this and when it send right amount of bytes it's working, I thing when reply is too long it's write zeros over the MS3 CANOUT registers.
Old code: txmsg.len = 8; and new working code is: txmsg.len = msg_req_data.values.varbyt; when assemble the reply CAN message.
-Mikko
In MS3 setting I have CANIN and CANOUT active because I need both.
When MS3 reads CANIN with MSG_REQ message for CANIN. In the message a variable msg_req_data.values.varbyt say's how many bytes are the MSG_RSP reply message.
In my code it was the permanent 8 bytes. So I tested and verify this and when it send right amount of bytes it's working, I thing when reply is too long it's write zeros over the MS3 CANOUT registers.
Old code: txmsg.len = 8; and new working code is: txmsg.len = msg_req_data.values.varbyt; when assemble the reply CAN message.
-Mikko