help with AEMNet CAN intergration

D153, D175, C125, C127, C185 and C187 forum

help with AEMNet CAN intergration

Postby bloit on Tue Nov 29, 2016 10:55 am

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 22386 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.
bloit
 
Posts: 13
Joined: Sun Nov 27, 2016 5:26 pm

Re: help with AEMNet CAN intergration

Postby adrian on Tue Nov 29, 2016 5:11 pm

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 22378 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 22378 times
adrian
MoTeC
 
Posts: 719
Joined: Mon Apr 13, 2015 5:16 pm

Re: help with AEMNet CAN intergration

Postby the_bluester on Tue Nov 29, 2016 5:24 pm

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.
the_bluester
 
Posts: 210
Joined: Wed Nov 04, 2015 9:30 am

Re: help with AEMNet CAN intergration

Postby adrian on Wed Nov 30, 2016 9:34 am

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.
adrian
MoTeC
 
Posts: 719
Joined: Mon Apr 13, 2015 5:16 pm

Re: help with AEMNet CAN intergration

Postby the_bluester on Wed Nov 30, 2016 10:32 am

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?
the_bluester
 
Posts: 210
Joined: Wed Nov 04, 2015 9:30 am

Re: help with AEMNet CAN intergration

Postby adrian on Wed Nov 30, 2016 11:36 am

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.
adrian
MoTeC
 
Posts: 719
Joined: Mon Apr 13, 2015 5:16 pm

Re: help with AEMNet CAN intergration

Postby the_bluester on Wed Nov 30, 2016 11:54 am

No problem, I will continue as is then.
the_bluester
 
Posts: 210
Joined: Wed Nov 04, 2015 9:30 am

Re: help with AEMNet CAN intergration

Postby bloit on Fri Dec 02, 2016 3:46 pm

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 !
bloit
 
Posts: 13
Joined: Sun Nov 27, 2016 5:26 pm

Re: help with AEMNet CAN intergration

Postby adrian on Mon Dec 05, 2016 8:50 am

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.
adrian
MoTeC
 
Posts: 719
Joined: Mon Apr 13, 2015 5:16 pm


Return to Colour displays

Who is online

Users browsing this forum: No registered users and 5 guests