Is it possible to use the case structure in on board progamming

Hi
I want to load a certain value in a variable in on board programming based on the encoder. How to implement this in 7344.

No, it is not possible to use the labVIEW case structure in an onboard program. However, it is possible to implement the functionality you need by using a label, a jump to label on condition function and two on board variables. What you need to do is read the value of your encoder into one of the variables, once this value is in there you will use some of the variable arithmetic functions to compare its value to a value you would load into the second on board variable (the most common way is to use the subtract variables function). The result of the last varible operation is the used inside the jump to label on condition fucntion to evaluate the condition and to jump or not jump back to the label dependding on the result. For a much clearer explanation of this functional
ity as well as some example code, please refer to chapter 15 of the following manual:
http://digital.ni.com/manuals.nsf/websearch/EB609F​9BA065EA7A86256D350060C9A0?OpenDocument&node=13210​0_US

Similar Messages

  • Is it possible to use a Case Structure to hide numeric indicators on the Front panel when they are not in use?

    I am rather new to LabVIEW, have only been using it for about 1.5 weeks as of this post, which means I may be missing something rather obvious due to ignorance, but is there any way to have my front panel change as my case changes due to user selection of a certain case via the front panel?
    The goal of the program is to make a simple layout for a user that is using the digital multimeter that the proposed code is designed for and I don't want tons of numeric controllers and such clogging up the screen space that don't work with the function the user is using to measure with.
    Thanks in advanced.
    Solved!
    Go to Solution.

    Check out the property node for the controls
    Visible Property
    Short Name: Visible
    Requires: Base Package
    Class: Control Properties
    Displays the front panel control.
    This property is similar to the Show Control and Hide Control options on the shortcut menu of a control.
    Also look at the TAB control to control which controls are available to your user.
    Omar

  • The case structure is not working well on comaring two strings using true or false string matching VI

    I need an execution of commands after the reply from the instrument matches with the string I provided for that i used true or false string match VI on which the true string the matching command and the string is the reply from the instrument. And I put the further executionable commands in frame after frame of sequence loop in the true of the case structure. Amd finally I given all the output strings to the concatenate string to get all the replies as one loop. But when I execute the program the desired result is not available. So kindly please help me to overcome this problem.  
    Attachments:
    basic serial with changes.vi ‏24 KB

    You VI makes absolutely no sense and I would recommend you start with a few simple LabVIEW tutorials before trying to tackle this.
    What is the point of the FOR loop with 1 iteration, it might as well not even be there, same difference.
    Why is there an abort primitive in the FOR loop, this mean the program will unconditionally stop abort before any downstream code will ever go into action. The program will never get past the FOR loop.
    You created a circular data dependency and LabVIEW inserted a feedback node automatically, making things even worse. (see also)
    You need to learn about dataflow, execution order, and data dependency.
    You need to learn about the various types of tunnels (plain, autoindexing, etc.)
    There is a tremendous amount of duplicate code. Large code sections are the same, differeing only by a string. You should only have one copy of that code inside a proper state machine. Have a look at the design templates and examples that ship with LabVIEW.
    LabVIEW Champion . Do more with less code and in less time .

  • How do I use a Case Structure with Strings?

    I need to use a string list to set up a set of cases to be performed. Is it possible to tell a single case structure to do "a, b, c, and d, but not e or f" or "do a, c, d, and f, but not b or e" etc... when you use a string containing the cases to be used?

    Blackavar,
    A case structure will only execute a single case at a time. If you want to have multiple cases execute in parallel, then you would need to have multiple copies of the case structure and split the string apart and wire them to all of the needed case structures.
    This could be done with reentrant subVIs to run truely in parallel. Anther method would be to have 6 different case structures, all with 7 cases each. The 7 cases would be "a", "b", "c", "d", "e", "f", and "0". Your input sting will need to be built up so that it will always be 6 characters long and then split up so that each character goes to one of the case structures. You would have your needed code for cases a - f. Case "0" would do nothing.
    Randy Hos
    kin
    Applications Engineer
    Nationsl Instruments
    http://www.ni.com/ask

  • How can I pass data generated in a SubVI inside a Case Structure out of the Case Structure?

    Hello,
    I am using a USB 2701 to control a heater.  I have three SubVIs that are all working properly on their own.  I'd like to use an Enum to select which of the SubVIs is running at a given time.  The problem is that no data is passing out of the case structure.  How can I pass the temperatures and heater outputs acquired by the SubVIs to the main VI?  I've attached my some of my code below.  I can't attach more than 3 files, but you can see how the main VI is configured.  Like I said, the SubVIs are working individually, so you shouldn't really need to look at them.
    Thank you,
    CJones581
    Attachments:
    RampHeater6-21-07.vi ‏305 KB
    69_Heater_Case.vi ‏23 KB
    HeaterTCD6-21-07.vi ‏210 KB

    CJones,
    You might check a couple of things.
    Your HeaterTCD... VI has a While loop with a stop button condition.  HeaterTCD pass out values only when it finishes running.  If it doesn't pop open the front panel (which usually doesn't happen when running a SubVI) you could run into a stuck loop because you don't have access to the Stop button.  This could appear in the form of no data being passed out (because the SubVI never stops running).  The primary VI opens the HeaterTCD VI, starts it, and waits for the VI to finish and pass final values .
    Secondary note: Unless you want your SubVI panel (which probably isn't open when running the main VI) to update continuously, consider moving your Temperature Graph and Temperature oC indicators outside the while loop.  Pass final values to them via a tunnel, since the main VI will only read their values after the loop finishes running, anyway.
    It might help to add error management to HeaterTCD like you have for RampHeater.  If you connect error lines with Error Outs to your main VI, that will help tell if there is an error somewhere that is preventing info output.
    RampHeater SubVI has the same issue with the stop button.  It is also probably getting stuck in the While loop waiting for a manual push of that SubVI's Stop button.
    An easy way to test this would be to set up a logic circuit so that when the While loop iteration counter reaches a certain number, it registers True and sends it to the conditional.  I know this isn't what you want to do long-term, but if that lets your SubVI return outputs it means that the SubVI was just never stopping.
    Hope that helps.
    David C, Applications Engineering
    David C
    Applications Engineering

  • Is it possible to use a case statement when joining different tables based on input parameters?

    Hi,
    I have a scenario where my stored procedure takes 5 parameters and the users can pass NULL or some value to these parameters and based on the parameters, I need to pull data from various tables.
    Is it possible to use a case statement in the join, similar the one in the below example. I'm getting error when I use the below type of statement.
    select a.*
    from a
    case
    when parameter1=1 then
    inner join a on a.id = b.id
    when parameter1=2 then
    inner join a on a.id = c.id
    end;
    Please let me know, if this type of statement works, and if it works will it create any performance issues?. If the above doesn't work, could you please give me some alternate solutions?
    Thanks.

    Here's a technique for joining A to B or C depending on the input parameters. In theory, you are joining to both tables but the execution plan includes filters to skip whichever join is not appropriate. The drawback is that you have to do outer joins, not inner ones.
    CREATE TABLE A AS SELECT LEVEL ak FROM dual CONNECT BY LEVEL <= 100;
    CREATE TABLE b AS SELECT ak, bk
    FROM A, (SELECT LEVEL bk FROM dual CONNECT BY LEVEL <= 10);
    CREATE TABLE c(ak, ck) AS SELECT ak, bk*10 FROM b;
    variable p1 NUMBER;
    variable p2 NUMBER;
    exec :p1 := 1;
    exec :p2 := 20;
    SELECT /*+ gather_plan_statistics */ A.ak, nvl(b.bk, c.ck) otherk FROM A
    LEFT JOIN b ON A.ak = b.ak AND :p1 IS NOT NULL AND b.bk = :p1
    LEFT JOIN c ON A.ak = c.ak AND :p1 is null and :p2 IS NOT NULL and c.ck = :p2
    WHERE A.ak <= 9;
    SELECT * FROM TABLE(dbms_xplan.display_cursor(NULL,NULL,'IOSTATS LAST'));
    | Id  | Operation             | Name            | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    |   0 | SELECT STATEMENT      |                 |      1 |        |      9 |00:00:00.01 |       7 |
    |*  1 |  HASH JOIN OUTER      |                 |      1 |      9 |      9 |00:00:00.01 |       7 |
    |*  2 |   HASH JOIN OUTER     |                 |      1 |      9 |      9 |00:00:00.01 |       7 |
    |*  3 |    TABLE ACCESS FULL  | A               |      1 |      9 |      9 |00:00:00.01 |       3 |
    |   4 |    VIEW               | VW_DCL_5532A50F |      1 |      9 |      9 |00:00:00.01 |       4 |
    |*  5 |     FILTER            |                 |      1 |        |      9 |00:00:00.01 |       4 |
    |*  6 |      TABLE ACCESS FULL| B               |      1 |      9 |      9 |00:00:00.01 |       4 |
    |   7 |   VIEW                | VW_DCL_5532A50F |      1 |      9 |      0 |00:00:00.01 |       0 |
    |*  8 |    FILTER             |                 |      1 |        |      0 |00:00:00.01 |       0 |
    |*  9 |     TABLE ACCESS FULL | C               |      0 |      9 |      0 |00:00:00.01 |       0 |
    Predicate Information (identified by operation id):
       1 - access("A"."AK"="ITEM_0")
       2 - access("A"."AK"="ITEM_1")
       3 - filter("A"."AK"<=9)
      5 - filter(:P1 IS NOT NULL)
       6 - filter(("B"."AK"<=9 AND "B"."BK"=:P1))
       8 - filter((:P2 IS NOT NULL AND :P1 IS NULL))
       9 - filter(("C"."AK"<=9 AND "C"."CK"=:P2))
    You can see that table C was not really accessed: the buffer count is 0.
    exec :p1 := NULL;
    SELECT /*+ gather_plan_statistics */ A.ak, nvl(b.bk, c.ck) otherk FROM A
    LEFT JOIN b ON A.ak = b.ak AND :p1 IS NOT NULL AND b.bk = :p1
    LEFT JOIN c ON A.ak = c.ak AND :p1 is null and :p2 IS NOT NULL and c.ck = :p2
    WHERE A.ak <= 9;
    SELECT * FROM TABLE(dbms_xplan.display_cursor(NULL,NULL,'IOSTATS LAST'));
    Now table B is not accessed.
    | Id  | Operation             | Name            | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |
    |   0 | SELECT STATEMENT      |                 |      1 |        |      9 |00:00:00.02 |       7 |      2 |
    |*  1 |  HASH JOIN OUTER      |                 |      1 |      9 |      9 |00:00:00.02 |       7 |      2 |
    |*  2 |   HASH JOIN OUTER     |                 |      1 |      9 |      9 |00:00:00.01 |       3 |      0 |
    |*  3 |    TABLE ACCESS FULL  | A               |      1 |      9 |      9 |00:00:00.01 |       3 |      0 |
    |   4 |    VIEW               | VW_DCL_5532A50F |      1 |      9 |      0 |00:00:00.01 |       0 |      0 |
    |*  5 |     FILTER            |                 |      1 |        |      0 |00:00:00.01 |       0 |      0 |
    |*  6 |      TABLE ACCESS FULL| B               |      0 |      9 |      0 |00:00:00.01 |       0 |      0 |
    |   7 |   VIEW                | VW_DCL_5532A50F |      1 |      9 |      9 |00:00:00.01 |       4 |      2 |
    |*  8 |    FILTER             |                 |      1 |        |      9 |00:00:00.01 |       4 |      2 |
    |*  9 |     TABLE ACCESS FULL | C               |      1 |      9 |      9 |00:00:00.01 |       4 |      2 |

  • Is it possible to use the scroll wheel of a mouse in list boxes?

    Hi,
    I was wondering if it is possible to use the scroll wheel in list boxes? LABview (6i under windows 98) does support the use in diagrams, for instance on case statements, but it does not appear to do much on the front panel apart from scrolling the whole thing up and down (and when pointing on the vertical scroll bar left and right).
    Is there a quick and easy way to get the scroll bar to work on list boxes, for instance by calling windows dll's? If so anyone ever done this?
    Any help will be greatly appreciated,
    Erik van Dijk

    Erik,
    Yes, it is possible. Anything is possible. LabVIEW is a programming language.
    However, the scope and ease of implementation may be beyond the amount of work you want to do. This must be accomplished through Windows API. This means the use of windows dlls and or Active X.
    Good luck.
    Also, try looking for toolkits. Someone out there supposedly has a toolkit for doing this sort of thing.

  • Is it possible to use the Copy Express to copy across Approval Procedures?

    Hi,
    We're running SBO 8.8 for a new customer and need to copy the Approval Procedures from one database to another - there are absolutely loads and it'll too painful to create them manually.
    We can't see the option in the Copy Express tree - can anyone help?
    Is it possible to use the Copy Express to copy the Approval Procedures object? Is there another way (perhaps via insert statement in SQL)?
    Please assist!
    Thanks,
    Mohsen

    Hi Mohsen,
    Due to the complicity of the approval procedures, I think it is too hard to build a copy tool for this under current system structure.
    As for insert statement in SQL, it is absolutely a no go. Unless you want the risk to lose SAP support, never try that. You have to re-create them.
    Thanks,
    Gordon

  • Why does Labview insert quotations in the case structure selector box?

    I was building a case structure with an array of strings.  So, I copied the strings from the array on the FRONT PANEL directly into the SELECTOR LABEL.  My 3 strings have the form; to me, these are 5- character strings with spaces, or 7 characters if you count the spaces as string characters 
    A, B, C   
    A, B, D
    A, B, E
    So, when I copied and pasted them directly into the selector box A, B, C appeared as "A", "B", "C" and A, B, D appeared as "A", "B", "C" and then I got an error for selector values not unique.  Why didn't it appear as "A, B, C"?
    Why did it transform the string I pasted and insert the quotation marks?  I used no quotation marks in my array.  Does the selector label interpret commas as functional characters that require quotation marks??
    Thanks,
    Dave 

    dav2010 wrote:
    I was building a case structure with an array of strings.  So, I copied the strings from the array on the FRONT PANEL directly into the SELECTOR LABEL.  My 3 strings have the form; to me, these are 5- character strings with spaces, or 7 characters if you count the spaces as string characters 
    A, B, C   
    A, B, D
    A, B, E
    So, when I copied and pasted them directly into the selector box A, B, C appeared as "A", "B", "C" and A, B, D appeared as "A", "B", "C" and then I got an error for selector values not unique.  Why didn't it appear as "A, B, C"?
    Why did it transform the string I pasted and insert the quotation marks?  I used no quotation marks in my array.  Does the selector label interpret commas as functional characters that require quotation marks??
    Thanks,
    Dave 
    Actually in CASE STRUCTURE, any frame can have multiple values as 'Case Selector value' and these are separated by a comma. Also if you choose to operate a CASE STRUCTURE using string, it will automatically prefixs & suffixs quotes (") to that string.
    But you can enter  "A, B, C" manually and it will remain as it is. But if you copy and paste A, B, C, the CASE STRUCTURE will automatically change it to "A", "B", "C".
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • Is it possible to use the HP88 & HP88XL catridges in OfficeJet Pro 5300K

    Is it possible to use the HP88 & HP88XL catridges in OfficeJet Pro 5300K? 
    The catridge does not list it as compatible, but some resellers list it among supported printers.

    Here is a good link that will provide a list of cartridges compatible with any HP product:
    https://h30042.www3.hp.com/SureSupply/
    In this case it does not show the 88's being compatible with the OJ Pro 5300K.
    Hope that helps
    Say Thanks by clicking the Kudos thumbs up. Please mark the post that solves your problem as an Accepted Solution so other forum users can utilize the solution.
    I am an HP employee.

  • How do I use the CASE statement  in the where clause?

    Hello Everyone,
    I have 2 queries that do what I need to do but I am trying to learn how to use the CASE statement.
    I have tried to combine these 2 into one query using a case statement but don't get the results I need.
    Could use some help on how to use the case syntax to get the results needed.
    thanks a lot
    select segment_name,
    product_type,
    count (distinct account_id)
    FROM NL_ACCT
    where
    ind = 'N'
    and
    EM_ind = 'N'
    and product_type in ('TAX','PAY')
    and acct_open_dt between (cast('2006-01-17' as date)) and (cast('2006-01-17' as date) + 60)
    GROUP BY 1,2
    order by product_type
    select segment_name,
    product_type,
    count (distinct account_id)
    FROM NL_ACCT
    where
    ind = 'N'
    and
    EM_ind = 'N'
    and product_type not in ('TAX','PAY')
    and acct_open_dt between (cast('2006-01-17' as date)) and (cast('2006-01-17' as date) + 30)
    group by 1,2
    order by product_type

    Something like:
    SELECT segment_name, product_type,
           SUM(CASE WHEN account_id IN ('TAX','PAY') and
                         acct_open_dt BETWEEN TO_DATE('2006-01-17', 'yyyy-mm-dd') and
                               TO_DATE('2006-01-17', 'yyyy-mm-dd') + 60 THEN 1
                    ELSE 0 END) tax_pay,
           SUM(CASE WHEN account_id NOT IN ('TAX','PAY') and
                         acct_open_dt BETWEEN TO_DATE('2006-01-17', 'yyyy-mm-dd') and
                               TO_DATE('2006-01-17', 'yyyy-mm-dd') + 30 THEN 1
                    ELSE 0 END) not_tax_pay
    FROM NL_ACCT
    WHERE ind = 'N' and
          em_ind = 'N' and
          acct_open_dt BETWEEN TO_DATE('2006-01-17', 'yyyy-mm-dd') and
                               TO_DATE('2006-01-17', 'yyyy-mm-dd') + 60
    GROUP BY segment_name, product_type
    ORDER BY product_typeNote: You cannor GROUP BY 1,2, you need to explicitly name the columns to group by.
    HTH
    John

  • I am using a mac mini 2011 an 3gs i phone 2010 macbook white 2008 and a new 2013 apple tv box. When i check info on the cloud I get 'upgrade your operating system to the latest. My question is is it possible to use the icloud system without an upgrade

    I am using a mac mini 2011 an 3gs i phone 2010 macbook white 2008 and a new 2013 apple tv box. When i check info on the cloud I get 'upgrade your operating system to the latest. My question is is it possible to use the icloud system without an upgrade

    iCloud requires OS X 10.7.2.

  • Is it possible to use the old iMac 2010 21inch as an external monitor for my 15inch Macbook retina?

    Is it possible to use the old iMac 2010 21inch as an external monitor for my 15inch Macbook retina? E.g. Using a mini-display cable to connect from the imac mini display port to thunderbolt port on my macbook.

    Apple shows only the 27" version supporting Target Display Mode.
    <http://support.apple.com/kb/HT3924>

  • How to use the CASE Expression in Where Cluase?

    Hi All,
    I'm trying to use the CASE Expression in the Where Clause at some trigger on the Form?
    I've tried this Code:
    Declare
    N Number;
    begin
    SELECT COUNT(E.EMP_SID)
         INTO N
         FROM EMPLOYEES E, RANKS R
         WHERE CASE WHEN R.qualification_sid = 1104 AND E.rank_sid = 8 THEN
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1)
         ELSE
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1)
         END
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR');
    END;
    When I run this code as a normal query at any SQL editor it works successfully, But When I Compile it at some trigger on the Form it gives me this error:
    Encountered the symbol "CASE" when expecting one of the following:
    ( - + mod ......
    Heeey how to specify the previous code to be shown as code in the thread?
    Note: I'm using Forms 6i

    OK I tried it and worked but for one condition:
    WHERE DECODE (E.qualification_sid, 1104,
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
    But how to put two conditions for the same Expression:
    WHERE DECODE ((E.qualification_sid, 1104) AND (E.RANK_SID, 8),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
    The previous code gives me this error: missing right parenthesis

  • Is it possible to use the Apple wireless keyboard with the iPhone 6? Will the Magic Mouse work with iMovie on iPhone6 Plus?

    iPhone 6 page says that iMovie is a (free) application available for iPhone 6. When I use it on the desktop I need a mouse. Should I expect all controls to be touch-sensitive, or is it possible to use the wireless Magic Mouse? Similarly, if I want to type an email or a long document, is it possible to use the Mac wireless keyboard to enter text? With the iPhone 6 Plus taking over for laptops (phablet), it seems to me that input tools are relevant. Maybe what I'm asking is whether the iPhone6 (OS8) has drivers for these devices. Please advise.

    Apps that are designed for iOS devices such as the iOS version of iMovie are intended to be used entirely by touch. It's worth noting that iMovie for iOS is not absolutely identical to iMovie for Mac OS.

Maybe you are looking for

  • How to group data from two tables ?

    Hello, I have two tables and i want to group data from them but two table not linked. Table TEXT_IN : ID_IN (primary_key), DATE_IN Table TEXT_OUT : ID_OUT(primary_key),DATE_OUT Example : Result :Group Date and Order by IN,OUT And It seems a bit confu

  • Determining Date Range from Pay Date Information

    I have a table of employees with different pay dates because they are college interns and they leave at different dates, so their most recent pay date will be different. I have created a query to find the most recent pay date.  The pay periods are bi

  • I need buy what productions for PDF forms?

    Hi: My requirement: 1.Adobe Reader can edit and save Pdf forms,can add signature and barcode; 2.I upload pdf file by web upload or by email or copy files: 3.My back-end system(J2EE,Weblogic or Tomcat)  receive pdf files ,then extract XML datas from P

  • Doubt in VO's dirtiness

    Hello All, In process request I am querying the VO to display data on page. Pls note: At the end of Process request when I check dirty sttus of VO using following code then it is not dirty. But If I check at the very begining of process form request,

  • Removing line item dimension

    Dear All, I have encountered a problem after I removed line item dimension flag from the dimension properties and added new characteristics to that dimension. When I checked the data in the cube, I was surprising to find the old characteristic (that