Difficulty connecting to PCAN-LIN tool

RS-232 to CAN/LIN Interface

Difficulty connecting to PCAN-LIN tool

Postby ndthornton » Mon 25. Jun 2012, 16:12

I am trying to set up a CAN to LIN link but am having difficulty making progress due to difficulties with the PCAN-LIN configuration tool. It takes me about 10 attempts to connect to the PCAN device via my Laptops serial port (baud rate 38400). Eventually it will connect - usually after power cycling the device a few times- and works properly for a period of time before eventually the connection breaks. Often when the connection breaks my laptop crashes and sometimes even shuts down all together. This behaviour is extremely frustrating as when the tool does work it works quite well. The error message I see is "Port connected but module not respond".

When the the tool does connect I have a further problem. When I connect the PCAN device directly to my CANUE CAN simulator tool I am able to see CAN messages received through the configuration tool. However when I connect in the rest of the CAN network I stop receiving messages through PCAN despite the rest of the network functioning correctly.

Any help with these issues greatly appreciated

Nick
ndthornton
 
Posts: 5
Joined: Mon 25. Jun 2012, 15:50

Re: Difficulty connecting to PCAN-LIN tool

Postby G.Lang » Tue 26. Jun 2012, 08:26

Dear Nick,

we need some additional informations:

-> serial number of the module (IPEH-00202x-xxxx)
-> firmware-version of the PCAN-LIN adaptor (via LIN Configuration Tool)
-> hardware-version of the PCAN-LIN adaptor (via LIN Configuration Tool))
-> build mode ((via LIN Configuration Tool))
-> exact version of the PCAN-LIN Configuration Tool
-> CAN-busload (CAN messages per second you transmit to the LIN-adaptor)
-> used CAN bit rate

Should the PCAN-LIN-adaptor work as
-> a LIN-master?
-> a LIN-slave?
or only as CAN-LIN-Gateway without any master or slave functionality?

Is it possible to send the LIN-config to support@peak-system.com that we can verify your settings?

regards
Gunther
User avatar
G.Lang
Support
Support
 
Posts: 78
Joined: Wed 22. Sep 2010, 14:58
Location: Paradise City

Re: Difficulty connecting to PCAN-LIN tool

Postby ndthornton » Tue 26. Jun 2012, 10:11

Hi , Thanks for your quick response,

Serial number = IPEH-002J28-00086
firmware Version = 01.02.06
Hardware Version = 02.02.01
Build Mode = Standard
tool version = 1.2.1.32
Library version = 1.2.1..15
CAN bit rate = 125Kb

Our bus loading is high -certainly too high for the serial connection to deal with- and this was an early cause of the configuration tool falling over. However I have successfully filtered for just the 1 CAN message I am interested in which only transmits once every 500ms. When the configuration tool works I can see this message with no problems. The tool still regularly crashes and fails to reconnect but I would have thought the heavy bus traffic would not be the issue since the filtering (I think) is done in hardware.

In terms of master or slave - I haven't quite worked out how this will work yet and the crashing issue is making experimentation difficult. If I give a brief illustration of what we are trying to achieve then perhaps you could give me some tips....

We write software for an instrumentation pack connected to many nodes on a CAN bus. In order to test the system we write CANoe scripts to simulate the traffic on the various nodes. This all works very well. However we also have 1 LIN node which we are currently unable to test. The idea is to create another CAN signal in CANue and convert it to LIN using the PCAN tool. My current understanding of how the LIN node works (which is limited at the moment) is that the instrument pack is Master and sends a header message periodically (0x30-0x00-0x00) to the slave node. I have successfully viewed this message on the configuration tool and converted it to CAN to view it in CANoe. The node we are trying to simulate sends a message back to the instrument pack containing 4 data bytes and with header 0x20. I have created a CAN version of this message in CANoe and filtered for it in the configuration tool. I have set up the tool to supposedly resend the message in LIN but have been unable to verify if this works yet.

I’m not sure whether I need to operate the PCAN module as slave or CAN-LIN gateway. Unfortunately the constant crashing means I’m not making much progress at the moment. Also I need to be able to plug the instrument pack back in to the CAN bus so it can receive its messages and function normally - I Im currently just connecting the CANoe simulator to the PCAN module and filtering for the new message. When I do this I no longer see any messages appearing on the PCAN tool (although the link between CANoe and the instrument pack works correctly).

I’m sure I’m not too far away from making this work - but I could use a bit of help.

Thanks
Nick

I have inclosed a screen shot showing my current PCAN settings
Attachments
PCAN001.jpg
PCAN001.jpg (130.16 KiB) Viewed 986 times
ndthornton
 
Posts: 5
Joined: Mon 25. Jun 2012, 15:50

Re: Difficulty connecting to PCAN-LIN tool

Postby G.Lang » Tue 26. Jun 2012, 14:42

Hi,

please update the PCAN-LIN configuration tool to version 3.0.3 (the problem with the broken connection is fixed since version 3.x)

Link: http://www.peak-system.com/fileadmin/me ... canlin.zip

If the CAN-traffic is to high then it´s possible that the bandwidth from the serial port is overloaded and the module can´t respond. Then please stop the forwarding (output) to the serial port and/or use the filter code and filter mask to reduce the CAN data stream to the module.

CAN-filter.jpg
CAN-filter.jpg (159.12 KiB) Viewed 976 times


As i understand you correctly, you want to "trigger" the LIN master header via CAN. In this case the PCAN-LIN-adaptor act as a router and it´s necessary to enable the "LIN Master Termination".

LIN-bus-master.jpg
LIN-bus-master.jpg (55.88 KiB) Viewed 976 times


It´s also necessary to configure the frame configuration (depending from the used LIN protocol)
frame_configuration.jpg
frame_configuration.jpg (153.24 KiB) Viewed 976 times


Now send the CAN-ID 0x30h as a remote request with DLC=4 and you receive the complete LIN-message at CAN
LIN-Header_via_CAN.jpg
LIN-Header_via_CAN.jpg (134.25 KiB) Viewed 976 times


I hope the infos are helpful.

regards
Gunther
User avatar
G.Lang
Support
Support
 
Posts: 78
Joined: Wed 22. Sep 2010, 14:58
Location: Paradise City

Re: Difficulty connecting to PCAN-LIN tool

Postby ndthornton » Tue 26. Jun 2012, 18:14

Thanks, very helpfull

do you have any ideas about the earlier issue I posted......

When I connect the PCAN device directly to my CANUE CAN simulator tool I am able to see my CAN message received through the configuration tool. However when I connect to the instrument pack I stop receiving the message through PCAN despite the rest of the network functioning correctly.

The messages stop abruptly when I plug inthe instrument pack and I also receive the following CAN error.....

"CAN went to error state passive"

Thanks
ndthornton
 
Posts: 5
Joined: Mon 25. Jun 2012, 15:50

Re: Difficulty connecting to PCAN-LIN tool

Postby G.Lang » Wed 27. Jun 2012, 10:50

Hi Nick,

you are using a PCAN-LIN Lowspeed adaptor (with fault tolerant CAN transceiver) so please verify that your instrument pack is also a CAN lowspeed system.

Maybe the integrated termination resistor don´t match

low_speed_termination.jpg
low_speed_termination.jpg (161.5 KiB) Viewed 964 times


can_termination_lin_adaptor.jpg
can_termination_lin_adaptor.jpg (136.59 KiB) Viewed 964 times


What´s the instruments pack sample point and SJW? You are also using an old firmware, please send an email to support@peak-system.com and i send you the latest firmware V1.02.16 + necessary instructions.

regards
Gunther
User avatar
G.Lang
Support
Support
 
Posts: 78
Joined: Wed 22. Sep 2010, 14:58
Location: Paradise City

Re: Difficulty connecting to PCAN-LIN tool

Postby ndthornton » Wed 27. Jun 2012, 12:01

Great!
Changing the resistor setting solved the bus problem - getting closer - thanks.

I have emailed for the up to date firmware also

Cheers
Nick
ndthornton
 
Posts: 5
Joined: Mon 25. Jun 2012, 15:50

Re: Difficulty connecting to PCAN-LIN tool

Postby ndthornton » Mon 9. Jul 2012, 12:52

Hi
I got dragged on to another topic for a while but Im back on the CAN to LIN problem with a better understanding of how our system operates......

Our master sends LIN header 30 to our slave followed by 0-0. It does not appear that the slave is required to respond to this message as the logic analyser trace looks the same no matter whether the slave is plugged in or not.

After this our master sends LIN header 20. The slave responds with 4 bytes of data. Header 20 is sent 3 times before header 30 is resent.

If we disconnect the slave we get 3 error frames relating to header 20 - "Slave not responding. ID not available"

We need to substitute the slave for our CANoe simulator and have the ability to modify the 4 data bytes as required. I am not sure how to get this working with the PCAN tool as its not simply a matter of converting a CAN message to LIN.

Thanks in advance for your help.
Nick

By the way - I have attatched scope plots and PCAN logs to help clarify the situation. I changed the 2 log file file extensions from .txt to .docx as the website would not let me attatch them - so they will need changing back.
Attachments
LINLog_Joypad_not_connected.docx
(45.36 KiB) Downloaded 40 times
LINLog_joypad_connected.docx
(27.04 KiB) Downloaded 47 times
LIN analysis.docx
(1.59 MiB) Downloaded 52 times
ndthornton
 
Posts: 5
Joined: Mon 25. Jun 2012, 15:50

Re: Difficulty connecting to PCAN-LIN tool

Postby M.Maidhof » Mon 9. Jul 2012, 14:48

Hi Nick,

it will double the work when you send an email and post the same question in the forum. So please see my email, to help you in that matter.

best regards

Michael
User avatar
M.Maidhof
Support
Support
 
Posts: 200
Joined: Wed 22. Sep 2010, 14:00
Location: Darmstadt, Germany


Return to PCAN-LIN