Page 1 of 1

help with AEMNet CAN intergration

PostPosted: Tue Nov 29, 2016 10:55 am
by bloit
Looking for some help with AEMNet CAN setup with C125 dash. I have looked for an AEM template with now luck. Specifically I have an AEM Wideband failsafe installed. This supports CAN messaging for Lambda, fuel temp, ethanol content and alarm/failsafe status. - http://aemelectronics.com/files/instruc ... 0-4910.pdf

I think that I have figured out how to setup up the channels that occupy they entire byte (or multiple bytes). Where I am getting stuck is how do I create a channel for the message that are a Bit. I have looked at the webinars and videos and I think I am meant to use a bitmask, but not sure how.

here is the example
AEMNet.PNG
AEMNet.PNG (56.25 KiB) Viewed 22388 times


as you can see Byte 6 and & have multiple channels. How would I configure the CAN settings to support this.

Thanks for the help in advance.

Re: help with AEMNet CAN intergration

PostPosted: Tue Nov 29, 2016 5:11 pm
by adrian
The bit mask is a bitwise 'and' with the incoming channel so you need to select a mask that is only the bits you are interested in. Because it is an 'and' operation rather than a bit shift you end up with the trailing zeros still in place so you need a divisor as well. So for example if a particular channel is in bit 2 and has a value of 0 or 1 the result from applying a bit mask will actually be 0 or 4 so you need to divide by 4.
Bit Masking.png
Bit Masking.png (9.21 KiB) Viewed 22380 times


Below is a table of the values you will need for you bit channels. I am assuming that 'Alarm Source' is actually a 3 bit enumerated channel rather than 3 individual single bit channels.

CAN Channels.png
CAN Channels.png (9.71 KiB) Viewed 22380 times

Re: help with AEMNet CAN intergration

PostPosted: Tue Nov 29, 2016 5:24 pm
by the_bluester
I am glad to see the question asked and answer given. I am going to need to know that in my setup but did not require it yet so I had not properly researched it.

With the divisor, I assume that the channel in this case is not looking at the status of the bit but the binary value it would make in the byte, so bit 0 is a 1, bit 1 is a 2, bit 3 is a 4 as a binary value of the received binary "word" etc.

Re: help with AEMNet CAN intergration

PostPosted: Wed Nov 30, 2016 9:34 am
by adrian
With the divisor, I assume that the channel in this case is not looking at the status of the bit but the binary value it would make in the byte, so bit 0 is a 1, bit 1 is a 2, bit 3 is a 4 as a binary value of the received binary "word" etc.


Yes that is correct, hence the need for a divisor. The same goes for multi bit channels so if you have a 3 bit channel that is in bits 7-5 you need to divide by the value of the least significant bit so in this case you would divide by 32.

Re: help with AEMNet CAN intergration

PostPosted: Wed Nov 30, 2016 10:32 am
by the_bluester
This thread gave me a new question though it is not directly related to my dash. In the PDM I have a number of functions sent over CAN driving status displays on my dash using the non standard output messages.

Long story short, the single bit status messages are a bit wasteful as a whole message byte is sent to send a single bit 1 or 0 type status but I can not see a way to combine individual status bits so I could fir instance send 8 single bit status messages in a single byte and then pick the individual bits out at the dash end using bit masking.

Is there a way to do that in the PDM?

Re: help with AEMNet CAN intergration

PostPosted: Wed Nov 30, 2016 11:36 am
by adrian
The PDM is limited to only sending single bytes, there is no way to combine a number of single bit channels into one byte and send them all together.

Re: help with AEMNet CAN intergration

PostPosted: Wed Nov 30, 2016 11:54 am
by the_bluester
No problem, I will continue as is then.

Re: help with AEMNet CAN intergration

PostPosted: Fri Dec 02, 2016 3:46 pm
by bloit
After testing I can confirm that this worked perfectly.

This was my first post on the forum. It's great to get this type of support. Hopefully someone else sees this and gets the same value I got as well. Thank you !

Re: help with AEMNet CAN intergration

PostPosted: Mon Dec 05, 2016 8:50 am
by adrian
This was my first post on the forum. It's great to get this type of support. Hopefully someone else sees this and gets the same value I got as well. Thank you !

Glad I could help.