Error using the invoke function,picoscope

2 vues (au cours des 30 derniers jours)
Furkan Karaman
Furkan Karaman le 20 Mar 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.

Réponses (1)

Swaraj
Swaraj le 4 Avr 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.

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by