How exactly does the logical shift function work?

I think I am missing something very basic here - I am trying to left shift an 8 bit unsigned integer by one place (x<<1)in each iteration of a while loop. So if I start with a number, say 18, the first iteration I get 36, then 72, 144 and after this 32, 64 and so on. I'm not able to do this apparently simple operation in LabVIEW. I tried the logical shift function and a formula node, but both dont give me what I need. The formula node appears to be close in that it gives me 18,36,72,144 but after that I get 255 rather than 32. I dont understand what the logical shift function is doing here. I have attached a vi here that shows what I am trying to do. Any help explaining the mistake I am making will be greatly apprec
iated.
Thanks.
Attachments:
Logical_Shift.vi ‏17 KB

You have the inputs confused. If you want to left-shift by 1 at each iteration, the "1" goes on the upper "y" terminal and the number from the shift register (the "shiftee") goes at the bottom. (see attached modification).
LabVIEW Champion . Do more with less code and in less time .
Attachments:
Logical_Shift_2.vi ‏27 KB

Similar Messages

  • GRC - Role Expert v5.2: how does the Transaction Usage functionality work

    Hi All,
    re: GRC - Role Expert v5.2: how does the Transaction Usage functionality work
    We are implementing GRC suite v5.2, but specifically my question is regarding Role Expert:
    SAP documentation states that it is possible to use Role Expert to do the following: for roles allows you to see if, or how much, a transaction is being used, when it was last used, and who used it.
    My question is how without Audit Log or RBE?
    Let me know if you have ever used this functionality and if it requires the SAP Back-End Audit Log to be turned on or RBE.
    Thanks in advance!

    Hi Gary,
    You dont need a RBE tool activation to get the successful transaction usage log with Role Expert.
    Role Expert functionality allows you to log all the transactions that have been added/deleted to the role that is changed. Also when you create a new role via the Role Expert then automatically the transaction log starts.
    If you go the "History" tab in the Role Expert, then you can find all the last changes made to the role.
    Also you can go to the "Risk Analysis" tab to find the log of Risk Analysis performed with the added tcodes.
    Hope this helps.
    Thanks,
    Kiran Kandepalli.

  • How well does the iPhone 5s/5c work with Wind Mobile?

    I'm going to be (hopefully) getting the iphone 5s or 5c soon and I'm trying to decide on which carrier to go with. How well does the iphone 5s/5c work with wind mobile and how fast is the internet with data?

    http://www.windmobile.ca/
    iPhone: Wireless carrier support and features

  • Where in the function palette can i find the "logical shift" function (shift x by y bits)?

    i am not able to find the "logical shift" function anywhere on the functions palette (after searching EVERY where). however, i discovered the function elsewhere in another VI (by pure luck!). i could keep bringing up these VI and copying and pasting, but that's a pain...i'd like to just have it on my functions palette to begin with.
    i am running labview 6.1 thanks for your help.

    hi,
    LabVIEW's functions pallete has come with a very useful tool --> "Search" tool
    Make use of the "Search" tool should you encounter difficulty in locating the desired function. For instants, search for keyword "Logical" or "Shift" and you will be able to locate the function
    happy coding
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com

  • How to implement the barcode printing functionality working on the Prod.

    Hi,
    Can anyone help me "How to implement the barcode printing functionality working on the Prod".
    Thanks
    Gangadhara

    Check this link --> barcode

  • How exactly does the new iCloud accessing feature work?

    I have heard that the new firmware allows access to any hard drives connected to an AirPort through iCloud.
    How exactly does this feature work? Will the files be accessible on the web? Will I be able to mount the hard drive remotely if my computer is logged in with the same iCloud account?
    Please clarify, as I am considering buying now.

    The "magic" behind iCloud for accessing either your AirPort Extreme/Time Capsule or your Mac from the Internet is Back to My Mac (BtMM). For reference, iCloud replaced MobileMe.
    Here are a few links for more details around BtMM:
    Back to My Mac User Guide
    Apple Support Article

  • How to get the Wiki search functionality working?

    hi,
    Another Wiki question regarding the 7.1u1 Portal wiki functionality: What is necessary to get the wiki search functionality working? Right now when using the wiki search page all it does is return to the search form, no errors but no hits either. I guess some additional administrative work is needed to get search working?
    thanks, tom

    haven't touched anything except for the wiki template jsps to change the design. it is a linux rh4 install. there are no communities on that server (yet), just the wiki portlet in a tab so far. is the wiki search dependent on the portal search server or totally separate (ie self contained wiki search)? any additional services or such that need to be started for it to work?

  • Does the CreateFirefoxOnWindowsPlugin JS function works in Sharepoint Server 2010

    Hello,
    I read the plug-in documentation of FFWinPlugin Plug-in (http://msdn.microsoft.com/en-us/library/ff407576.aspx ).
    This article specifies that this applies to Sharepoint Foundation 2010 but
    does it also applies to Sharepoint
    Server 2010?
    Thank you.
    Kind Regards

    Hi,
    According to your post, my understanding is that you want to use FFWinPlugin Plug-in in SharePoint 2010.
    Per my knowledge, the CreateFirefoxOnWindowsPlugin JS function works in Sharepoint Server 2010.
    Here is a similar thread for your reference:
    https://social.msdn.microsoft.com/Forums/office/en-US/280bf2b2-fe35-4d46-94cf-168f5b387fde/configuring-ffwinplugin-to-enable-firefox-integration?forum=sharepointdevelopmentprevious
    In addition, I recommend that you can use IE Tab in Firefox.
    For more information, you can refer to:
    https://addons.mozilla.org/en-US/firefox/addon/ie-tab/
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Is there any way how to let the logic studio 8 work in Lion OS?

    hi, i'm now using a new macbook pro with the Lion OS. Is there a way to let the logic studio 8 work well in Lion OS? thanks!

    Considering that Logic Pro 8 was released years before Lion, I would call it "pure luck", if it runs well - I would assume that it is untested by Apple, because they probably only tested Logic Pro 9 on Lion (and released an update for it).
    However if you have Lion 10.7.2 installed, Logic Pro 8 at least launches just fine.

  • How long has the 'hey siri' function worked unplugged?

    I use my idevices and siri everyday for hours, I'm familiar with all of ios' functions. But I just discovered while using my iPhone 6 with ios 8.3 that after you hold the home button down activating siri, then ask a question, as long as you keep the siri screen open the 'hey siri' function works unplugged. Has this been the case since ios 8.0?

    simonp_au wrote:
    Ok, well after I press the home button as usual (unplugged), then ask siri a question, siri then answers. That's the way it has always worked, yes. But, if you leave the siri screen open, while unplugged, then say 'hey siri' siri activates again. Try it. And that has not always been an available function.
    I can confirm that it works. My recollection is that Siri always remained open for a minute or so after a query, but you would have to push HOME again for another question. Nice feature!

  • Help w/MaxDB Function; also: how does the "Debug SQL" function work?

    Hi there forum folks,
    In my former life, I was a Basis guy, but I haven't had the pleasure of working directly with SAP applications in a few months.  My current project is to attempt to use MaxDB in a real estate environment.  We're tracking home listings so that we can build statistical reports... such as "what agents are in the Top 100 in postal code X?"
    Anyway, as part of this project, I have attempted to construct my very first MaxDB database function.  Unfortunately, it doesn't give me the answers I'm hoping to see.  Here's the function:
    CREATE FUNCTION COUNT_LISTINGS (AGENTID CHAR(10)) RETURNS FIXED(6,1) AS
      VAR COLISTINGAGENTID CHAR(10);
          LISTINGAGENTID   CHAR(10);
          MLSNUMBER        CHAR(7);
          UNITS            FIXED(6,1);
      SET UNITS = 0;
      DECLARE FUNCTIONRESULT CURSOR FOR
        SELECT MLSNUMBER,
               LISTINGAGENTID,
               COLISTINGAGENTID FROM FREDDIE.GLAR_SOLDS
         WHERE LISTINGAGENTID = :agentid OR COLISTINGAGENTID = :agentid;
      IF $COUNT IS NULL THEN
        BEGIN
          CLOSE FUNCTIONRESULT;
          RETURN UNITS;
        END
      ELSE
        SET $RC = 0;
      WHILE $RC = 0 DO BEGIN
        FETCH FUNCTIONRESULT INTO :mlsnumber, :listingagentid, :colistingagentid;
        IF ( LISTINGAGENTID   = AGENTID AND COLISTINGAGENTID IS NULL ) OR
           ( COLISTINGAGENTID = AGENTID AND LISTINGAGENTID   IS NULL ) THEN
          SET UNITS = UNITS + 1
        ELSE
          SET UNITS = UNITS + 0.5;
      END;
    CLOSE FUNCTIONRESULT;
    RETURN UNITS;
    I've tried to follow the official MaxDB documentation.  My first deviation from that standard was the use of the "$COUNT" variable (instead of the "$RC" variable) immediately after the DECLARE/SELECT statement above.  When I tried to use $RC, for either a successful or unsuccessful query, $RC was always set to a non-zero value.
    I believe I'm past that, but now my issue is down around that FETCH statement.  The UNITS variable doesn't end up with the value I expect.  I know that it can be terribly confusing to try to analyze someone else's logic, but here's a brief narrative that describes what I'm trying to do...
    The GLAR_SOLDS table holds one line for each home sold.  It's keyed by the MLSnumber.  Each record also stores up to four agents who've been involved in the transaction: the listing agent, the co-listing agent, the selling agent, and the co-selling agent.  The database function I've written above pertains to the listing side only.  If I can get this to work, a separate function will process the selling side.  If no co-listing agent is involved in a given sell, that agent should get credit for 1 unit sold.  If he/she has help from a co-listing agent, the agent should only get credit for 1/2 unit sold.
    Also, does anyone know how the "Debug SQL" functionality is supposed to work within Database Studio?  When I right-mouse click on my function, and follow the path thru "Debug As...", after entering the connection & function arguments, I'm presented with an empty screen.  If you could point me to some documentation somewhere, I'd gratefully read it.
    I'm using MaxDB 7.7.06.09 on Windows XP (WIN32) with MaxDB Database Studio 7.7.06.09 (build 009-123-202-944).
    Thanks everyone for your help & advice.
    ~Fred

    Fred,
    please either provide the full SQL statements for your example or stick with mine.
    I'm not going to build it up myself a second time to suit yours now.
    >  But now, my issue is how do I store the resultant data in its own table?
    So where is the problem?
    INSERT INTO <target table> (field 1, field 2, ...)  (<your query>)  UDPATE DUPLICATES-
    With my tables this looks like this:
    create table sell_result (list_agent varchar(20) primary key, SUM_CREDIT fixed (10,2))
    insert
    into sell_result (list_agent,sum_credit)
        ( select list_agent, sum (credit) as SUM_CREDIT
          from ( select sh.object_id,lag.name as list_agent, 1 as credit
                 from soldhomes sh join agents lag on lag.id = sh.list_agent_id
                union all
                 select sh.object_id, lag.name as list_coagent, 0.5 as credit
                 from soldhomes sh join agents lag on lag.id = sh.list_coagent_id
          group by list_agent
    update duplicates
    Check what we have now
    sqlcli db770=> select * from sell_result
    | LIST_AGENT           | SUM_CREDIT        |
    | -------------------- | ----------------- |
    | Lars                 |              4.50 |
    | Lisa                 |              3.00 |
    | Mona                 |              2.50 |
    | Paul                 |              2.50 |
    4 rows selected (600 usec)
    Now add some sales data...
    Insert into soldhomes values (11, 1, 2, NULL, NULL)
    Insert into soldhomes values (12, 2, NULL, NULL, NULL)
    Insert into soldhomes values (13, 2, NULL, NULL, NULL)
    Re-run the INSERT command and you're done:
    sqlcli db770=> select * from sell_result
    | LIST_AGENT           | SUM_CREDIT        |
    | -------------------- | ----------------- |
    | Lars                 |              5.50 |
    | Lisa                 |              3.00 |
    | Mona                 |              5.00 |
    | Paul                 |              2.50 |
    4 rows selected (390 usec)
    Neat, isn't it?

  • How does the "Read TDMS" function work when reading part of a data file?

    Hi everyone,
    I have stored some rather large .lvm files that causing me a a big headache when trying to read/analyse the data.... As a work around I first convereted these files to .tdms.... Now the files are much smaller (50%) and can be load/plot within a couple of seconds rather than 10's of seconds.
    Specifically, the files include 7 channels of data that were sampled at 2kHz for about 8-9 mins..... So, each file contains about 700,000 data points or elements.... I am using a producer/consumer architechure to read/plot all the data, then using cursors to identify a data subset, which is send via a queue to the consumer where analysis occurs.... Given the size of the files, when subset is quite large I get "Out of Memory" errors and LabVIEW crashes.
    What I am thinking is that I can down-sample or decimate the data in the producer back to 1kHz (I need to ms resolution so I can see the spikes and can appropriately selected the subset) then index back into the original tdms file to send the undeciated data to the consumer.
    With the "Read TDMS" function, the help states:
    COUNT: Specifies the maximum number of data elements to read from the .tdms file for each channel. The default is –1.
    OFFSET: Specifies the number of data elements into the .tdms file at which the function begins analyzing the .tdms file. The default is 0.
    I am confused by the term "elements". Does this mean actual "data points" as in elements within the 2D array? Or bytes? I am hoping array elements... Would this then mean that given my 7 channels of data, each element value that is a multiple of 7 would index into a new line of data? I also assume this index is zero based... So with no offset, a count value of 0 would return all the data elements at time 0.0000s for all channels (regardless differences in the precision of each channel, unlike bytes), a value of 7 would return all the data elements at time 0.0005s, a value of 14 would return all the data elements at time 0.0010s, etc etc..
    Also, if anyone has any example code for indexing into a file using this method they could shareI would be very appreciative... I would assume a for loop could also be used to read the data subset into the consumer in smaller chunks to reduce the memory load?
    Many thanks,
    Jack

    You should have a different channel in the TDMS file.  So you are reading X elements from a channel starting at element Y.  Yes, those are elements in the array, not Bytes.  NI did a good job of making the API easy to use.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How exactly does the shotlist feature work?

    I have finished my script and would now like to create a shotlist. I have noticed in the film script mode, the possibility to add a SHOT. however when I do this it wants to change the formatting of the entire script. I am not sure what is going on here. Does anyone already know how this feature works?
    Any help would be greatly appreciated.
    cheers
    Angus

    > Bavo.
    >
    > Would supporting versioning be enough to handle your production
    > workflow issue? We can implement locked pages, locked scene, colored
    > pages, etc but I'm not sure if it’s a must have considering that folks
    > are freewheeling more than in the past.
    That might be the case but there are still plenty of 'traditional' workflows,
    so if you need to conform to their way of working you'll need it.
    For me it's a mix between freewheeling (can also end in a really big mess) and
    more controlled traditional way of doing things (usually when money/time
    situation is a little easier and depending on production company).
    So maybe a feature for 2.0?
    > Thanks for sharing the shotlist information:
    No thanks.
    > I've seen the vertical lines. they make the script really hard to read
    > and I also think it is really a paper based workflow more than a
    > digital workflow. However, have you seen a lot of editors use a
    > physical script marked up this way?
    Avid has the workflow, don't know how many really use it in that integrated
    way but I do know on long form projects the editor usually asks for the
    continuity notes.
    > Wouldn't it be better if this
    > information flowed through digitally with the files captured from
    > camera, at the time of logging at the end of the day's shoot?
    Yes in an ideal situation.
    However, how does it work when a tool like On Location is not available?
    In that case I still like the lined script metaphor...
    If it's too cluttered could you not implement a feature to optionally turn
    on/off the lines once you constructed the shot list?
    I'm also referring to prep when a director does a shot list before the
    shoot (not merely the lining traditionally done by the continuity supervisor).
    I also realize that the lining method only works when your script is more
    or less finished (there we go again)... So flexibility is the key :-).
    > The BBC uses horizontal cut lines instead of the vertical lines used by
    > scripty's. They serve the same purpose and these shots (demarcated by
    > cut lines) can be exported to create a shot list and camera cards for
    > each camera person.
    Nice if it works for them. 
    I've also seen this used where the wide shots were laid out at the bottom
    and the closer shots near the top and that was supposed to correspond to
    the emotional high points in the story.  Whatever works.
    > You can try exporting the shot list from Story using the production-
    > breakdown reports menu. Let us know how it works for you.
    Will test.

  • How does the RoboEngine Search Function Work?

    When I perform a keyword search via the RoboEngine, the
    results include .doc, .xls, .pdf files.
    I thought the RoboEngine performed a keyword search through
    the HTML pages. Was I wrong in that assumption?
    Thxs.

    My problem: The RoboEngine (v4) is not finding keywords in
    the project HTML pages. For example when I search for the term SPM
    (which is also a link), RoboEngine returns no result. Any ideas why
    it is not returning a result?
    By the way, we are working to upgrade our x.5.0.2 RH client,
    and V4 RoboEnginer to 7.
    Thanks.

  • Does the "import library" function work?

    I'm a big fan of Apple and its Mac OS X, but let me tell you that the iTunes is not a good software. And I, as a big music fan, a person who has used a lot of software for managing music, I even believe that iTunes is one of the worst. I could discuss this with any person who would think the opposite and he/she would finally admit that I’m right.
    One of the evidences is that it was a day I decided to export my library. When I have needed to import the xml file generated (after my iBook hard-disk broke down) containing all my music after a long time working on it… when I decide to “import” the library… I DON’T GET MY MUSIC!!
    This library was built on music files saved on an external hard disk. So everything is when it was previously. And now the iTunes is telling me that it cannot find “some files”.
    Can anyone help me to believe that some of the most basic functions of any software of music (to import a security copy of your library) works?????
    Please!!
    Thank you,
    davidjm

    Pie56694 wrote:
    Hi Hummer1,
    The Call Library Function Node is valid for real-time targeted VIs.  "...will the Vi work properly when targeting the real time operating environment?" depends on the DLL.  National Instruments recommends you use CVI Real-Time for C-based shared
    libraries. This will allow for proper compilation and will allow for remote
    debugging.  If the shared library is C++-based, National Instruments recommends
    you use VC 6 or VC 7.1 compilers.  Other compilers will require run-time
    components to be statically linked when compiled, resulting in a large DLL,
    though these may not all be supported in Real-Time.
    Please see "How Can I Verify that My DLL is Executable in LabVIEW
    Real-Time?" and "Using LabWindows/CVI DLLs in LabVIEW Real-Time Applications" for more information.  I hope this helps.
    Message Edited by Pie56694 on 06-24-2008 04:31 PM
    One ceveat here. If your RT target is VxWorks based (like the cRIO-901x) you will need to recompile the DLL into an .out library using either the (paid for) VxWorks IDE or the free Gnu based VxWorks command line tool chain that is compatible with the VxWorks version running on the target. The VxWorks version is depending on the LabVIEW RT Version you are using with VxWorks 6.1 for LabVIEW RT 8.2 and VxWorks 6.3 for LabVIEW RT 8.5.
    And that shared library can not make use of any Windows APIs since they do not exist in VxWorks. Standard C runtime and LabVIEW manager functions are the only ones you can use.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for