Issue regarding - Experimental replication

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
shuvra1
Level 5
Level 5
100 sign-ins 10 likes given 100 replies posted

Enclosing all relevant docs. Sort it out. @Sahil_K 

0 Likes
1 Solution

shuvra1,

The files you provided in the previous post is EXACTLY the same as the ones you provided in the first post of this thread.

The Potentiostat.zip is NOT the original Olav Bjerke project.  It has been altered.

If I can obtain the original  project, I might be able to glean new information that might help you.

The main issue starts with the fact that you changed the VID and PID from the original settings to the settings used for the USB UART.

Based on this pic:

Len_CONSULTRON_1-1663851454987.png

you are stating the original VID and PID are 0x04B5 and 0x0081 respectively.

All the parameters listed in the "Device Descriptors" are important to the USB communications used by the Python scripts.

I must note that I have limited experience in USB configuration.  It would be best for someone else with more experience to weigh in on this issue.

Once a USB slave device is powered up on the USB bus, the PC looks for a '.inf' file where the VID and PID match.  In this case, I changed the VID to 0x4B5 and the PID to 0x0081.

You will notice in a Device Manager snip, that the device "Potentiostat" shows up but the icon symbol on top of it (Len_CONSULTRON_2-1663854662033.png) indicates it is not operational.

Reading the event for this device it indicates the read VID and PID but the Driver Name: equals null.  (It could not identify the driver to use.)

Len_CONSULTRON_3-1663854735286.png

Since it couldn't find the .inf file that matches the VID and PID, it couldn't determine which .sys driver file to load.  (Sometimes a special .dll file is also used.)

This is why the original  Olav Bjerke project files may be necessary.  Beside setting the proper USB configuration data in the "Device Descriptor" the support files (.inf, .sys and possibly .dll) may be necessary to continue to move forward.

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

64 Replies
pacr_284376
Level 5
Level 5
100 replies posted 10 solutions authored 50 sign-ins

Hello Shuvra1,

Let me give you some advise because I see your forum-questions daily coming by, without much response. I think you might get more response when you stick to some basic rules such as :

- Dont just place your code without a clear description on what you cant achieve.

- Dont start a new forum-topic daily (or even more than one daily). Stick to ONE forum-topic because than someone who reads it can see what you allready tried

- Make a clear difference in parts of your project that might be solveable by PSOC5 specialists and parts that have nothing to do with PSOC5.

- Be very clear on which hardware you use, what you allready tried and what you cant get working

- Try to get in touch in a polite way with the original writers of the project you're trying to replicate. 

Please treat this answer as positive feedback, and as a way to get more help. Sorry to say so but placing a new topic of a problem daily (or multiple times a day) will not be inviting for other people to help you. Also accept that some of your technical problems probably have nothing to do wiht PSOC hardware, software or tools.

Patrick

Might be with PSoc 5LP itself

--
The information contained in this electronic communication is intended
solely for the individual(s) or entity to which it is addressed. It may
contain proprietary, confidential and/or legally privileged information.
Any review, retransmission, dissemination, printing, copying or other use
of, or taking any action in reliance on the contents of this information by
person(s) or entities other than the intended recipient is strictly
prohibited and may be unlawful. If you have received this communication in
error, please notify us by responding to this email or telephone and
immediately and permanently delete all copies of this message and any
attachments from your system(s). The contents of this message do not
necessarily represent the views or policies of BITS Pilani.
0 Likes
shuvra1
Level 5
Level 5
100 sign-ins 10 likes given 100 replies posted

Just Try to replicate whatever provided . I want with Prototypung Kit of PSoc 5LP

0 Likes
lock attach
Attachments are accessible only for community members.
shuvra1
Level 5
Level 5
100 sign-ins 10 likes given 100 replies posted
 
0 Likes
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

shuvra1,

I can appreciate that your attempt to get a Potentiostat project for the PsoC5LP to work might be frustrating.

As Patrick indicated your forum "screaming" is not working to your advantage.  There many more expert forum users that would like to help where they can.  Many of these users, like myself, are generally familiar with parts of the PSoC5 resources and some external circuit and SW principles.

As for myself, I am not familiar with the Potentiostat circuit general operating principles as well as Python scripts.  Therefore in these matters, I have little to no experience.

We have an expression we commonly use at work:  "How do you eat an Elephant?  One piece at a time."

