analogdevicesinc / alice

Active Learning Interface for Circuits and Electronics
Other
16 stars 4 forks source link

Long time base (200ms/div or more) freezes application #5

Closed kaamil1984 closed 4 years ago

kaamil1984 commented 4 years ago

Hi guys,

I have Alice 1.2 with libsmu-1.0.0-setup-x86.exe (Alice 1.3 doesn't work on my Windows 10).

It is "Program is not responding" kind of problem. I can't do any slow measurement.

I have tried to reduce sample rate but change sample rate feature doesn't work in Alice 1.2.

Console says:

image

But interface shows new sample rate I entered:

image

After this I can't do anything, because when I click "Run" after sample rate change - Alice freezes forever even with short time bases.

Originally posted by @kaamil1984 in https://github.com/analogdevicesinc/alice/issues/4#issuecomment-584424648

It happens on i7-7gen, 32GB RAM, NVMe, all USB 3.0 laptop (not that old).

damercer commented 4 years ago

Don't try to mix old versions of libsmu when running from the Python source. If you are using Windows 10 ( or 8 or 7 ) it is recommended that you use the Windows executable installer from here:

https://github.com/analogdevicesinc/alice/releases/download/1.3.4/alice-desktop-1.3-setup.exe

It contains the appropriate version level of libsmu. Does not require that Python or libsmu be installed on the computer.

As to the slow response when acquiring long spans of time i.e. greater than 0.5 seconds. You probably want to take a look at either the strip chart recorder or data logger stand alone tools. ( both contained in the Windows installer ). Using them you can capture any length of time with sample rates up to 300 or so sps. I think the data logger has a screen to control the output channels as well (DC values). But these tools are not as feature rich as the full desktop tool so don't expect to do anything more than capture data.

kaamil1984 commented 4 years ago

If you are using Windows 10 ( or 8 or 7 ) it is recommended that you use the Windows executable installer from here:

https://github.com/analogdevicesinc/alice/releases/download/1.3.4/alice-desktop-1.3-setup.exe

It contains the appropriate version level of libsmu. Does not require that Python or libsmu be installed on the computer.

I uninstalled Alice and libsmu. I have clean Python 2.7 32-bit with numpy and I'm getting this warning:

image

and this shows up in command line window:

image

Actually this is the reason why I started to mess around with older versions.

This is my python version:

image

Python is installed in C:\Python27, which is added to Windows PATH, as well as c:\Python27\Scripts.

Here is my pip packages list:

image

(if you wonder what console is this - it is cmd.exe, I just customized console prompt in Windows environment variables)

Do you have any ideas what can be wrong?

Maybe I need to mention, that initially I had also few other Python versions installed, including Python 3.4, 3.6 and 3.7.

damercer commented 4 years ago

Why are you not using the Windows executable version?

kaamil1984 commented 4 years ago

I am using Windows executable version from link. These screenshots are from exe 1.3.4 installed from the link you gave me: https://github.com/analogdevicesinc/alice/releases/download/1.3.4/alice-desktop-1.3-setup.exe.

Looks like installer is not installing pysmu/libsmu?

kaamil1984 commented 4 years ago

Well, I took sources from github. I started IDLE and debugged it.

I realized, that it needs pysmu and there is no pysmu on my computer. I installed it into python 2.7-64 and ran source in IDLE. It starts.

damercer commented 4 years ago

You might be running into protection issues when installing the Windows exe. I just tried to install on this ADI issued Windows 10 laptop which has strong protection settings ( company owned computer ) and it would not let me copy certain files into the C:\ALM Software\M1K directories. ALICE does not find the pysmu module. However, I have not had any similar problems installing on computers I own ( with less stringent protection settings ). Other users I've had offline interactions with have not seen any such permission issues ) Not sure what to suggest.

damercer commented 4 years ago

OK, a little more investigation to see just what is required to run the Windows .exe. I uninstalled pysmu from Python. Windows .exe file ran as expected. I then uninstalled libsmu. Windows .exe halted with pysmu not found error. So it would seem that I am mistaken and something has changed since I last looked at all this and Libsmu is indeed now needed to run the .exe version. Sorry for the confusion. I think the libsmu developers changed tools since and now py2exe no longer finds and includes the libsmu.dll.

Does the .exe file now run with libsmu installed? It might not if you installed the 64 bit version. I build the .exe with the 32 bit version (was the least common denominator at the time).

kaamil1984 commented 4 years ago

Well, I tested this deeper. So I figured out that pysmu is not the same thing as libsmu.

Indeed it looks like the exe (which is 32-bit) can't see .dll in its own directory.

I was able to run from source, because I was starting source in 64-bit python (now I have both).

kaamil1984 commented 4 years ago

Ooops we wrote all this in a wrong thread.

And back to long time base topic.

Is there any chance that long time bases will be supported?

Is this related with whole program design? I mean "screen won't refresh until we read whole memory from device" kind of problem? If it was not written in Python maybe I could help a bit, but I don't like all that Python versions and library mess, especially problematic software deploy.

I saw logger application, but this is not enough for me. I would like to take X-Y plot from some slow device. I think I expect too much from educational product that cost more than hardware installed on it :)

damercer commented 4 years ago

Sorry but you are right. To capture long periods of time you have to wait. Program is single threaded and blocked while samples are being streamed from board. There is no local buffer memory on board (to lower cost). Lowering sample rate does not help this. To capture 2 seconds of samples takes 2 seconds. It is just built that way.

The data logger script captures data in short bursts at full 100KSPS, does a quick average (sort of digital filter for noise) and keeps that one value as a time sample. Some samples are lost between bursts. Thus the max sample rate is 200 to 300 sps. (faster if plotting to screen grid is turned off)

You could log data to a file and use another application (like GNUplot) to make your X-Y plots. (or write your own script based on the datalogger)

From: kaamil1984 notifications@github.com Sent: Tuesday, February 11, 2020 1:25 PM To: analogdevicesinc/alice alice@noreply.github.com Cc: Mercer, Doug Doug.Mercer@analog.com; Comment comment@noreply.github.com Subject: Re: [analogdevicesinc/alice] Long time base (200ms/div or more) freezes application (#5)

[External]

Ooops we wrote all this in a wrong thread.

And back to long time base topic.

Is there any chance that long time bases will be supported?

Is this related with whole program design? I mean "screen won't refresh until we read whole memory from device" kind of problem?

I saw logger application, but this is not enough for me. I would like to take X-Y plot from some slow device.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/analogdevicesinc/alice/issues/5?email_source=notifications&email_token=ACZAX2V6E2PNX3G57CX5H5DRCLUN7A5CNFSM4KSYR7Q2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELNQVJA#issuecomment-584780452, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACZAX2RFIEQU5ICHZXF5LOLRCLUN7ANCNFSM4KSYR7QQ.

kaamil1984 commented 4 years ago

Well, I'm closing my issue. I expected too much from such low cost product.