<?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: Bitwise Functions in Lookout</title>
    <link>https://ni.lithium.com/t5/Lookout/Bitwise-Functions/m-p/5206#M101</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I needed to do the same thing myself for decoding a barcode in Lookout and&lt;BR /&gt;could never find a way of doing it other than these:&lt;BR /&gt;&lt;BR /&gt;Use a PLC for the basic math then communicate the result.&lt;BR /&gt;Use LabVIEW or similar "other" software and share the info.&lt;BR /&gt;Write a lot of expressions.&lt;BR /&gt;&lt;BR /&gt;In order to get around an IO limitation (shhhh!) I created a load of expressions&lt;BR /&gt;in Lookout to decode PLC registers into bits.  It works ok but for a 16 bit&lt;BR /&gt;word you need 31 expressions so it may not be worth it.&lt;BR /&gt;&lt;BR /&gt;John &lt;BR /&gt;</description>
    <pubDate>Wed, 22 Nov 2000 22:17:57 GMT</pubDate>
    <dc:creator>John Dunlop</dc:creator>
    <dc:date>2000-11-22T22:17:57Z</dc:date>
    <item>
      <title>Bitwise Functions</title>
      <link>https://ni.lithium.com/t5/Lookout/Bitwise-Functions/m-p/5204#M99</link>
      <description>I need to check a bit-packed status word for various combinations of&lt;BR /&gt;conditions that may or may not be On at the same time.  Doing it in&lt;BR /&gt;decimal, checking every possible combination, is not practical.&lt;BR /&gt;&lt;BR /&gt;Are there any functions to allow logical ANDing of signals to bit&lt;BR /&gt;patterns?&lt;BR /&gt;&lt;BR /&gt;E.g., in VB I'd write&lt;BR /&gt;    If  Input_A  And  &amp;amp;H4  Then msg = "VideoIn Failure"&lt;BR /&gt;to see if the third bit of byte Input_A is On (= binary x1xx).&lt;BR /&gt;&lt;BR /&gt;Anyway to do that besides checking a single bit at a time using&lt;BR /&gt;getbit()?  One odd note about this device's status word, a decimal 63&lt;BR /&gt;(binary 0011 1111) means Boards Nominal, else each bit 0 through 5 means&lt;BR /&gt;a specific error which may or may not be happening at the same time.  So&lt;BR /&gt;a nested IF is not practical with 62 bit combinatio&lt;BR /&gt;ns.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Alan Richard&lt;BR /&gt;NASA Glenn Research Center&lt;BR /&gt;Cleveland, Ohio&lt;BR /&gt;&lt;BR /&gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Historical, though non-PC, quote of the day:&lt;BR /&gt;&lt;BR /&gt;"We have staked the whole future of America's civilization,&lt;BR /&gt;not upon the power of government, far from it.&lt;BR /&gt;We have staked the future of all our political institutions&lt;BR /&gt;....upon the capacity of each and all of us to govern ourselves&lt;BR /&gt;according to the Ten Commandments of God."  - James Madison &lt;BR /&gt;</description>
      <pubDate>Thu, 07 Sep 2000 21:37:41 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Lookout/Bitwise-Functions/m-p/5204#M99</guid>
      <dc:creator>Alan Richard</dc:creator>
      <dc:date>2000-09-07T21:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Bitwise Functions</title>
      <link>https://ni.lithium.com/t5/Lookout/Bitwise-Functions/m-p/5205#M100</link>
      <description>Alan,&lt;BR /&gt;&lt;BR /&gt;as far I know there is no boolean math implemented in Lookout (God knows I&lt;BR /&gt;need it a lot...), but the only solution I have used is to connect the value&lt;BR /&gt;expression of n switches with the function getbit() to the word I'm reading.&lt;BR /&gt;With every switch changing states when the bits change I can use the switch&lt;BR /&gt;events to test the conditions... Maybe it's a lot of work, but is the only&lt;BR /&gt;way I've found to do this... The problem is worse if you have to assemble a&lt;BR /&gt;word from these switches and the switches must be manipulated by the user.&lt;BR /&gt;&lt;BR /&gt;Maybe NI can implement some boolean objects and/or include boolean math to&lt;BR /&gt;the next Lookout version. I hope they do so ASAP.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Joaquin Villanueva&lt;BR /&gt;T-Systems &lt;BR /&gt;</description>
      <pubDate>Thu, 21 Sep 2000 21:49:28 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Lookout/Bitwise-Functions/m-p/5205#M100</guid>
      <dc:creator>Joaquin Villanueva</dc:creator>
      <dc:date>2000-09-21T21:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: Bitwise Functions</title>
      <link>https://ni.lithium.com/t5/Lookout/Bitwise-Functions/m-p/5206#M101</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I needed to do the same thing myself for decoding a barcode in Lookout and&lt;BR /&gt;could never find a way of doing it other than these:&lt;BR /&gt;&lt;BR /&gt;Use a PLC for the basic math then communicate the result.&lt;BR /&gt;Use LabVIEW or similar "other" software and share the info.&lt;BR /&gt;Write a lot of expressions.&lt;BR /&gt;&lt;BR /&gt;In order to get around an IO limitation (shhhh!) I created a load of expressions&lt;BR /&gt;in Lookout to decode PLC registers into bits.  It works ok but for a 16 bit&lt;BR /&gt;word you need 31 expressions so it may not be worth it.&lt;BR /&gt;&lt;BR /&gt;John &lt;BR /&gt;</description>
      <pubDate>Wed, 22 Nov 2000 22:17:57 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/Lookout/Bitwise-Functions/m-p/5206#M101</guid>
      <dc:creator>John Dunlop</dc:creator>
      <dc:date>2000-11-22T22:17:57Z</dc:date>
    </item>
  </channel>
</rss>