The Potentiostat project is the 'elephant'.  We as forum users may be able to help with bits and pieces of the project.

I'm assuming that you found the Potentiostat project from somewhere that the Author Olav Bjerke created.  This person has full knowledge of the entire project SW and HW.

Have you tried to contact Olav Bjerke directly?

When you do, the first thing he will probably ask is did you recreate the external circuits and wiring that matches the project requirements.

In general, if I were starting a project from scratch, I would determine the internal and external circuits needed for each section and get them working separately.  This is basically like crawling before trying to walk.  Once I made sure each functional section is working to the needed specifications, I then try to code all the sections to operate as a functional system.

This method is the equivalent to "Eating the elephant one piece at a time."

It sounds like you have jumped into someone's project and expected it to work.  If all the external circuits are not attached properly, this is almost guaranteed not to work.

You need to understand Olav's project and its' pieces.   Therefore you can present issues to the forum for each piece.

For example:  The USBFS component in TopDesign appears to be configured as a UART style interface.   Have you tried to communicate to it using a PC terminal program?

Len
"Engineering is an Art. The Art of Compromise."
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

shuvra1,

I have done a quick check of the Potentiostat.zip you've provided.

There are a few issues with the code you provided.  Some of these issues MIGHT BE contributing to issues you are seeing.

I noticed that the Olav Bjerke  project uses the CY8CKIT-050 evaluation board.  However it appears you have changed the target device to that which is used on the CY8CKIT-059.

What other changes have you made to the original Bjerke project?

Do you have the original Bjerke project?

I can see based on Bjerke's code that until the PSoC establishes a 'correct' communication with the USB port on the PC, it doesn't proceed.  This might be the first issue that needs to be corrected.

I also noticed that the USBFS configuration VID and PID are 04B4 and F232 which is the same as that of the USB_UART.  Also the "Device Class:" is listed as FF (Vendor-Specific) which is different than the USB_UART.  This might be a problem.   

Were these parameters changed from the original Bjerke project?

Len
"Engineering is an Art. The Art of Compromise."
lock attach
Attachments are accessible only for community members.

Yes It's an original olav bjreke project . That parameter has been changed when it was not working (Original USBFS -Attached below) .Please guide me further on this. Thesis enclosed.Please guide me & revert me back. What ever necessary changes you might required & provide those files me back after major changes done by you. It's a humble request to you.  HEX & GUI (EXE).

shuvra1_0-1663814256596.png

 

0 Likes

shuvra1,

The files you provided in the previous post is EXACTLY the same as the ones you provided in the first post of this thread.

The Potentiostat.zip is NOT the original Olav Bjerke project.  It has been altered.

If I can obtain the original  project, I might be able to glean new information that might help you.

The main issue starts with the fact that you changed the VID and PID from the original settings to the settings used for the USB UART.

Based on this pic:

Len_CONSULTRON_1-1663851454987.png

you are stating the original VID and PID are 0x04B5 and 0x0081 respectively.

All the parameters listed in the "Device Descriptors" are important to the USB communications used by the Python scripts.

I must note that I have limited experience in USB configuration.  It would be best for someone else with more experience to weigh in on this issue.

Once a USB slave device is powered up on the USB bus, the PC looks for a '.inf' file where the VID and PID match.  In this case, I changed the VID to 0x4B5 and the PID to 0x0081.

You will notice in a Device Manager snip, that the device "Potentiostat" shows up but the icon symbol on top of it (Len_CONSULTRON_2-1663854662033.png) indicates it is not operational.

Reading the event for this device it indicates the read VID and PID but the Driver Name: equals null.  (It could not identify the driver to use.)

Len_CONSULTRON_3-1663854735286.png

Since it couldn't find the .inf file that matches the VID and PID, it couldn't determine which .sys driver file to load.  (Sometimes a special .dll file is also used.)

This is why the original  Olav Bjerke project files may be necessary.  Beside setting the proper USB configuration data in the "Device Descriptor" the support files (.inf, .sys and possibly .dll) may be necessary to continue to move forward.

Len
"Engineering is an Art. The Art of Compromise."
lock attach
Attachments are accessible only for community members.

Please provide your email Id or something like that so that I mail you. Top design.cysch file in earlier zip

shuvra1_0-1663855729434.png

