Keypad use with C127

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

Keypad use with C127

Postby the_bluester on Sat Jan 30, 2016 5:07 pm

Posting this up for a friend. He has an M84 ECU, a PDM15, a 15 button keypad and a C127 dash. His ECU is wired to the CAN2 bus of the C127 and the PDM is as well, his switch functions for the PDM operate as they should (Start, stop, wipers etc)

What he is looking to do is to use buttons on the keypad as page up and page down on the dash. As the more technical person he knows he is getting me to go into it for him but I have not worked with Motec stuff a lot yet. I can work out how to assign page up and page down names to unused buttons in the PDM manager and have the PDM send the button messages out on the CAN bus (using message 0, address 520)

Where I am falling down is getting the messages into the C127. I have him going into connections>communications in dash manager, then selecting new to create a receive template but I am not familiar enough yet with the setup to get it right.

At the moment we have selected New> then set up the device as "Receive message", format as fixed binary, normal alignment, 2200ms timeout. CAN settings are standard address, 520 to match the output address in the PDM. Hopefully that is right so far.

Where I am foundering is in the received channels setup, we tried single and added channels 1 and 2 as display page up and page down buttons but he reports no joy. Should it be a compound message type?

Any help will be appreciated, I am looking to go down this route myself this year so any learnings I get will carry over into my own project.
the_bluester
 
Posts: 210
Joined: Wed Nov 04, 2015 9:30 am

Re: Keypad use with C127

Postby David Ferguson on Mon Feb 01, 2016 2:15 am

The first thing I would do is ask your MoTeC dealer if there is a template for the Keypad. It's likely there is. If not, the dealer can probably help you create the necessary comms template.

There are webinars on CAN messaging that might also be useful to you. Something to watch out for. Sometimes CAN addresses are specified as decimal and sometimes as hexadecimal. 0x520 (also written as 520h) is different than the decimal value 520.

The first thing to do is make sure you are receiving messages at the correct address. To do this, be sure to set up a diagnostic channel, and use the Monitor Channels function in the Dash Manager to view it's value. You will get an error value of 512 until messages are received. Once you are sure that is happening, then you can start decoding the messages.
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1379
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Re: Keypad use with C127

Postby the_bluester on Mon Feb 01, 2016 6:40 am

Thanks, I will get the owner to see if there is a template with the dealer he bought the gear from. Unless it is easier to debounce (If that is required) via the PDM I would also have thought it would be simpler to directly receive the keypad messages in the dash than use the PDM as an intermediary.

It is a little tricky helping him as we live a couple of hundred KM apart.
the_bluester
 
Posts: 210
Joined: Wed Nov 04, 2015 9:30 am

Re: Keypad use with C127

Postby Stephen Dean on Mon Feb 01, 2016 9:24 am

Hi,

You need to have the messaging from the PDM to the dash matching at both ends, and the messages need to be received as 8bit channels.

PDM CAN Outputs setup
PDM1.jpg
PDM CAN Outputs setup
PDM1.jpg (55.27 KiB) Viewed 20629 times


Dash Receive Template
PDM2.jpg
Dash Receive template
PDM2.jpg (65.69 KiB) Viewed 20629 times


Received Channels
PDM3.jpg
Received Channels
PDM3.jpg (49.65 KiB) Viewed 20629 times


Channel Setup
PDM4.jpg
Channel Setup
PDM4.jpg (36.43 KiB) Viewed 20629 times
Stephen Dean
MoTeC Research Centre Melbourne, Australia
User avatar
Stephen Dean
Site Admin
 
Posts: 1721
Joined: Tue Dec 02, 2014 10:29 am
Location: Melbourne

Re: Keypad use with C127

Postby the_bluester on Mon Feb 01, 2016 9:44 am

Thanks very much Stephen, I had gotten very close to the mark with what I had done googling the CAN protocol to learn more about it. I had not got the bit mask correct so I assume that the message was being filtered.

The only difference I have there from the PDM side is it is sitting on address 520 not 521, I assume that does not matter so long as I set the receive template in the dash to match and it does not clash with anything else on his CAN bus? That is unlikely as he at this stage has the C127, an M84, PDM and keypad as the only items on the bus.
the_bluester
 
Posts: 210
Joined: Wed Nov 04, 2015 9:30 am

Re: Keypad use with C127

Postby Stephen Dean on Mon Feb 01, 2016 12:04 pm

That's correct, the address used can be 520, I just have the 521 value in there as I have hidden the 520 messages in this post. :D As long as there is a match in the addresses and no conflicts on the CAN, you can use a different number.
Stephen Dean
MoTeC Research Centre Melbourne, Australia
User avatar
Stephen Dean
Site Admin
 
Posts: 1721
Joined: Tue Dec 02, 2014 10:29 am
Location: Melbourne

Re: Keypad use with C127

Postby the_bluester on Mon Feb 01, 2016 12:39 pm

Thanks Stephen.

A related question, browsing webinars looking for information and seeing 8 channels in an 8 pit frame, are these user messages configurable in the PDM purely on/off-true/false type channels as it would seem? Just for my own future reference when the budget stretches to a PDM.

Paul.
the_bluester
 
Posts: 210
Joined: Wed Nov 04, 2015 9:30 am

Re: Keypad use with C127

Postby Stephen Dean on Mon Feb 01, 2016 3:19 pm

Hi Paul,

The 8 channels per address can be selected from multiple locations in the PDM (Inputs, Outputs, Functions, Status's and Keypads), and can transmit values as well. You also have 4 sets of them that can have different addresses.

As an example, the Function.Anti.Lag message that I have earlier transmits 0, 1, 2, 3 in the message, this is then translated in the M1 as a Driver Rotary Switch voltage value.
Stephen Dean
MoTeC Research Centre Melbourne, Australia
User avatar
Stephen Dean
Site Admin
 
Posts: 1721
Joined: Tue Dec 02, 2014 10:29 am
Location: Melbourne

Re: Keypad use with C127

Postby the_bluester on Mon Feb 01, 2016 3:33 pm

Thanks, I will have to go out and gather a bit more CAN knowledge. It will make things easier when I get my own gear.
the_bluester
 
Posts: 210
Joined: Wed Nov 04, 2015 9:30 am

Re: Keypad use with C127

Postby the_bluester on Mon Feb 01, 2016 9:54 pm

Got the function he was after working thank you, and threw in indicator telltales for him to boot. Just had to work out some user conditions that are set up (By default I assume) to have the next line button set up to be the mode button for a longer press and similar functions.
the_bluester
 
Posts: 210
Joined: Wed Nov 04, 2015 9:30 am

Next

Return to Colour displays

Who is online

Users browsing this forum: No registered users and 9 guests

cron