<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245441</link>
    <title>MATLAB Central Newsreader - synchronizing posttrigger DAQ with two boards</title>
    <description>Feed for thread: synchronizing posttrigger DAQ with two boards</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 26 Feb 2009 18:47:02 -0500</pubDate>
      <title>synchronizing posttrigger DAQ with two boards</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245441#631123</link>
      <author>S.J. </author>
      <description>The new upgrades to 2008b for synchronizing two NI boards are *great*.  Thanks!  &lt;br&gt;
While I've got the two boards synchronized from a start(ai) point, now I've got the challenge of stopping them with a synchronized posttrigger, specifically a posttrigger that I cannot predict in advance (i.e., we trigger after an unpredictable event).  Is this possible?  I originally thought that running the trigger on the master board would automatically stop the slave board, but it doesn't seem to work that way. &lt;br&gt;
Any ideas?&lt;br&gt;
Thanks!</description>
    </item>
    <item>
      <pubDate>Fri, 27 Feb 2009 03:56:01 -0500</pubDate>
      <title>Re: synchronizing posttrigger DAQ with two boards</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245441#631228</link>
      <author>Sherryl Radbil</author>
      <description>Hi S.J.,&lt;br&gt;
Glad you like the support for RTSI that was made available in R2008b.&lt;br&gt;
Others reading this thread can find out more at&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/rn/brw8x4l-1.html#brqy2tk-3&quot;&gt;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/rn/brw8x4l-1.html#brqy2tk-3&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/brt7oe_-1.html&quot;&gt;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/brt7oe_-1.html&lt;/a&gt;&lt;br&gt;
and the shipped file: demosync_ai_and_ao.m&lt;br&gt;
&lt;br&gt;
Regarding how to have one device stop another, consider using the StopFcn callback&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/stopfcn.html&quot;&gt;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/stopfcn.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Set the StopFcn for the main device and in the callback itself call stop on the secondary device. You could use the main device's UserData property to store the handle to the secondary device.&lt;br&gt;
&lt;br&gt;
Sherryl</description>
    </item>
    <item>
      <pubDate>Mon, 02 Mar 2009 18:39:01 -0500</pubDate>
      <title>Re: synchronizing posttrigger DAQ with two boards</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245441#631960</link>
      <author>S.J. </author>
      <description>Hi Sherryl,&lt;br&gt;
&lt;br&gt;
Thanks for the excellent suggestions.  I've played around with the StopFcn, TriggerFcn, etc., but I'm not seeing how this would yield a simultaneous trigger.  Perhaps I'm not thinking about this correctly?  Here is my thought process:&lt;br&gt;
&lt;br&gt;
I think a TriggerFcn is more appropriate than a StopFcn, because I still need to run getdata to pull the data into the workspace from both daq devices.&lt;br&gt;
&lt;br&gt;
Thus, I set the main device TriggerFcn to run a callback that triggers the secondary device.  &lt;br&gt;
&lt;br&gt;
But....it still takes time to run the TriggerFcn callback and then trigger the secondary device.  As far I can tell this would yield the same delay as just typing &quot;trigger(maindevice)&quot; and then &quot;trigger(secondarydevice)&quot; in the body of the program.&lt;br&gt;
&lt;br&gt;
I'll try some other ideas in the meantime..&lt;br&gt;
&lt;br&gt;
Thanks!&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Sherryl Radbil&quot; &amp;lt;sherryl.radbil.dontspamme@mathworks.com&amp;gt; wrote in message &amp;lt;go7o8h$2r1$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi S.J.,&lt;br&gt;
&amp;gt; Glad you like the support for RTSI that was made available in R2008b.&lt;br&gt;
&amp;gt; Others reading this thread can find out more at&lt;br&gt;
&amp;gt; &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/rn/brw8x4l-1.html#brqy2tk-3&quot;&gt;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/rn/brw8x4l-1.html#brqy2tk-3&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/brt7oe_-1.html&quot;&gt;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/brt7oe_-1.html&lt;/a&gt;&lt;br&gt;
&amp;gt; and the shipped file: demosync_ai_and_ao.m&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Regarding how to have one device stop another, consider using the StopFcn callback&lt;br&gt;
&amp;gt; &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/stopfcn.html&quot;&gt;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/stopfcn.html&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Set the StopFcn for the main device and in the callback itself call stop on the secondary device. You could use the main device's UserData property to store the handle to the secondary device.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Sherryl</description>
    </item>
    <item>
      <pubDate>Mon, 11 May 2009 14:20:02 -0400</pubDate>
      <title>Re: synchronizing posttrigger DAQ with two boards</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245441#648946</link>
      <author>Gautam Vallabha</author>
      <description>&lt;br&gt;
The basic issue is how to get pretrigger data when you have synchronized input channels. This can be done in software only (i.e., without depending on specific hardware triggering capabilities) as follows:&lt;br&gt;
1) Continuously get data from both channels,&lt;br&gt;
2) Store the data in a circular buffer&lt;br&gt;
3) when the trigger occurs (this can be a user-initiated event such as a button press), log the pretrigger data from the circular buffer.  &lt;br&gt;
&lt;br&gt;
This FileExchange entry demonstrates this procedure in more detail:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/24027&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/24027&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Gautam&lt;br&gt;
&lt;br&gt;
&quot;S.J.&quot; &amp;lt;oceansounds7@gmail.com&amp;gt; wrote in message &amp;lt;goh945$lpa$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi Sherryl,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks for the excellent suggestions.  I've played around with the StopFcn, TriggerFcn, etc., but I'm not seeing how this would yield a simultaneous trigger.  Perhaps I'm not thinking about this correctly?  Here is my thought process:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I think a TriggerFcn is more appropriate than a StopFcn, because I still need to run getdata to pull the data into the workspace from both daq devices.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thus, I set the main device TriggerFcn to run a callback that triggers the secondary device.  &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; But....it still takes time to run the TriggerFcn callback and then trigger the secondary device.  As far I can tell this would yield the same delay as just typing &quot;trigger(maindevice)&quot; and then &quot;trigger(secondarydevice)&quot; in the body of the program.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I'll try some other ideas in the meantime..&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Sherryl Radbil&quot; &amp;lt;sherryl.radbil.dontspamme@mathworks.com&amp;gt; wrote in message &amp;lt;go7o8h$2r1$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hi S.J.,&lt;br&gt;
&amp;gt; &amp;gt; Glad you like the support for RTSI that was made available in R2008b.&lt;br&gt;
&amp;gt; &amp;gt; Others reading this thread can find out more at&lt;br&gt;
&amp;gt; &amp;gt; &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/rn/brw8x4l-1.html#brqy2tk-3&quot;&gt;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/rn/brw8x4l-1.html#brqy2tk-3&lt;/a&gt;&lt;br&gt;
&amp;gt; &amp;gt; &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/brt7oe_-1.html&quot;&gt;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/brt7oe_-1.html&lt;/a&gt;&lt;br&gt;
&amp;gt; &amp;gt; and the shipped file: demosync_ai_and_ao.m&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Regarding how to have one device stop another, consider using the StopFcn callback&lt;br&gt;
&amp;gt; &amp;gt; &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/stopfcn.html&quot;&gt;http://www.mathworks.com/access/helpdesk/help/toolbox/daq/stopfcn.html&lt;/a&gt;&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Set the StopFcn for the main device and in the callback itself call stop on the secondary device. You could use the main device's UserData property to store the handle to the secondary device.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Sherryl</description>
    </item>
  </channel>
</rss>