shuvra1_1-1663855737623.png

shuvra1_2-1663855767867.png

He has used Zadig driver Installer. In his thesis, all code has been given(From last). Please do the needful, I will be highly obliged in my entire life.

0 Likes
lock attach
Attachments are accessible only for community members.

Can you please set the UART according to main.c /usb protocol.c /usbprotocol.h? 

And in python script wherever required.VID & PID & other stuff. 

And revert me the file as zip as well

Thesis available in internet. 

https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.duo.uio.no/bitstream/handle/10852/8...

He has mentioned all code in his thesis.Its a humble request to you.

Top design.cysch file in earlier zip

0 Likes

shuvra1,

You have provided, yet again, the same information you have already provided.  The requested original project with the .inf and .sys files to provide the USB communication configuration data and driver ARE NOT PRESENT.  Without these files, I am not able to progress.

I recommend you contact the original author (Olav Bjerke) directly to acquire this information.

Len
"Engineering is an Art. The Art of Compromise."

Screenshot_2022-09-22-21-13-30-72_e307a3f9df9f380ebaf106e1dc980bb6.jpg

0 Likes
lock attach
Attachments are accessible only for community members.

Those are new data from Olav itself,. Top design .cysch file in earlier zip. He has mentioned all code in his thesis that has been attached .Please go through once. He has used zadig driver installer. He wrote in his thesis

0 Likes

shuvra1,

The pdf from Olav's thesis does indicate VID = 0x04B4 and PID = 0xF232.  (Ref: pgs 143 and 144)

I have downloaded the zadig utility to install the WinUSB driver.  It now does 'complain' about the "Potentiostat" device.

Len_CONSULTRON_0-1663864979042.png

I downloaded Python 3.10 tools.

What do I do next?   I tried to 'run' Potentiostat_GUI.py.  No luck.

 I'm not familiar with Python.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
lock attach
Attachments are accessible only for community members.

Please solve the problem of USBFS. According to.  

select libsub from dropdown not winsb..Please go through the thesis.

Make all python scripts in a folder.  Shift + right click window power shell write

python potentiostst_GUI.py

0 Likes

shuvra1,

I've done all you listed.

I've downloaded PyUSB and tried to install it.

This is what I get:

C:\Users\lpoma\Desktop\Potentiostat\pyusb-1.1.1>python setup.py install
C:\Users\lpoma\Desktop\Potentiostat\pyusb-1.1.1\setup.py:38: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  if LooseVersion(setuptools_version).version[0] < 12:
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
  warnings.warn(
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
  warnings.warn(
WARNING: The wheel package is not available.
WARNING: The wheel package is not available.
WARNING: The wheel package is not available.
WARNING: The wheel package is not available.
WARNING: The wheel package is not available.
running install
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\command\easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0\\Lib\\site-packages\\test-easy-install-7264.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0\Lib\site-packages\

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://setuptools.pypa.io/en/latest/deprecated/easy_install.html

Please make the appropriate changes for your system and try again.


C:\Users\lpoma\Desktop\Potentiostat\pyusb-1.1.1>

Apparently it did not install properly.

When I run the Potentiostat_GUI.py script I get the following:

C:\Users\lpoma\Desktop\Potentiostat\PythonScripts>python Potentiostat_GUI.py
Traceback (most recent call last):
  File "C:\Users\lpoma\Desktop\Potentiostat\PythonScripts\Potentiostat_GUI.py", line 4, in <module>
    import Potentiostat_communication
  File "C:\Users\lpoma\Desktop\Potentiostat\PythonScripts\Potentiostat_communication.py", line 9, in <module>
    import usb.core
ModuleNotFoundError: No module named 'usb'

C:\Users\lpoma\Desktop\Potentiostat\PythonScripts>

Until I solve this issue, I am stopped.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
lock attach
Attachments are accessible only for community members.

Install all ML package .Please go through the thesis thoroughly 

0 Likes
lock attach
Attachments are accessible only for community members.

I have found the original Olav project. 

0 Likes

Install -Tkinter, time,matplotlib,pandas ,pyusb

 

pip install 

0 Likes
lock attach
Attachments are accessible only for community members.

Is there any issue?

0 Likes

Errors found while loading "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\PSoC Creator\Potentiostat_RevA8.cydsn\TopDesign\TopDesign_01.cymacro" file. This file would not be considered in the update process.

shuvra1_0-1663906447106.png

 

0 Likes

Have you checked yet????

0 Likes
lock attach
Attachments are accessible only for community members.

Thesis might be.. Please go through .Well documented. & revert me the modified file for the same.

0 Likes

shuvra1_0-1663848778785.png

shuvra1_1-1663848821691.png

Please check with main.c & USB protocol.h

0 Likes

PS C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts> python Potentiostat_GUI.py
-------------------------------------------------
Measurement frequency: 25.00005208344184 Hz
-------------------------------------------------
Scan rate input: 0.05 V/s
Command sent: C 00479999
-------------------------------------------------
Minimum voltage input: -500 mV
Maximum voltage input: 500 mV
Start voltage input: -500 mV
Command sent: L 1532 2532 1532
-------------------------------------------------
Number of cycles input: 1
Command sent: N 01
-------------------------------------------------
Settings have been sent.
-------------------------------------------------
Plot title is stored.
-------------------------------------------------
Plot legend is stored.
-------------------------------------------------
Cyclic Voltammetry initialization has started.
ERROR: --- Failed to read. ---
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_communication.py", line 80, in usb_read
usb_input = self.ep_in.read(size, timeout)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 423, in read
return self.device.read(self, size_or_buffer, timeout)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 1029, in read
ret = fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 553, in bulk_read
return self.__read(_lib.usb_bulk_read,
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 692, in __read
ret = int(_check(fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 447, in _check
raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'libusb0-dll:err [_usb_reap_async] timeout error\n'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py", line 1921, in __call__
return self.func(*args)
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_GUI.py", line 273, in Start_CV_scan
self.user.run_CyclicVoltammetry()
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_userinput.py", line 120, in run_CyclicVoltammetry
data = self.comm.usb_collect_data()
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_communication.py", line 87, in usb_collect_data
data_collect = self.usb_read(64,timeout=10000)
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_communication.py", line 83, in usb_read
print(self.ep_in.read(size, timeout))
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 423, in read
return self.device.read(self, size_or_buffer, timeout)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 1029, in read
ret = fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 553, in bulk_read
return self.__read(_lib.usb_bulk_read,
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 692, in __read
ret = int(_check(fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 447, in _check
raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'libusb0-dll:err [_usb_reap_async] timeout error\n'

 

@Sahil_K 

0 Likes
shuvra1
Level 5
Level 5
100 sign-ins 10 likes given 100 replies posted

PS C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts> python Potentiostat_GUI.py
-------------------------------------------------
Measurement frequency: 500.02083420142503 Hz
-------------------------------------------------
Scan rate input: 1.0 V/s
Command sent: C 00023999
-------------------------------------------------
Minimum voltage input: -500 mV
Maximum voltage input: 500 mV
Start voltage input: -500 mV
Command sent: L 1532 2532 1532
-------------------------------------------------
Number of cycles input: 1
Command sent: N 01
-------------------------------------------------
Settings have been sent.
-------------------------------------------------
Plot title is stored.
-------------------------------------------------
Plot legend is stored.
-------------------------------------------------
Cyclic Voltammetry initialization has started.
ERROR: --- Failed to read. ---
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_communication.py", line 80, in usb_read
usb_input = self.ep_in.read(size, timeout)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 423, in read
return self.device.read(self, size_or_buffer, timeout)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 1029, in read
ret = fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 553, in bulk_read
return self.__read(_lib.usb_bulk_read,
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 692, in __read
ret = int(_check(fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 447, in _check
raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'libusb0-dll:err [_usb_reap_async] timeout error\n'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py", line 1921, in __call__
return self.func(*args)
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_GUI.py", line 273, in Start_CV_scan
self.user.run_CyclicVoltammetry()
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_userinput.py", line 120, in run_CyclicVoltammetry
data = self.comm.usb_collect_data()
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_communication.py", line 87, in usb_collect_data
data_collect = self.usb_read(64,timeout=10000)
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_communication.py", line 83, in usb_read
print(self.ep_in.read(size, timeout))
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 423, in read
return self.device.read(self, size_or_buffer, timeout)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 1029, in read
ret = fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 553, in bulk_read
return self.__read(_lib.usb_bulk_read,
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 692, in __read
ret = int(_check(fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 447, in _check
raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'libusb0-dll:err [_usb_reap_async] timeout error\n'
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py", line 1921, in __call__
return self.func(*args)
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_GUI.py", line 338, in Save_data_and_settings
self.user.Save_Data_CV()
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_userinput.py", line 166, in Save_Data_CV
df = pd.DataFrame(d)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\frame.py", line 636, in __init__
mgr = dict_to_mgr(data, index, columns, dtype=dtype, copy=copy, typ=manager)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\internals\construction.py", line 502, in dict_to_mgr
return arrays_to_mgr(arrays, columns, index, dtype=dtype, typ=typ, consolidate=copy)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\internals\construction.py", line 120, in arrays_to_mgr
index = _extract_index(arrays)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\internals\construction.py", line 664, in _extract_index
raise ValueError("If using all scalar values, you must pass an index")
ValueError: If using all scalar values, you must pass an index

0 Likes
lock attach
Attachments are accessible only for community members.

Possible error

0 Likes
shuvra1
Level 5
Level 5
100 sign-ins 10 likes given 100 replies posted

shuvra1_1-1663814885390.png

Blue LED has been off 

shuvra1_2-1663814921418.png

 

0 Likes
lock attach
Attachments are accessible only for community members.
shuvra1
Level 5
Level 5
100 sign-ins 10 likes given 100 replies posted

Please do respond it seems like the problem is with USBFS itself.

0 Likes
lock attach
Attachments are accessible only for community members.
 
0 Likes
shuvra1
Level 5
Level 5
100 sign-ins 10 likes given 100 replies posted

It is able to send communication command data. But unable to generate CSV file. We are in the extremely last stage.

0 Likes
pacr_284376
Level 5
Level 5
100 replies posted 10 solutions authored 50 sign-ins

shuvra1 wrote : "It is able to send communication command data."

So you say the USBFS does work than ? Wo is unable to generate the CSV file ? I guess that is the PC application which has nothing to do with the embedded software or hardware. CSV file problems often have to do with windows setup such as decimal points/commas, date notation and that kind of windows-related errors. Please be more specific on the CSV error.

0 Likes

PS C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts> python Potentiostat_GUI.py
-------------------------------------------------
Measurement frequency: 25.00005208344184 Hz
-------------------------------------------------
Scan rate input: 0.05 V/s
Command sent: C 00479999
-------------------------------------------------
Minimum voltage input: -500 mV
Maximum voltage input: 500 mV
Start voltage input: -500 mV
Command sent: L 1532 2532 1532
-------------------------------------------------
Number of cycles input: 1
Command sent: N 01
-------------------------------------------------
Settings have been sent.
-------------------------------------------------
Plot title is stored.
-------------------------------------------------
Plot legend is stored.
-------------------------------------------------
Cyclic Voltammetry initialization has started.
ERROR: --- Failed to read. ---
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_communication.py", line 80, in usb_read
usb_input = self.ep_in.read(size, timeout)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 423, in read
return self.device.read(self, size_or_buffer, timeout)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 1029, in read
ret = fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 553, in bulk_read
return self.__read(_lib.usb_bulk_read,
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 692, in __read
ret = int(_check(fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 447, in _check
raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'libusb0-dll:err [_usb_reap_async] timeout error\n'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py", line 1921, in __call__
return self.func(*args)
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_GUI.py", line 273, in Start_CV_scan
self.user.run_CyclicVoltammetry()
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_userinput.py", line 120, in run_CyclicVoltammetry
data = self.comm.usb_collect_data()
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_communication.py", line 87, in usb_collect_data
data_collect = self.usb_read(64,timeout=10000)
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_communication.py", line 83, in usb_read
print(self.ep_in.read(size, timeout))
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 423, in read
return self.device.read(self, size_or_buffer, timeout)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 1029, in read
ret = fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 553, in bulk_read
return self.__read(_lib.usb_bulk_read,
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 692, in __read
ret = int(_check(fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 447, in _check
raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'libusb0-dll:err [_usb_reap_async] timeout error\n'

0 Likes
vishnu
Community Manager
Community Manager
Community Manager
10 comments on blog 50 likes received 50 replies posted

Dear @shuvra1 , 

We welcome everyone in need of support with Infineon products in this community.

However, we prioritize bugs/defects in our products, and do not guarantee support on projects developed outside Infineon. There is an emphasis on this especially for students, as it has been brought to our attention by professors that community support has been misused in the past to complete academic projects without putting necessary effort from the students' side. 

Please note the best practice to follow here are to

  • Only ask relevant product related queries (with relevant public information) in the community. 
  • Always search first (in the community, or outside) for simple queries; as they may have been already answered. If you couldn't find anything, please feel free to ask. 
  • Do not ask so many questions in different threads; club whatever you can, and limit the number of threads per day. Always remember, there are also others  that need expert help from our members. 
  • Be polite towards the support engineers and community champions helping you. 

The community moderators will remove the threads and ban members from the community if the guidelines are not followed. 

 

Regards,

Vishnu Nair

Community Manager

 

Cc: @Latha_S 

 

 

shuvra1
Level 5
Level 5
100 sign-ins 10 likes given 100 replies posted

shuvra1_0-1663852634460.png

 

0 Likes
shuvra1
Level 5
Level 5
100 sign-ins 10 likes given 100 replies posted

PS C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts> python Potentiostat_GUI.py
-------------------------------------------------
Measurement frequency: 25.00005208344184 Hz
-------------------------------------------------
Scan rate input: 0.05 V/s
Command sent: C 00479999
-------------------------------------------------
Minimum voltage input: -500 mV
Maximum voltage input: 500 mV
Start voltage input: -500 mV
Command sent: L 1532 2532 1532
-------------------------------------------------
Number of cycles input: 1
Command sent: N 01
-------------------------------------------------
Settings have been sent.
-------------------------------------------------
Plot title is stored.
-------------------------------------------------
Plot legend is stored.
-------------------------------------------------
Cyclic Voltammetry initialization has started.
ERROR: --- Failed to read. ---
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_communication.py", line 80, in usb_read
usb_input = self.ep_in.read(size, timeout)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 423, in read
return self.device.read(self, size_or_buffer, timeout)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 1029, in read
ret = fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 553, in bulk_read
return self.__read(_lib.usb_bulk_read,
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 692, in __read
ret = int(_check(fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 447, in _check
raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'libusb0-dll:err [_usb_reap_async] timeout error\n'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py", line 1921, in __call__
return self.func(*args)
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_GUI.py", line 273, in Start_CV_scan
self.user.run_CyclicVoltammetry()
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_userinput.py", line 120, in run_CyclicVoltammetry
data = self.comm.usb_collect_data()
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_communication.py", line 87, in usb_collect_data
data_collect = self.usb_read(64,timeout=10000)
File "C:\Users\Avinash\OneDrive - hyderabad.bits-pilani.ac.in\Documents\Python Scripts\Potentiostat_communication.py", line 83, in usb_read
print(self.ep_in.read(size, timeout))
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 423, in read
return self.device.read(self, size_or_buffer, timeout)
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\core.py", line 1029, in read
ret = fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 553, in bulk_read
return self.__read(_lib.usb_bulk_read,
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 692, in __read
ret = int(_check(fn(
File "C:\Users\Avinash\AppData\Local\Programs\Python\Python310\lib\site-packages\usb\backend\libusb0.py", line 447, in _check
raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'libusb0-dll:err [_usb_reap_async] timeout error\n'

0 Likes
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

shuvra1,

It appears that you didn't find the original Olav Bjerke project files but rather tried to recreate the project from the O.B. thesis pdf.

Where did you get or find the TopDesign.cysch file?   Many of the parameters used in Olav's project are included in the thesis pdf.  However, not all.   This might be the a great part of the issue you are having.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
lock attach
Attachments are accessible only for community members.

Can you mark up kindly those parameters & send me here attach as a clips (25) or you can directly try to recreate that as a expertise. Top design file has been provided by Olav bjerke. Please help me to sort out. You might able to identify what is the issue I am facing & why I am facing.

0 Likes

shuvra1,

I have seen this jpg of an email from OB.   The files you have included appear to be changed from the CY8CKIT-050 that OB used in his thesis to accommodate the CY8CKIT-059 you are using.

I'm concerned if any of the details of the TopDesign.cysch file have been altered from the original.  In particular the parameters of the USBFS component.

I'm still having difficulty getting the python scripts to be configured properly so that this is preventing me from advancing as far as you have.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes