The Matlab script which I wrote is going to be used as a feedback for my control system. I have downloaded a library done called "Custom Arduino Library for HX711" by Nicholas Giacoboni.
I want to convert a Matlab script which I wrote Matlab script. I have also tested the script by itself and it works.
HX711 is a load cell amplifier ADC converter.
function data = Loadcell()
eml.extrinsic('arduino','addon','read_HX711')
a = arduino('COM5','Mega2560','libraries','ExampleAddon/HX711');
scale = -338000;
while 1
LoadCell = addon(a, 'ExampleAddon/HX711',{'D6','D5'});
data = (read_HX711(LoadCell)-7388092)/scale
end
end
the layout of simulink at the moment Simulink function block.
And I run Simulink on Normal mode and simulation stop time at inf it comes up with this error. How do I solve this error and get this working?
Regards,
Allan