<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Split LV example into event structure in LabVIEW</title>
    <link>https://forums.ni.com/t5/LabVIEW/Split-LV-example-into-event-structure/m-p/2501258#M762161</link>
    <description>&lt;P&gt;This is a good idea to introduce Event structure, so that your program can wait for 'Start' trigger and similarly for 'Stop' trigger. But I would always avoid to executing big codes inside event structures and rather I'll prefer it to do in a different state (of a &lt;EM&gt;&lt;STRONG&gt;&lt;A href="http://www.ni.com/white-paper/3024/en" target="_blank"&gt;state machine&lt;/A&gt;&lt;/STRONG&gt;&lt;/EM&gt;).&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jul 2013 08:22:13 GMT</pubDate>
    <dc:creator>moderator1983</dc:creator>
    <dc:date>2013-07-24T08:22:13Z</dc:date>
    <item>
      <title>Split LV example into event structure</title>
      <link>https://forums.ni.com/t5/LabVIEW/Split-LV-example-into-event-structure/m-p/2501248#M762158</link>
      <description>&lt;P&gt;Hi forum,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm wondering if splitting the LV example in the way I do here is fine or not. This is an example from LV (Generate DDS Clock, divide and route.vi).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://forums.ni.com/t5/image/serverpage/image-id/115606iA04229EE419BA8C0/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="LV_example.png" title="LV_example.png" align="center" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to split the example like this (have start trigger)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://forums.ni.com/t5/image/serverpage/image-id/115610iBE4B331C71E79063/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="modification.png" title="modification.png" align="center" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;regards,&lt;/P&gt;
&lt;P&gt;Yan&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 08:10:28 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Split-LV-example-into-event-structure/m-p/2501248#M762158</guid>
      <dc:creator>Mystogan</dc:creator>
      <dc:date>2013-07-24T08:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Split LV example into event structure</title>
      <link>https://forums.ni.com/t5/LabVIEW/Split-LV-example-into-event-structure/m-p/2501258#M762161</link>
      <description>&lt;P&gt;This is a good idea to introduce Event structure, so that your program can wait for 'Start' trigger and similarly for 'Stop' trigger. But I would always avoid to executing big codes inside event structures and rather I'll prefer it to do in a different state (of a &lt;EM&gt;&lt;STRONG&gt;&lt;A href="http://www.ni.com/white-paper/3024/en" target="_blank"&gt;state machine&lt;/A&gt;&lt;/STRONG&gt;&lt;/EM&gt;).&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 08:22:13 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Split-LV-example-into-event-structure/m-p/2501258#M762161</guid>
      <dc:creator>moderator1983</dc:creator>
      <dc:date>2013-07-24T08:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Split LV example into event structure</title>
      <link>https://forums.ni.com/t5/LabVIEW/Split-LV-example-into-event-structure/m-p/2501334#M762178</link>
      <description>&lt;P&gt;Yan,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the screenshot of the code looks well, from a wiring point of view.&lt;/P&gt;
&lt;P&gt;But my question is:&lt;/P&gt;
&lt;P&gt;You don't have defined an event source yet: What should that be?&lt;/P&gt;
&lt;P&gt;How can you make sure that initialization is done before trying to measure things when you split functionality into different event cases?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Overall, you have to ensure a certain order of events to occur. So this might make things more complex that simply staying by "as is" without the event structure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also the remark of moderator1983 is correct that you should avoid to insert "blocking" code in the event structure. If you have functionality talking a couple of seconds, you should use producer/consumer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Norbert&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 09:19:00 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Split-LV-example-into-event-structure/m-p/2501334#M762178</guid>
      <dc:creator>Norbert_B</dc:creator>
      <dc:date>2013-07-24T09:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Split LV example into event structure</title>
      <link>https://forums.ni.com/t5/LabVIEW/Split-LV-example-into-event-structure/m-p/2503028#M762546</link>
      <description>&lt;P&gt;Hi guys, thanks for comments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;@moderator1983:&lt;/P&gt;
&lt;P&gt;yea sure, I think I'll use state machine for my project. But this is just a question about how to convert example into event structure. Now that you mentioned it, I guess I need to put some blocks out of event structure, right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;@norbert:&lt;/P&gt;
&lt;P&gt;my hardware for this&amp;nbsp;is pxie6674T.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm working with some pxi devices and need to get them work together through one "Main.VI".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my task is actually something like this:&lt;/P&gt;
&lt;P&gt;1. Start --&amp;gt; initialization&lt;/P&gt;
&lt;P&gt;2. By&amp;nbsp;clicking "start CLK"-button, I would simply generate clk and synch the clock with my pxi clk.&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp;At this point, I can generate either analog signal (with daqmx) or digital signal (with hsdio and daqmx dig port), and also acquiring analog signal (with niscope) and digital signal (with hsdio).&lt;/P&gt;
&lt;P&gt;4. At some point, I think I'll need to generate and acquire signal at the same time, which means I can share start trigger through chassis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, I'm kinda stuck how to put them together in a Main.VI. I'm looking at example of producer/consumer with event-register structure and I think I'll try to build my system with this method.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;regards,&lt;/P&gt;
&lt;P&gt;Yan.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2013 10:08:16 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Split-LV-example-into-event-structure/m-p/2503028#M762546</guid>
      <dc:creator>Mystogan</dc:creator>
      <dc:date>2013-07-25T10:08:16Z</dc:date>
    </item>
  </channel>
</rss>

