PDM/Keypad CAN-output to M800

Discussion and support for MoTeC Power Distribution Modules

PDM/Keypad CAN-output to M800

Postby cotje on Tue Apr 13, 2021 5:20 am

Hi all,

Got my Keypad/PDM30/M800 setup working quite well but stuck on CAN-outputs. Would like to send a Keypad button cylce-state over CAN to my M800 and use it as an Y-axis for a table. The idea is to use a button to step through 3 Turbo-boost levels and create an overboost table to drive the overboost-valve.
Is this even possible? If so, how?
cotje
 
Posts: 72
Joined: Mon Oct 07, 2013 5:50 am

Re: PDM/Keypad CAN-output to M800

Postby David Ferguson on Tue Apr 13, 2021 6:04 am

Configure the M800 Communications for "ADL Receive", provide an address (note this is in decimal)
Configure one of the M800 Sensor Inputs (like User Channel 1, etc) to be named Boost Level or similar, and use ADL 1 as the Input Source.
Configure a function in the PDM use to a keypad button to control a counter for the Boost Level.
Configure the PDM to output this value on the CAN address you configured in the M800 (note this is usually in hexadecimal).

That is the basic process, and may be enough to get you going.
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1379
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Re: PDM/Keypad CAN-output to M800

Postby cotje on Tue Apr 13, 2021 6:16 am

Thanks David! I was already working in that direction but missed the sensor input user channel. Let you know how far I get.
cotje
 
Posts: 72
Joined: Mon Oct 07, 2013 5:50 am

Re: PDM/Keypad CAN-output to M800

Postby cotje on Tue Apr 13, 2021 6:28 am

So, I did the following:

PDM:
fn.BoostCycle = Counter(range 0,3, increment:Keypad1.Boost, edge=rising, wrap=true)
CAN Output, message 1, Address 521, Channel 2=fn.Boost Cycle

M800:
CAN 2 Data = 4
CAN 2 Addr = 1313
Sensor Input, User, Channel 2 Boost, ADL, Custom: Unitless, no decimal

and then use the Boost-value as an Y-axis for Boost-control, correct?
cotje
 
Posts: 72
Joined: Mon Oct 07, 2013 5:50 am

Re: PDM/Keypad CAN-output to M800

Postby David Ferguson on Tue Apr 13, 2021 7:33 am

You are on the right path. I would view Sensors to see if the value you are receiving is what you expect. Adjust the sensor setup (or PDM CAN output) to get things right.

Once that is right, then you can add your table axis and fill it in to get the behavior you want.
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1379
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Re: PDM/Keypad CAN-output to M800

Postby cotje on Wed Apr 14, 2021 6:33 am

OK, I've done some tests and currently are getting (weird but consistent) values from the PDM on my M800. This was only after I removed the CAN-receive channel (GPS-speed) received from my CDL3. The values are shown by actually pressing keys so that's something already but I'm missing the relationship between de settings on the devices.

On the PDM I can setup Channels. These are transferred over CAN to the M800 on an address. On the M800 I need to setup CAN 1 or 2 or 3-6 for ADL and the same address (in decimal). Now, how does this CAN number map to the User input? Is it something like:
CAN 1 maps to input source ADL1 in the User Channel
CAN 2 maps to input source ADL2 in the User Channel

Still confused, but eager to learn! Did I miss something?
cotje
 
Posts: 72
Joined: Mon Oct 07, 2013 5:50 am

Re: PDM/Keypad CAN-output to M800

Postby David Ferguson on Wed Apr 14, 2021 7:13 am

OK, so this is a little tricky to do with a PDM vs. an ADL, but still possible. I figured this out from this thread:

viewtopic.php?f=13&t=3890

The "ADL Receive" is expecting a Compound Message on that address. The first Compound Message will have 00 00 in the first two bytes, and then it reads the 16 bits values ADL 1, ADL 2, ADL2 from the following bytes.

So configure the M800 to receive ADL 1.

Then Configure the CAN transmit on the PDM to send to necessary CAN address, the following bytes: 0, 0, 0, BoostLevel,0, <ADL2 value>, 0, <ADL 3 value>.

I am attaching a picture showing this configured in the PDM CAN message window
Attachments
PDM CAN Message.JPG
CAN message for 0x521
PDM CAN Message.JPG (49.1 KiB) Viewed 9171 times
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1379
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Re: PDM/Keypad CAN-output to M800

Postby cotje on Wed Apr 14, 2021 8:16 am

Aha, that starts making sense, knowing know it maps out differtly explains the weird values.
I just confirmed, with the CAN-utility, the PDM is putting out the correct channel values.

That link you referenced is exaclty what I used to get the CDL3 GPS speed into the M800 (for launch control). Question now is if I can combine the CDL3 input with the PDM input on the M800... being both ADL1

Will try and report back. Thanks again David!
cotje
 
Posts: 72
Joined: Mon Oct 07, 2013 5:50 am

Re: PDM/Keypad CAN-output to M800

Postby David Ferguson on Wed Apr 14, 2021 8:41 am

You should send the PDM data to the CDL3. The CDL3 can package it up with the GPS info and send it all to the M800.

You didn't originally say you had a CDL3 or I would have recommended that method. You can easily pack 8 PDM values into a single message the CDL3 can decode easily.
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1379
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Re: PDM/Keypad CAN-output to M800

Postby cotje on Wed Apr 14, 2021 8:49 am

Ok, cool! Will look into it tomorrow.
cotje
 
Posts: 72
Joined: Mon Oct 07, 2013 5:50 am

Next

Return to PDM15 PDM16 PDM30 and PDM32

Who is online

Users browsing this forum: No registered users and 0 guests