PCAN_ERROR_ILLMODE

Forum for the PCANBasic .NET Assembly Beta-Package containing
the PCANBasic-Assembly developed in .NET-Standard.
Locked
Matthias
Posts: 3
Joined: Tue 18. May 2021, 14:10

PCAN_ERROR_ILLMODE

Post by Matthias » Tue 18. May 2021, 16:31

Hello,
I have a problem concerning the following error code: Driver object state is wrong for the attempted operation (PCAN_ERROR_ILLMODE).
I am relatively new to programming so I don't know exactly wether this problem is due to any missing file/driver or an error in the code.
I am using the PCAN_USB and I used the attached code from the example of the documentation.
I would be grateful if someone could tell me what to do.
Attachments
My code with the Erro Message (in german)
My code with the Erro Message (in german)
PCAN_USB.PNG (39.81 KiB) Viewed 2035 times

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN_ERROR_ILLMODE

Post by M.Heidemann » Wed 19. May 2021, 07:39

Hello,

Do you have the PCAN-Drivers including PCANBasic installed?

https://www.peak-system.com/quick/DrvSetup
peak-driver-setup.png
peak-driver-setup.png (26.56 KiB) Viewed 2026 times

Please report back to us regarding this

Best Regards

Marvin

Matthias
Posts: 3
Joined: Tue 18. May 2021, 14:10

Re: PCAN_ERROR_ILLMODE

Post by Matthias » Thu 27. May 2021, 09:07

Hello,

thank You for the fast reply.
Unfortunately this was not the issue, the drivers were already installed.
Are there perhaps any other possibilities for the upcoming error?

Best Regards

Matthias

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN_ERROR_ILLMODE

Post by M.Heidemann » Thu 27. May 2021, 09:18

Hello,

Please check the following:

- Do you have the device intialized with another software, for example PCAN-View?

- Do you have local PCANBasic DLLs? Does the behaviour also occur, when the local DLLs are removed?

Please report back to us regarding this.

Best Regards

Marvin

Matthias
Posts: 3
Joined: Tue 18. May 2021, 14:10

Re: PCAN_ERROR_ILLMODE

Post by Matthias » Thu 27. May 2021, 11:27

Hello,

after deinstalling the drivers and reinstalling them again, and also after reincluding the dlls + restarting the PC, the error disappeard.

I am very grateful for your fast support.

Best Regards

Matthias

cobra_ltc
Posts: 2
Joined: Wed 22. Sep 2021, 22:22

Re: PCAN_ERROR_ILLMODE

Post by cobra_ltc » Wed 22. Sep 2021, 22:37

I ran into the exact situation. I'm not able to run PCANBasicExample.exe from either Win32 or x64 folders. I did try renaming the local PCANBasic.dll files, but the results were identical. I uninstalled/reinstalled the 4.2.3 PEAK-Drivers, but the results were the same. I didn't have any other software competing for the PCAN HW (USB) at the time I ran the test. I am able to use the PcanView, so I know the HW works.

I get the same error message whether the drivers are installed or not. SO, it appears that they are "not really installed" for me?!

Anything else I could try to remedy this?
Attachments
Untitled.png
Untitled.png (12.17 KiB) Viewed 1390 times

cobra_ltc
Posts: 2
Joined: Wed 22. Sep 2021, 22:22

Re: PCAN_ERROR_ILLMODE

Post by cobra_ltc » Wed 22. Sep 2021, 23:19

IGNORE - It started working after a second computer restart.

User avatar
U.Wilhelm
Sales & Support
Sales & Support
Posts: 1258
Joined: Fri 10. Sep 2010, 19:34

Re: PCAN_ERROR_ILLMODE

Post by U.Wilhelm » Mon 18. Oct 2021, 09:27

thy for teh feedback - topic closed
--------------------------------
PEAK-System Technik
Technical Support Team
support@peak-system.com
-------------------------------

Locked