Q&A Forum

[Plugin]CANTool

94 Posts
16 Users
6 Reactions
70.1 K Views
(@bmgjet)
Posts: 362
Dyno Wizard
Topic starter
 

Plugin for creating and controlling a CAN Bus in your workshop.
by bmgjet 2019

Hardware:
Any CAN to USB adapter that creates a COM Port should work.
Main devlopment will be done on a 2 Channel adapter this will be the recommended layout since it will allow for running a stand alone CAN Bus in your workshop as well as hooking into an exsisting CAN Bus with in a car.
[Details to come on recommended adapter since I have 3 different ones coming]


Description:
Mode for port will be selectable so single channel adapters can switch between modes.

Mode 1:
Run 2 wires around your workshop that will operate as a CAN Bus.
Plug in CAN nodes (devices) at any point, My plan is to have 2 jacks at rear of car, 2 jacks on the swing arm bench that can move around front of the car.
4 jacks at computer.

The 2 Jacks on swing arm will have EGT CAN and Knock CAN.
1 rear jack will be taken by Link Lamda CAN.
I will be using a 2 channel adapter so that will be channel 1.

Mode 2:
Have a extension cord that will plug in to an exsisting CAN Bus.
It will be used for reading info from that CAN bus as well as send data to it. (RPM,HP,TQ)

Download: 
Latest build can be found at last post.

Hardware Sponsors:
MjPower [Ecumaster EGT to CAN]
toalan 14point7 [Spartan3]

----- Drivers -----
Have attached drivers for if manual install is needed (No internet or WinXP).
Win7 + should automatically detect device as "Custom USB Device" -> "WinUSB Device" in device manager.
Plugin should automatically install control driver while plugin is open. "ControllCAN.dll" or "ControllCAN64.dll"


 
Posted : 07/02/2019 8:41 am
mx5master and MjPower reacted
 Kurt
(@kurt)
Posts: 3
Member
 

Sent you an email, thanks. 


 
Posted : 02/12/2023 6:46 pm
(@Anonymous)
Posts: 0
 

Try downloading again now. I don't know why that option was not enabled in the old code, I enabled it now. 

I am a little careful about sharing this code, but send me a mail at jostein@yourdyno.com explaining your ideas.


 
Posted : 11/11/2023 9:19 pm
 Kurt
(@kurt)
Posts: 3
Member
 

Thank you, Jostein.  I now have that .dll file working and the old CANTool is functioning.  

But, the "Announce YourDyno Data on CAN bus" and two MSGID fields are grayed out.  I don't see how to enable this selection with this version plug in.  In the software download I have from late 2020, CANTool has the button "Announce YourDyno Data on CAN bus" and one CANID field.  It can be checked and turned on and the ID can be changed.  I do see the one message on my MaxxECU CAN Analyzer tool.

 

So, I have gotten three versions of CANTool to function so far.  Oldest one (maybe), which is what you have just provided.  I cannot turn on the 2 CAN message outputs with this.  Another version from the download in late 2020 which is able to send one message.  And the current one loaded with software download which is not able to send any message.

 

I have just spent some time learning what version of Visual Studio to load and what workload to go with it.  I have an idea that I could modify the current plugin and have it send out those two messages by seeing how the older plug in works.  I obviously have a lot to learn, though.

 

Can you advise?  Is modifying the current plug in to add this functionality even a possibility?  

 

Thanks!


 
Posted : 11/11/2023 9:07 pm
(@Anonymous)
Posts: 0
 

@kurt you are right, this was changed back in 2020. 

I recompiled the old CANTool to work with the newest version of YourDyno, it is here.

Replace the CANTool.dll in the folder C:\ProgramData\YourDynoPlugins with this .dll file to use the original CANTool plugin.

Cheers


 
Posted : 11/11/2023 11:13 am
 Kurt
(@kurt)
Posts: 3
Member
 
I've got a YourDyno V4 and USBCAN/CANanylst-II adapter functioning with latest firmware/software.  I can get RPM from my standalone to YourDyno software through CAN.  
 
 
In a previous download from Aug. 2020, CANTool had a different look and different options.  Latest download is different.  Specifically, I see no setting to transmit data from YourDyno.  I want to get a torque or load cell value out over CAN for datalogging on my ECU.  
 
 
I can load that previous software version with CANTool and I see it sending out a message.  I assume it matches what bmgjet posted previously.  RPM, Tq, HP, An.1
 
 
How can I get this to transmit with current software so I can get this data to my ECU for logging?  I tried deleting the CANTool.dll  and adding the latest CANTool plugin that I downloaded from the library page, but I keep getting an error message.  I don't know if what is included with the Yourdyno software download has this version plug in or not.  I'd add screen shots but I can't find the forum attachment button. 
 
 
How can I get torque or load cell value out from my YourDyno V4 over CAN?  With previous software version I was able to.
 

 
Posted : 11/11/2023 4:56 am
(@rub87)
Posts: 48
Member
 

