Borrar filtros
Borrar filtros

Error using the invoke function,picoscope

2 visualizaciones (últimos 30 días)
Furkan Karaman
Furkan Karaman el 20 de Mzo. de 2023
Respondida: Swaraj el 4 de Abr. de 2023
Hello,
I am programming an oscilloscope app in appdesigner for a picoscope(5444D).
If I run an example script whose values are given, it works perfect.
Now I want to use instead of a script a function whose parameters are given by the GUI, if a button is pressed.
By running the function an error appears at the following line:
[status.setChA] = invoke(ps5000aDeviceObj, 'ps5000aSetChannel', ch, 1, type, range, analog_offset);
The invoke function cant be used . The error message says parameters must be scalars, but I checked the variables and all oft hem were scalars. I used the assignin method to let them appear in the workspace and then the isscalar method.
I would be really grateful for any kind of help.

Respuestas (1)

Swaraj
Swaraj el 4 de Abr. de 2023
It is difficult to say until we do not have the variables that you are sending as parameters. You can go through the following documentations to check if you are checking the variable correctly.
One thing you can try is to check that you are not sending Character Array as parameter ('ps5000aSetChannel') as they are considered non-scalers. Try sending a String Instead.

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by