Script error requires PC restart (PicoLog 1216)

Post your MATLAB discussions here
Post Reply
seeek
Newbie
Posts: 0
Joined: Sat Jan 04, 2020 1:51 am

Script error requires PC restart (PicoLog 1216)

Post by seeek » Sat Jan 04, 2020 2:38 am

Hello,

I am in the process of modifying the PL1000 series MATLAB example script ('PL1000_Streaming_Example.m') to output a single (averaged) value, instead of a graph, and to measure on a user-specified number of inputs, instead of a hard-coded two channels.

My progress is hampered by the fact that I need to reboot the whole computer (not just MATLAB) whenever something goes wrong in the loop. I don't seem to be able to close the datalogger by running individual lines or sections of the script, such as the last two sections of code. Anything I do seems to lead to a reference to a non-existent field 'UnitHandle'. Neither a MATLAB restart nor a PicoLog disconnect/reconnect gets me past this.

Is there a way I can expedite my process by getting around all these PC restarts? I do see a line in this thread:
If there is an issue connecting to the device after an error has been encountered when running a script call the disconnect function on the icdevice object and try connecting again.
However, I can't find any reference to such a function in the PL1000 Programmer's Guide and I don't know what an icdevice is. (probably my PicoLog?)

There must be a way to close the device, get rid of the unit handle, whatever, but I don't know what it is, and I'm also not very good in C.

Thanks for any help you can provide.

JonasM
Newbie
Posts: 0
Joined: Wed Jan 29, 2020 3:13 pm

Re: Script error requires PC restart (PicoLog 1216)

Post by JonasM » Wed Jan 29, 2020 3:26 pm

Hello seeek,

I have the same problem with the PicoScope 2204A. I managed to avoid the whole computer reboot by doing following steps:

- Close Matlab
- Open Windows' Device Manager
- Disable the Oscilloscope - see attached image (sometimes it tells me that a computer reboot is required, sometimes not. I don't know what's the criterion)
- Enable the Oscilloscope (sometimes it tells me that a computer reboot is required, sometimes not. I don't know what's the criterion)
- Restart Matlab

I hope it helps a bit.
Jonas
Attachments
desactiver1.png

Post Reply