Hi,
I'm trying to run "matlab_example_callback.m" for BrickletVoltageCurrent.
When the example code "set(vc, 'PowerReachedCallback', @(h, e) cb_power_reached(e));" is executed MATLAB reports the following error:
java.lang.NullPointerException
at com.mathworks.jmi.bean.MatlabBeanInterface.addCallback(MatlabBeanInterface.java:484)
at com.mathworks.jmi.bean.MatlabCallbackInterface.addCallback(MatlabCallbackInterface.java:130)
If I type set(vc) there is no callback class listed to register...
Class: [1x1 java.lang.Class]
Configuration: [1x1 com.tinkerforge.BrickletVoltageCurrent$Configuration]
Current: 0
CurrentCallbackPeriod: 1000
CurrentCallbackThreshold: [1x1 com.tinkerforge.BrickletVoltageCurrent$CurrentCallbackThreshold]
DebouncePeriod: 100
Identity: [1x1 com.tinkerforge.Device$Identity]
Power: 0
PowerCallbackPeriod: 0
PowerCallbackThreshold: [1x1 com.tinkerforge.BrickletVoltageCurrent$PowerCallbackThreshold]
Voltage: 0
VoltageCallbackPeriod: 0
VoltageCallbackThreshold: [1x1 com.tinkerforge.BrickletVoltageCurrent$VoltageCallbackThreshold]
The example callback won't register. Does anyone have any ideas what could be wrong here?
Many thanks