Error using the invoke function,picoscope
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Swaraj
2023-4-4
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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!