Feasibility on Simulink/Stateflow controller

Hi all

I work for an automotive OEM, and am looking to do some pretty simple test work of a controller written in simulink using the stateflow block set.

The test rig will have 2-3 analogue inputs (temp, pressure sensors etc.) and a single digital output controlling a solenoid valve.

I've been looking into different methods for building this rig, but many in-house or third party systems available to us seem overly complex/expensive for what on the surface appears to be a very simple setup.

Can anyone advise on how feasible this would be using an arduino board? can simulink and stateflow be used in conjuction with an arduino and would it take someone with intermediate programming ability long to get to grips with it?

All the best

can simulink and stateflow be used in conjuction with an arduino

No you program an arduino in C or C++
You can write the C code equivalent of your state flow however, if you have the coding skills. It is not too difficult.

Grumpy_Mike:

can simulink and stateflow be used in conjuction with an arduino

No you program an arduino in C or C++ You can write the C code equivalent of your state flow however, if you have the coding skills. It is not too difficult.

Thanks for the quick reply. I was under the impression you can use Arduino Target to program the board directly from simulink? my only concern is whether or not Stateflow is compatible with this approach

you can use Arduino Target to program the board directly from simulink

Never come across this, do you have a link?

Grumpy_Mike: Never come across this, do you have a link?

http://www.mathworks.co.uk/academia/arduino-software/arduino-simulink.html

This is what i've been looking at. But no mention of stateflow support. I'm assuming it would work, but would rather be 100% before spending the money!

Thanks for the link. :)

But no mention of stateflow support.

If it involves spending money they I would ask them before parting with cash. Then if they tell you wrong you can get your money back.

As noted in the description, the Embedded Coder Support Package for Arduino (http://www.mathworks.com/matlabcentral/fileexchange/30277-embedded-coder-support-package-for-arduino) does support Stateflow as well as Simulink. Best Regards, Dave