Error when trying to create a device object (to connect to PS2205A PicoScope) from Matlab GUIDE OpeningFcn
조회 수: 1 (최근 30일)
이전 댓글 표시
When I try to create a device object with 'icdevice' from a GUIDE created OpeningFcn:
ps2000DeviceObj = icdevice('picotech_ps2000_generic.mdd');
after I configured the PicoScope with the default PS2000Config.m file, I get an error:
Error using icdevice (line 313) An error occurred while executing the driver create code. Undefined function or variable 'ps2000Enuminfo'. If the error is not an instrument error, use MIDEDIT to inspect the driver.
The error states that 'ps2000Enuminfo' struct is undefined but that is not the case when entering the icdevice function call (can be seen by putting a breakpoint). I even declared all driver related variables as globals. The strange thing is that when I perform the same actions from the command line (e.g. by running the default PicoScope example scripts), it runs properly!
Anyone who can help on this issue?
댓글 수: 0
답변 (1개)
Pico Technology
2017년 5월 24일
Hi Gerco,
The reason that you are getting the error is that the ps2000Enuminfo struct is likely to be in a different workspace (base) than the GUIDE GUI.
Regards,
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!