Error using the invoke function,picoscope
3 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
Swaraj
on 4 Apr 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.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!