Ow thats a quick fix! Ill give it a try as soon as I have the engine back together. Is there a way to filter or make a rolling average of channels? For example I have a delta pressure sensor off a DPF connected between the engine and the muffler to get an idea of the muffler backpressure. The pulses of the exhaust although make the voltage and thus number on the screen extremely hard to read so if i could filter it for 500 msec or 1 sec or so that would fix it.


 
Posted : 23/06/2023 10:49 am
(@Anonymous)
Posts: 0
 

You are right, @rub87, thanks. It will be fixed in the next release. If you are in a hurry, download this file https://yourdyno.com/M

 

 
Posted : 22/06/2023 1:20 pm
(@rub87)
Posts: 48
Member
 

It seems there is a bit of a bug in the Math Channel plugin. Lets say one defines in line 1 a formula and then wants to use the result of that formula in line 2 it works. but if one closes and re opens the software it complains about a syntax error and all formulas where a result of another formula is used are automatically discarded. Even if the the source formula is higher in the list (assuming it would compile the list from top down)


 
Posted : 21/06/2023 2:32 pm
(@rub87)
Posts: 48
Member
 

Ok so we got it work using these formulas. Maybe it could still be good if Bmgjet could just add a checkbox in the CANTool window to treat a certain message as being float IEEE754. Lets say some users have a CSM thermo scan and have like 16 channels if they would have to do this for 16 channels it could get a bit messy.

 

 


 
Posted : 23/05/2023 4:46 pm
(@rub87)
Posts: 48
Member
 

A friend of me helped a bit and it is going into the right direction. this formula works now only when lambda goes below 1 the output is still wrong, but were getting there

(((((int)"Lambda_CANc.LAM" >> 31) & 1) == 0) ? 1.0f : -1.0f) * (1.0f + (((int)"Lambda_CANc.LAM" & 0x7FFFFF) / (float)(1<<23))) * (1<<((((int)"Lambda_CANc.LAM">>23) & 0xFF) - 127))

 
Posted : 23/05/2023 11:19 am
(@rub87)
Posts: 48
Member
 

The window help specifies to look about the microsoft math class so if I look it up on google I come here and this say I should be able to write Hex(value) which should give me the a string with the number in hex, but the window doesnt accept die hex( so im already stuck before I started ????


 
Posted : 22/05/2023 10:38 pm
(@rub87)
Posts: 48
Member
 

Ok thanks for the tip!, Ill give it a go tomorrow and report back


 
Posted : 21/05/2023 10:12 pm
(@Anonymous)
Posts: 0
 

Thanks, @rub87.

It is possible to create a math channel for this. To make it easier you can create one for the Exponent and one for the Significant (by and'ing and shifting and applying an offset if needed) and create the final number with "Significant" * Math.Exp(10, "Exponent"). It may be Math.Exp(2, "Exponent"), I don't remember the IEEE 754 by heart


 
Posted : 19/05/2023 12:10 am
(@rub87)
Posts: 48
Member
 

Hi, first off big thanks and thumbs up for the effort put into this with great results.

I posted this also on the main plugin page just to realize I had better posted it here as probably not a lot of people read or get updates about the main page

I tested the CANTool plugin and it works fine and intuitive for me for most common can signals having data in raw hex format sent on the bus. Although I acquired a relative high quality lambda meter of the brand ECM and it is outputting data in 32 bit floating point according to IEEE 754

the data in a packet looks like this in the log MSGID: 0x190 Packet: 75 84 3b 42 75 84 3b 42

Here I put 2 times the same channel (lambda) on one ID each being 4 pads wide. this then means 0x423b8475 in hex and if we decode it to decimal it represents lambda 46.87935256958008, (sensor was just hanging in free air)

Another example from the manual:

Lambda = 0x3F99C663 = 1.20137

O2 = 0x4054FDF2 = 3.32800%

here is a link to the manual of the unit (look on page 12) https://ecm-co.com/download/lambdacanp-manual/?tmstv=1684210188

here is a nice handy web page that does the 32bit floating point to hex or decimal https://babbage.cs.qc.cuny.edu/ieee-754.old/32bit.html

It would be cool if you could implement the option to decode the floating point as most recent high (er) end can modules also use this format, like for example the whole CSM CAN Minimodules used by many OEM car makers and engineering companies.

thank you and best regards,

Ruben


 
Posted : 16/05/2023 8:26 pm
Page 1 / 7
Share:
Select your currency
EUR Euro
USD United States (US) dollar