PCANView Bug at program start

Windows® Compatible Software for Displaying CAN Messages
Post Reply
CanGuru

PCANView Bug at program start

Post by CanGuru » Thu 26. Jan 2023, 07:17

Hello.

Is it possible to fix the bug in pcan-view, which is present since the last 15 years in ALL versions of pcan-view.

it is always annoying to fix the bug every time pcanview is started.....

How to reproducing the Bug:

- Use a Windows-pc without pcan-basic or pcan-developer installed (normal pc with only peak-driver installed, no peak-networks configured)
- reboot the windows pc (new start)
- Connect a pcan-usb adapter to a windows-pc (pcan-usb or pcan-usb pro fd) or boot with a connected pcan-usb device
- Close all open instances of pcan-view or other software who has a open connection to a pcan-usb adapter (it any autostart is present)
- start PCAN-View
- choose a pcan-hardware : pcan-usb device
- choose 250kBaud (in newer version of pcan-view: CAN (SJA1000) -> 250kBit)
- press OK to connect


What happend:
- on every connect, the baudrate is: NOT 250kBaud !!! It is 125 kBaud on every start. Pcan-view says in the lower line: Verbunden mit Hardware PCAN-USB | Bitrate:125 kbit/s | Status: OK
- on different PC's: on every connect, the baudrate is: NOT 250kBaud !!! It is 125 kBaud on every start
- on different Windows-Version: on every connect, the baudrate is: NOT 250kBaud !!! It is 125 kBaud on every start
- on different pcan-driver-version: on every connect, the baudrate is: NOT 250kBaud !!! It is 125 kBaud on every start
- on different Hardware-Version of pcan-usb: on every connect, the baudrate is: NOT 250kBaud !!! It is 125 kBaud on every start
- on different Program-Version of pcan-view (V4.xx, V5.xx): on every connect, the baudrate is: NOT 250kBaud !!! It is 125 kBaud on every start


So you have to disconnect the pcan-usb device,
choose 250kBit again
connect again:

now you have a 250kBit connection.

K.Wolf
Software Development
Software Development
Posts: 141
Joined: Wed 22. Sep 2010, 15:37

Re: PCANView Bug at program start

Post by K.Wolf » Thu 26. Jan 2023, 14:06

Hello,

I've never heard of such a bug in PCAN-View, and neither can I nor my colleagues reproduce it.

Which exact PCAN-USB driver version do you have installed, and which firmware version is your PCAN-USB or PCAN-USB Pro FD adapter using?

Are you sure that no other software runs in the background that reconfigures the PCAN-USB adapter at runtime?

The bit rate you select in the Connect dialog is not a custom bit rate? (you can define and select a custom bit rate named "250 kbit/s" which is actually a 125k bit rate).

CanGuru

Re: PCANView Bug at program start

Post by CanGuru » Thu 26. Jan 2023, 15:05

Hi.

>>Which exact PCAN-USB driver version do you have installed, and which firmware version is your PCAN-USB or PCAN-USB Pro FD adapter using?
Driver-Version: PCAN_USB 4.2.1.16433

We have newer PCAN-USB-Hardware with Firmware: 8.4
or older PCAN-USB-Hardware with Firmware: 2.8
and PCAN-USB Pro FD with Firmware: 3.2.0
-> the error occurs with any of the adapters (even only one is connected)



Are you sure that no other software runs in the background that reconfigures the PCAN-USB adapter at runtime?
Yes, im shure. After starting the PC, no program with can.access is running.
The actual Net's in PCAN Nets COnfig is:
pcannet.png
pcannet.png (12.26 KiB) Viewed 7697 times

The bit rate you select in the Connect dialog is not a custom bit rate? (you can define and select a custom bit rate named "250 kbit/s" which is actually a 125k bit rate).
I use this setting in the pcan-view V5 :
pcan.png
pcan.png (44.11 KiB) Viewed 7697 times

CanGuru

Re: PCANView Bug at program start

Post by CanGuru » Thu 26. Jan 2023, 15:35

Here a screenshot after start PCAN-View:
first_start_pcanview.png
first_start_pcanview.png (174.8 KiB) Viewed 7694 times
And this is the pcan-view after connecting:
pcanview_wrong_baud.png
pcanview_wrong_baud.png (146.17 KiB) Viewed 7694 times

G.Lang
Support
Support
Posts: 174
Joined: Wed 22. Sep 2010, 14:58

Re: PCANView Bug at program start

Post by G.Lang » Fri 27. Jan 2023, 09:49

Hi,

please close all PEAK software and make a screenshot of the [Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PCAN_USB] branch and post it here

Example:
Screenshot 2023-01-27 094659.jpg
Screenshot 2023-01-27 094659.jpg (146.6 KiB) Viewed 7679 times

CanGuru

Re: PCANView Bug at program start

Post by CanGuru » Fri 27. Jan 2023, 11:14

Hi Mr. Lang.
Thanks for your help.

Here is the screenshot:
regedit_pcan.png
regedit_pcan.png (40.47 KiB) Viewed 7674 times

i have to use the redistribution driver from our customer, so it would be nice if the can-network and driver could continue to be used
(because I don't know whether the customer programs will still work with a new driver.)

The bug is independent from the customer-program, which is using a can-network (after starting the pc, no customer-programms are executed, no services are running!).

G.Lang
Support
Support
Posts: 174
Joined: Wed 22. Sep 2010, 14:58

Re: PCANView Bug at program start

Post by G.Lang » Fri 27. Jan 2023, 12:40

Hi,

you have a defined a fixed net called "PCANLight_USB_12" with a baudrate of 125k (BTR0/BTR1 value 0x031C) in the registry and therefore, if you start the PCAN-View with 250KBit/s you get the "wrong" baudrate.

Solution: Delete all nets with "PCANLight_xyz_xy" nets in the registry.

Such a fixed net will definitely not be created by the PCAN-View or PCANBasic API, such a fixed net can only be created manually or via a very old PCAN-Developer suite (or from the redistributable package of the PCAN-Developer suite). Newer PCAN-Developer suites don´t allow to create "PCANLight_xyz_xy" nets. The net names "PCANLight_yxz_yx" are reserved nets for usage with the PCANView/PCANBasic API and don´t be fixed/stored in the registry.


The next PCAN-View release version will delete such "PCANLight_xyx_xy" nets to avoid such issues.

CanGuru

Re: PCANView Bug at program start

Post by CanGuru » Fri 27. Jan 2023, 13:05

Hi.

Thanks for your great support. I'll fix it.

By the way.... Can you correct the column width of the trace window in the next pcan-view version?

After start, a very very big RX/TX column is present. The importent data column is barely visible.

Or better: can you allow to change the column order and size (and remember the settings)? So the user can move the unimportant RX/TX-col to the last position
RX_no_data.png
RX_no_data.png (23.21 KiB) Viewed 7661 times

K.Wolf
Software Development
Software Development
Posts: 141
Joined: Wed 22. Sep 2010, 15:37

Re: PCANView Bug at program start

Post by K.Wolf » Mon 30. Jan 2023, 13:43

Hi,

the Tx/Rx column width bug has already been fixed, the fix is included in the next release 5.0.5. The bug only occurred in Dark mode.
Support for rearranging columns and storing column widths is not planned in the near future.

Post Reply