1

Topic: Some tips for working with Canny products

I thought I would share some of the things I've found helpful while working with the Canny7 and Canny5.2.  Please feel free to add any more that you may have come across.

The first is that I recommend you buy some additional connectors from eBay for a couple of dollars (search for 4-Pin Mini Micro JST XH 2.54mm), this has allowed me to make up my own adapter harnesses that I've used over and over again for various testing purposes.  Once you build a couple of these you can put them together like Lego to make all sorts of network configurations.  I've attached a photo of most of what I've made up (some are too specific that what I've been doing to be of general interest).  The most useful ones are:
- 4 pin Y harness, lets me connect 2 Cannys to the same plug, so I can use one to monitor traffic while the other is running its program
- 4 pin Y harness with built in resistor, for creating a CAN network on my bench
- 4 pin socket to 2 pin plug, let's me connect the second CAN interface of the 5.2 to a 4 pin connector for a 7
- 2 pin male to female with resistor, for adding a terminating resistor when required
- DC power socket to 4 pin connector, for powering up the devices when making a benchtop network
- OBD2 plug to 4 pin connector, lets me plug in a Canny and scan traffic on any car.  I also put a second OBD2 socket on here so that ordinary OBD2 devices can still be used and I can see if they're using CAN

Post's attachments

Attachment icon 20181201_092359.jpg 903.21 kb, 233 downloads since 2018-11-30 

2

Re: Some tips for working with Canny products

Thank you for sharing your experience!

3

Re: Some tips for working with Canny products

Another feature that is really helpful for larger diagrams is the ability to name segments, then you can call on that signal from anywhere in the diagram without having to connect them.

In this diagram I am sending out several different messages on CAN, some of which change depending on whether the engine is running.  I have a section of the diagram which determines whether or not the engine is running, and another section which creates an index number to synchronise the various parts of the message that need to be sent out.

Rather than having connections crossing all over my diagram and making it look confusing I have named the commonly used ones, and then just call on them when I need them.  This also helps to keep clear what the signals are, so makes it easier to troubleshoot and modify.

It took me a while to realise this function was available, so I thought I would mention it here!

Post's attachments

Capture.PNG, 60.35 kb, 867 x 652
Capture.PNG 60.35 kb, 340 downloads since 2018-12-03 

4

Re: Some tips for working with Canny products

The connectors are a great idea.  They would definitely help with the maze of wires currently on my workbench.

5

Re: Some tips for working with Canny products

Cubic,

Would you  be willing to share your CFD file?  I'm always looking for ways to simplify my coding.

Vic Moses

6

Re: Some tips for working with Canny products

vmoses wrote:

Cubic,

Would you  be willing to share your CFD file?  I'm always looking for ways to simplify my coding.

Vic Moses

Hi Vic,

There is some information used in this diagram that I would like to keep to myself, as it has taken me many hours of work to figure out, but none of that is specific to the Canny.  What is it that you are looking for?  Without context I think the CFD would be very hard to understand, maybe there is something specific I can help you with?

7

Re: Some tips for working with Canny products

i was just looking for some examples of how you created "subroutines" by naming segments and then did the "go to" to use them.

I'm not interested in any other logic that you might consider proprietary, so you could just delete most of the electrical function of any diagram.

Sorry I didn't see your response earlier  BTW, are you in NZ or is the moniker for something else?

8 (edited by cubic_nz 16-12-2018 05:51:01)

Re: Some tips for working with Canny products

vmoses wrote:

i was just looking for some examples of how you created "subroutines" by naming segments and then did the "go to" to use them.

I'm not interested in any other logic that you might consider proprietary, so you could just delete most of the electrical function of any diagram.

Sorry I didn't see your response earlier  BTW, are you in NZ or is the moniker for something else?

You can see where I've used a signal in my earlier snip.  In this snip you can see where I've grabbed the current engine speed from CAN and put it into a latching register.  I've named the output from that register "Engine Speed", then done a further test to see if the speed is above 0x0200, which tells me if the engine is running, and named that "Engine Running".  It's really simple to do, you just double click on a segment and either type in a new name, or select an existing signal from the drop down list.

Yes, I live in NZ, hence the unimaginative naming convention!

Post's attachments

Attachment icon Capture.PNG 25.42 kb, 185 downloads since 2018-12-16 

9 (edited by cubic_nz 16-12-2018 05:53:57)

Re: Some tips for working with Canny products

Another tip that might help some people who are new to this is to use the red and green LEDs on the Canny board to help troubleshooting when you're having issues.  I've found this to be the only way to find mistakes when I'm working with the built in CAN filters, as it's not possible to simulate these filters in the simulator (that I'm aware of!).

For example, I was working with my 5.2 to block some messages between two devices and dynamically modify others.  I couldn't figure out why the initial modification would work, but it would not change to the second stage of modification once the engine started.  So I temporarily connected the green LED to the output of my test to see if the message was received (as per screenshot), and this confirmed the message was being received and recognised.  I then did another test and connected it to my "Engine Running" signal, and this confirmed the test was working also.  Since I now knew all of this was working I could look elsewhere, and realised I had overlooked the gateway configuration update signal.

If you are having trouble with a program and the simulator is not practical to diagnose it, consider whether there are any parts of the diagram you can check are working via the lights, to help you narrow down your search for the fault.

Post's attachments

Attachment icon Capture2.PNG 26.39 kb, 175 downloads since 2018-12-16 

10

Re: Some tips for working with Canny products

Got it.  Definitely helpful, especially with asynchronous events.  Just out of curiosity, is there any reason why you used a "less than" test and then inverted the result (which is actually > or smile instead of just using "greater than"?

On using the LED's, I agree.  They're very helpful for finding all kinds of problems in a diagram for situations the simulator can't generate.  For me it's usually an incomplete connector.

Thanks.

11

Re: Some tips for working with Canny products

Usually, Inversion block is used only to increase the readability of the diagram. Instead, you can invert any of block's input or output via context menu on block's pin.

Post's attachments

inv.png, 10.67 kb, 480 x 334
inv.png 10.67 kb, 465 downloads since 2018-12-16 

12

Re: Some tips for working with Canny products

I wondered what the invert feature was.  I tried clicking on it but didn't see the obvious result.  Later, when I noticed the open circle on the pin I couldn't get rid of it, so I deleted the block and added it back.  I will use it now.

13

Re: Some tips for working with Canny products

You need right-click exactly on pin name or triangle pin symbol, for get the context menu for pin. In this case the result will not depend on whether the pin is connected or not.

14

Re: Some tips for working with Canny products

vmoses wrote:

Got it.  Definitely helpful, especially with asynchronous events.  Just out of curiosity, is there any reason why you used a "less than" test and then inverted the result (which is actually > or smile instead of just using "greater than"?

Yes, it's because I copied and pasted this block from another diagram, and in the original I needed both results.  This snip was taken from a diagram I used temporarily for testing, so it's not polished.  I did notice the inefficiency after I posted it, and wondered if anyone would pick up on it!

15

Re: Some tips for working with Canny products

Another tip which I initially didn't know about is that when using the CAN monitor function of the Canny 7 it is possible to copy and paste the messages received into Excel (or other program) so that you can study in more detail the sequence of messages.  It is as simple as pressing tab to move the cursor to the log section of the screen, press Ctrl + A to select all the messages and then Ctrl + C to copy the data.  You can then paste it into whatever you want for further analysis.

This info is included in the Wiki page, but of course I didn't read that!