Page 1 of 1

On/off inputs from CAN?

PostPosted: Wed Feb 15, 2017 8:06 am
by MWPau
Hi all,

Is there a way to use on/off inputs from "can receiving" type data?
I would like to use a CAN switch panel to enable/disable antilag, table switch, etc, etc.

Thanks.

Re: On/off inputs from CAN?

PostPosted: Wed Feb 15, 2017 5:05 pm
by dontz125
Sure! Take fuel table switching as an example. You need to turn 'Fuel table switching' ON, then set 'Switching input source' to Hardware. In the drop-down box, in addition to all the physical inputs on the MS3, you'll also find CANIN1-8. These are input pins on the CAN device. Obviously, you also need to configure the CAN device and the MS3 CAN section in TS.

Re: On/off inputs from CAN?

PostPosted: Wed Feb 15, 2017 5:07 pm
by jsmcortina
I think the OP is after a way to use the generic "CAN Receiving" to listen out for standard CAN messages and set that data into "CANIN". That's not presently possible, though doesn't sound too difficult.

James

Re: On/off inputs from CAN?

PostPosted: Wed Feb 15, 2017 5:29 pm
by dontz125
Alrighty then ... Unless I'm misunderstanding how this works, it IS do-able, but it's a 4-window process.

1) Set up CAN Receiving to receive info for 'Local variable / channel' CANADC01; details for that is left as an exercise for the student :lol:
2) Set up Generic Sensor01 'Sensor - Source' as CANADC01; use 'RAW' transformation
3) Set up Loop1 (in Programmable On/Off Outputs2) to activate when Sensor01>1000, hyst 100 (assuming a Turn On = Going High)
4) Set up Fuel table switch as above, except the Input pin is set to Loop1

Thoughts?

Re: On/off inputs from CAN?

PostPosted: Wed Feb 15, 2017 7:08 pm
by racingmini_mtl
jsmcortina wrote:I think the OP is after a way to use the generic "CAN Receiving" to listen out for standard CAN messages and set that data into "CANIN". That's not presently possible, though doesn't sound too difficult.

James

If you do have a look at this, it might be a good idea to do it in such a way as to cover all the polling groups defined in ms3_can.c so that the code can receive broadcast CAN messages (standard CAN and not Al-CAN) instead of polling for the data. These would be raw data that is treated the same as the current polled data.

Jean

Re: On/off inputs from CAN?

PostPosted: Wed Feb 15, 2017 10:32 pm
by MWPau
dontz125 wrote:Alrighty then ... Unless I'm misunderstanding how this works, it IS do-able, but it's a 4-window process.
1) Set up CAN Receiving to receive info for 'Local variable / channel' CANADC01; details for that is left as an exercise for the student :lol:
2) Set up Generic Sensor01 'Sensor - Source' as CANADC01; use 'RAW' transformation
3) Set up Loop1 (in Programmable On/Off Outputs2) to activate when Sensor01>1000, hyst 100 (assuming a Turn On = Going High)
4) Set up Fuel table switch as above, except the Input pin is set to Loop1
Thoughts?


That might work, but :shock: :lol: .
There really should a better method than that.
Thanks for giving it some thought though :)

racingmini_mtl wrote:
jsmcortina wrote:I think the OP is after a way to use the generic "CAN Receiving" to listen out for standard CAN messages and set that data into "CANIN". That's not presently possible, though doesn't sound too difficult.
James

If you do have a look at this, it might be a good idea to do it in such a way as to cover all the polling groups defined in ms3_can.c so that the code can receive broadcast CAN messages (standard CAN and not Al-CAN) instead of polling for the data. These would be raw data that is treated the same as the current polled data.
Jean


Yes, that's correct James.
And Jean... it would be perfect if that could be the case.
I know it'll take some extra effort (probably quite a bit more), but really CAN inputs should also have a default value, and a timeout.

Same goes with outputs too for that matter... fan control, fuel pump control, etc all over standard can bus packets.

Re: On/off inputs from CAN?

PostPosted: Fri Feb 17, 2017 10:49 am
by pit_celica
It might be a good idea if you posted the CAN switch panel you plan to use with the related CAN Comm doc for this product. If they use a standard CAN frame (like J1939), maybe MS could use it more easily.

Sam

Re: On/off inputs from CAN?

PostPosted: Sun Feb 19, 2017 1:42 am
by MWPau
It doesn't exist because i haven't made it yet ;)

J1939 is a standard, but its not "the" standard, and there is no need to over complicate CAN coms by using such systems (the MS CAN bus command/packet format is a good example).
Keep it simple like most other aftermarket ECUs do. An address (11bit or 29bit), and 8 bytes of packed variable data, or a shorter packet of on/off value bits.

Re: On/off inputs from CAN?

PostPosted: Sun May 07, 2017 4:38 am
by sturgeo
Did you get any further with this?

Re: On/off inputs from CAN?

PostPosted: Mon May 08, 2017 7:56 am
by MWPau
Nope.
I'm hoping its on a MS3 firmware to-do list somewhere, but the lack of response means i'm not holding my breath.

Re: On/off inputs from CAN?

PostPosted: Tue May 09, 2017 2:16 am
by sturgeo
I've got a CAN controller & transceiver on the way to use with an Arduino, will be using 11bit addresses and standard frames to keep it simple.
I'll be using it primarily for analog control inputs (boost table blend for example) however it'll be nice to free up some of the Digital Ins on my MS3X.
My idea was to send specific values (255/0 for on/off) and use dontz125's 4 way method, not sure on the overheads this'll create but being able to set this up directly in the "CAN Receiving" tab would be advantageous.

Re: On/off inputs from CAN?

PostPosted: Wed Jan 03, 2018 6:28 am
by Suprazz

Re: On/off inputs from CAN?

PostPosted: Sat Jan 06, 2018 6:54 pm
by MWPau
MWPau wrote:Nope.
I'm hoping its on a MS3 firmware to-do list somewhere, but the lack of response means i'm not holding my breath.


I'm glad i didnt :lol: