Error using icdevice/invoke

Post your MATLAB discussions here
Post Reply
kaanrad
Newbie
Posts: 0
Joined: Sat Nov 13, 2021 11:19 pm

Error using icdevice/invoke

Post by kaanrad »

Hello
I am programming a GUI in Appdesigner/Matlab for a5444D model.
If I run an example script(PS5000A_ID_Example), it works perfect.

Now I want to use the script as function whose parameter-values are given by the GUI through a callback function if a button is pressed.
I added the following switch-case statement to the function for the channel selection.

switch ch

case 0

[status.setChA] = invoke(ps5000aDeviceObj, 'ps5000aSetChannel', ch, 1, type, range, analog_offset);

case 1

[status.setChB] = invoke(ps5000aDeviceObj, 'ps5000aSetChannel', ch, 1, type, range, analog_offset);

case 2

[status.setChC] = invoke(ps5000aDeviceObj, 'ps5000aSetChannel', ch, 1, type, range, analog_offset);

case 3

[status.setChD] = invoke(ps5000aDeviceObj, 'ps5000aSetChannel', ch, 1, type, range, analog_offset);

end


If I run the app I always get the error message in the chosen case:
Error using icdevice/invoke
ps5000aSetChannel:status code 80,please refer to the Picostatus.m file

and sometimes:
parametres must be scalars.

I checked the variables with the assignin method to show them in the workspace and they were scalars. The status code 80 says invalid analogue offset , but which values are valid?
I would be really grateful for any kind of help.

NeilH
PICO STAFF
PICO STAFF
Posts: 265
Joined: Tue Jul 18, 2017 8:28 am

Re: Error using icdevice/invoke

Post by NeilH »

Hi

There isn't enough information in the post as to why you're getting the error, would you be able to either post your .m file here or email it into support@picotech.com so that I can look at the full setup please?

Neil
Neil
Technical Support Engineer

Post Reply