26

Re: Problem with canny 5.2 can gateway

Konstantin,

Your are correct on my connections.  Right now I am only modifying messages from the instrument cluster to the rest of the car.  With the Canny removed all of the bus components function properly so only my insertion of the Canny is suspect.  In my early tests the inversion of the input to Sleep Mode was there but somewhere after that I accidentally deleted it. The reaction of the CAN bus on the car side is consistent with that problem, so I suspect it is the source of my problem.  Thank you in advance!

I also liked your buffer approach on the DIO channel, so it's going into the next version my testing.  I've wired in the speed signal wire to DIO 9 but wiill wait until I have the rest working before adding any logic to deal with it. 

I'm going to go skiing for a few days over the new year so it will be a bit before I can post again., but I feel pretty good about it.

Happy New Year.

27

Re: Problem with canny 5.2 can gateway

Good news..  Fixing the sleep mode problem solved my network problems and my simple logic is performing as expected.  Nice.  So I'm on the the next step. 

Are there any examples for how to insert a message when the can gateway is running? My first reaction is just to build the new message in the appropriate CAN TX buffer and enable request to send, but i'm not sure how this interfaces with the gateway.

I would also like to be able to select a message that is coming through the gateway with a specific ID  and drop or modify it based data content,.   It's easy to do based on the ID alone but I'm not nut sure how to  interrogate  the rest of the message.

28

Re: Problem with canny 5.2 can gateway

vmoses wrote:

Are there any examples for how to insert a message when the can gateway is running? My first reaction is just to build the new message in the appropriate CAN TX buffer and enable request to send, but i'm not sure how this interfaces with the gateway.

I have created and sent messages in the usual way, with no special interaction with the gateway.

vmoses wrote:

I would also like to be able to select a message that is coming through the gateway with a specific ID  and drop or modify it based data content,.   It's easy to do based on the ID alone but I'm not nut sure how to  interrogate  the rest of the message.

I would capture the data in the usual way, apply your logic and then update the gateway settings.

I've attached one of my diagrams that does these things (along with a bunch of other stuff).

Post's attachments

Attachment icon 5.2 Dashboard gateway rev4.cfd 17.76 kb, 277 downloads since 2019-01-06 

29

Re: Problem with canny 5.2 can gateway

Cubic,

Thank you.  I love your gear counter!  It's very clever and I never even thought about doing something like that.  Since reverse is geared a bit lower than first, you might even be able to pick up that, but it's probably easier to use the backup lights.

On my question I guess it all boils down to how the CANNY works.  On the receive side, it must be that the gateway is only the loading Rx buffer when a selector is active and the specified ID shows up.  if you are only looking at one ID, there shouldn't be any problem.   However, if the gateway is acting asynchronously and you have selected several IDs there is some risk that another selected message overwrites the RX buffer before your logic is finished pulling data from it.  On the transmit side, the gateway must not be using the TX buffer at all until you issue a request to send.  I think that makes inserting records pretty easy and safe.

I appreciated  seeing your example.... and knowing that it works, I think I'll be able to do what I need to do pretty easily.

Thanks again.

30

Re: Problem with canny 5.2 can gateway

Thanks!  My car used to be automatic with tiptronic, so it has the dash display to show the current gear.  Since I've converted it to a proper manual I didn't want it to be stuck on "4" all the time, so I wrote that logic to show the actual gear.  I blank the display during shifting so the display doesn't fluctuate during the shift. 

Having said that, the addition of all of those 1s to identify the gear is something I have spent a lot of time trying to improve - without success.  Surely there is a smarter way to do it than all of those summing blocks!

Reverse has its own CAN message and display, so no need to try and identify it from gear ratios.

31

Re: Problem with canny 5.2 can gateway

Cubic,

Are you just trying to improve the efficiency of your logic or is it not working as well as you'd like?  I wouldn't be too concerned about a few extra logic logic steps if the display looks the way you want  it to.  I was impressed.

32

Re: Problem with canny 5.2 can gateway

It works fine, I just want the diagram to be perfect!

33

Re: Problem with canny 5.2 can gateway

Here's a slightly different approach.  It uses a cascade approach to select the gear starting at 6th and going all the way to clutch in (I think I could have added one more level to pick up neutral but I didn't look at closely enough at your gear ratio calculations to see if it would work).  This approach allows you work directly with the byte results you want instead instead of having to deal with the results of the additions.  It eliminates all of the conversion effort and only updates the gateway configuration if there is a change in status.

Post's attachments

Attachment icon Another Approach.cfd 3.83 kb, 243 downloads since 2019-01-08 

34

Re: Problem with canny 5.2 can gateway

It is a novel approach to solving the issue, I like that!  However I do think it would have a higher computational load on the processor than the summing blocks, and require more memory.  Interesting, though.

35 (edited by vmoses 25-01-2019 08:33:38)

Re: Problem with canny 5.2 can gateway

i now have a need to add an additional input that functions in the same way as the reverse signal (+12v when on and open when off)) which is on DIO channel 10, so I'll need a switching circuit to translate +12v to a grounding of either DIO channel 8 or 9.  What I'm considering is in the attached image.  Is this similar to what you would do?  I wired it up and it's working.

Post's attachments

Switch.jpg, 19.69 kb, 689 x 491
Switch.jpg 19.69 kb, 386 downloads since 2019-01-24 

36

Re: Problem with canny 5.2 can gateway

vmoses wrote:

What I'm considering is in the attached image.

And this is absolutely right solution!
An alternative way is to remove the on-board internal weak pull-up resistor from the channel circuit: http://wiki.cannylogic.com/index.php?ti … t_diagrams

Post's attachments

c52duopu.jpg, 51.87 kb, 264 x 191
c52duopu.jpg 51.87 kb, 345 downloads since 2019-01-28 

37

Re: Problem with canny 5.2 can gateway

Thank you!.  I looked over the diagrams briefly last fall when i started on this but didn't really focus on them.  Just unsoldering the resistors is a very clean solution.  Thanks for pointing out where they are on the board.

I probably wont change what I have done, since it's in place and working but  the next time,,,