PCAN-LIN Installation

RS-232 to CAN/LIN Interface
Oprogramer
Posts: 29
Joined: Mon 6. Nov 2017, 13:31

PCAN-LIN Installation

Post by Oprogramer » Thu 30. Nov 2017, 17:15

Hello,

I try to install the PCAN-Lin module and configure it through the PCAN-LIN CT software.
When i start the PCAN-LIN CT Software, it shows me this error:

Try to connect to port/module:22 failes with message "A PCAN-LIN module could not be confirmed".

I have connectet only the LIN-Bus, both GNDs and V. I suplied 12 V DC. I do not connected the CAN connections because i do not use CAN.

After suppling voltage the status led and the Transmission/Error led blink with green light. After a short time the Status led is lit green and the Transmission/Error is lit red. But i cannot configure the PCAN-LIN module.

I Also use a USB to Serial Adapter. (ADApter USB 1.1 > 1x Serial Rs 232 )

What did i wrong?

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: PCAN-LIN Installation

Post by M.Maidhof » Fri 1. Dec 2017, 09:46

Hi,

do you use a serial baudrate of 38400bit/s?

Please try to use a FTDI based USB to serial adapter, or a native COM port of your PC. We know about such issues when using prolific devices.

regards

Michael

Oprogramer
Posts: 29
Joined: Mon 6. Nov 2017, 13:31

Re: PCAN-LIN Installation

Post by Oprogramer » Fri 1. Dec 2017, 10:59

Hello,

I solved it with using a native COM port, thank you.

I have another question. I have a Lin system where the master is already set and it communicate with one slave. Now, it should be possible to use the PCAN-LIN as gateway to only read the messages on the Bus. Is it also possible to send request to the slave and master via the PCAN-LIN and to get a response?


Best regards

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: PCAN-LIN Installation

Post by M.Maidhof » Fri 1. Dec 2017, 11:57

Hi,

yes, you can also use the PCAN-LIN as listener or simple LIN-CAN gateway on a LIN system with exiting LIN master. You have to configure the PCAN-LIN as slave, and set all frames to the defined length, checksum and to subscriber.

On a LIN system, only one master ist allowed. So as long as there is another LIN master connected you cannot send master frames by PCAN-LIN. However, configured as a LIN slave, you can respond to master subscriber frames. Simply set the frame in the frame config, on which the PCAN-LIN should respond to, to publisher, and set some default data. You can modify the data later by serial streams, or even by CAN (use LIN ID + CAN-ID Offset + 0x40 as CAN frame for changing the default data). See help of PCAN-LIN CT for more details.

regards

Michael

Oprogramer
Posts: 29
Joined: Mon 6. Nov 2017, 13:31

Re: PCAN-LIN Installation

Post by Oprogramer » Fri 1. Dec 2017, 13:55

Hi,

when i configure the PCAN-LIN as listener (LIN- RS-232) then the PCAN-LIN has to be the Master as it is described in the user manual. The issue is that i have already a device that actors as Master. Is it possible to use the Gateway LIN- RS-232 and decelare the PCAN-LIN as slave? I do not use a CAN-BUS only LIN is activated.

Where can can i set the frames to the defined length, checksum and to subscriber? Is there any description in the PCAN-LIN- Protocol Deifnitions?


Best regards

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: PCAN-LIN Installation

Post by M.Maidhof » Mon 4. Dec 2017, 11:01

Hi,

as written in my last post it is possible to set the PCAN-LIN to slave mode, when you have an other LIN master available.

To set the frame configuration, simply use PCAN-LIN CT and set those settings in the profile management.

If you want to set those settings through serial commands, please see page 74 to 84 of the PCAN-LIN protocol definitions pdf.

regards

Michael

Oprogramer
Posts: 29
Joined: Mon 6. Nov 2017, 13:31

Re: PCAN-LIN Installation

Post by Oprogramer » Mon 4. Dec 2017, 13:32

Hi,

thank you, i get now messages from the master and i can also send a frame as responds.

i have a question about activating the Lin bus, when it is in sleep mode, through the PCAN-LIN adapter, how can i send a wake up messages through the software and through the serial commands? When i send wake up messages then i dont need a identfier or checksum.


Best regards

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: PCAN-LIN Installation

Post by M.Maidhof » Mon 4. Dec 2017, 13:56

Hi,

there is no directly wakeup message implemented in PCAN-LIN. As a workaround send a 0x3D subscriber message as wakeup. This will wakeup all sleeping CAN nodes and will not disturb any connected LIN node.

regards

Michael

Oprogramer
Posts: 29
Joined: Mon 6. Nov 2017, 13:31

Re: PCAN-LIN Installation

Post by Oprogramer » Mon 4. Dec 2017, 14:12

Hi,

How can i send a subscriber message through the PCAN-LIN, can i send Write Data on Bus messages as slave through the serial Command? And how have do i do it through the PCAN-LIN CT?

Best regards

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: PCAN-LIN Installation

Post by M.Maidhof » Mon 4. Dec 2017, 17:02

Hi,

as long as the PCAN-LIN is configured as slave, you can´t send a subscriber message. You have to configure it to master for a short time (Set LIN termination to master + Set Initialization to current Params), to be able to transmit a subscriber frame as wakeup.

regards

Michael

Post Reply