Pages: [1]   Go Down
Author Topic: Matlab arduino controller/DAQ  (Read 591 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I am trying to build a controller and DAQ system for controlling come actuators and reading several sensors.  Currently I have written two separate programs; one that lets me read n number of sensors and print them to serial continuously and another program that selects the actuator that I need to control then sets its set point.

The problem lies in combining the two.  Ideally the system will stream the sensor values through the serial to matlab however I want to occasionally send a new setpoint (from matlab) for the actuators.  Is there a way within matlab to do this?  

When the sensor data is streaming - matlab is busy.  I also dont want to have to specify the actuator setpoints on every loop.  So I think I need a sort of interupt within matlab which I'm not sure exists.

Any ideas guys?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In newer versions of Matlab, there is a Timer object that can call a given function at regular intervals. There is also a timer specifically associated with the Serial port object that dates back to Matlab 6.0 at least.

cheers, e.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks but thats not really what I'm after.  I cannot afford to add any delays into the loop by using timers.  The arduino will be eventually used as part of a control system so adding any delays could cause my system to become unstable.
Logged

Pages: [1]   Go Up
Jump to: