Confirmation required about case structure in cursor

Hi,
I have been trying to use a case when structure inside a cursor in a stored procedure with regular expressions in it, but its throwing compilation error.
The error message does seem to be irrelevant.
Just want to know whether there is any limitation of using case when structure inside a stored procedure in a cursor.
If no limitation like that, then will try again to debug it.
-MD

Manas Datta wrote:
Hi,
I have been trying to use a case when structure inside a cursor in a stored procedure with regular expressions in it, but its throwing compilation error.
The error message does seem to be irrelevant. No it is not. The error message will tell you what oracle or the compiler thought what is wrong. Try to understand it.
Just want to know whether there is any limitation of using case when structure inside a stored procedure in a cursor.
If no limitation like that, then will try again to debug it.
-MDBe aware that the syntax of the case statement is slightly different beween SQL and PL/SQL.

Similar Messages

  • A quesiton about case structure

    Hello
    I just try to write a simple program.
    e.g. I have a for loop (N = 10), if i > 5, I want to output the value into array ([6, 7, 8, 9] is what I want). But in labview I have to wire a value in the "false" case, so my output become [0, 0, 0, 0, 0, 0, 6, 7, 8, 9].
    How can I solve this problem?
    Many thanks,
    Stephen
    Attachments:
    test.vi ‏17 KB

    Hi Stephen,
    You need to use a shift register for the array.  In the first half of the iterations, don't add anything to your array.  But once the iteration count passes your threshold, start building the iterations into the array.  I have attached a VI to this e-mail.  Notice also that I've included the logic for switching out cases directly in the case structure with the "..4" and "5.." cases.
    You should check out the LabVIEW Help on shift registers...they're a little hard to understand when you first start using LabVIEW, but they are an indispensable feature when dealing with loops.  While you're at it, check out the LabVIEW Help on Case Structures to learn about other neat things like the "..4" and "5.." notation.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman
    Attachments:
    test.vi ‏17 KB

  • Confirmation required about XI-XI communication

    Hello experts,
    I am successful in establishing XI to XI communication using XI adapter. Since with this, the message is posted directly into to pipeline of the 2nd XI instance, I wanted to make sure what all pipeline steps can be carried out there. My requirement is to do the structural mapping there in XI2.
    Thanks,
    Amol

    <i>I wanted to make sure what all pipeline steps can be carried out there. My requirement is to do the structural mapping there in XI2.</i>
    >>>
    Yes, you should be able to do the required in XI2.

  • How about an Error Case structure with warning?

    Hi,
    while wiring some vis and thinking about error handling....
    In most cases the simple case structure feet by the error cluster will do the job. However in some cases when you deal with warnings, wouldn't it be nice to have an additional (optional) warning case that is true for a not empty source string and/or an error number?
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

    I forget to mention: Of course there is a solution possible by unbundling the cluster and check the error number and string followed by a case. I still remember the time when the case selector couldn't handle the error cluster ... (started with LV3.1 )
    I just thought it would be a nice thing when you wire the error cluster to the selector and get the red and green case and you can right click, add a case and get a yellow(?) case named 'warning'
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'
    Attachments:
    Example_BD.png ‏2 KB

  • I HAVE A QUESTION ABOUT USING CASE STRUCTURE

    Can I compute a percentage using case structure?
    In the following query below, I have been able to use CASE STRUCTURE to add to a counter when days were between 0 and 30, or when days were between 31 and 60 or when days were between 61 and 90 or when days were between 91 and 9999. I have also been able to get a GRAND TOTAL of all days between 0 and 9999. This is done in the LAST ITEM of the SELECT STATEMENT. The FIRST ITEM of the SELECT STATEMENT counts rows of records being processed. I want to take the LAST ITEM of the SELECT STATEMENT and MULTIPLY it by 100 and then DIVIDE it by the FIRST ITEM of the SELECT STATEMENT to get a percentage. I know that you can do this with numeric fields in a file but is there a way to do this in CASE STRUCTURE with calculated totals?
    SELECT
    count(distinct v.rowid) v_cnt,
    SUM(CASE WHEN(V.LCL_ER_RECV_DT - ADD_MONTHS(V.IND_ER_PER_END_DT,3)) BETWEEN 0 AND 30 THEN 1
    ELSE 0
    END) one_mo,
    SUM(CASE WHEN(V.LCL_ER_RECV_DT - ADD_MONTHS(V.IND_ER_PER_END_DT,3)) BETWEEN 31 AND 60 THEN 1
    ELSE 0
    END) two_mo,
    SUM(CASE WHEN(V.LCL_ER_RECV_DT - ADD_MONTHS(V.IND_ER_PER_END_DT,3)) BETWEEN 61 AND 90 THEN 1
    ELSE 0
    END) three_mo,
    SUM(CASE WHEN(V.LCL_ER_RECV_DT - ADD_MONTHS(V.IND_ER_PER_END_DT,3)) BETWEEN 91 AND 9999 THEN 1
    ELSE 0
    END) three_pl_mo,
    SUM(CASE WHEN(V.LCL_ER_RECV_DT - ADD_MONTHS(V.IND_ER_PER_END_DT,3)) BETWEEN 0 AND 9999 THEN 1
    ELSE 0
    END) TOT
    FROM NCOER V, NCOER_IN_ERROR NIE, NCOER_ERROR NE, ALL_CMD_VIEW ACV
    WHERE V.MIL_CMD_ASGN_CD IN ('FC')
    and v.lcl_er_form_cd = '4'
    and acv.cmd_cd = v.mil_cmd_asgn_cd
    and nvl(acv.lcl_code_stat,'N') = 'Y'
    and NVL(v.lcl_omit_from_stats_ind,'N') <> 'Y'
    AND V.PSC_CD IN ('FS10')
    AND (V.LCL_ER_RECV_DT >= '01-MAR_2007' AND V.LCL_ER_RECV_DT <= '31-MAR-2007')
    AND V.IND_SSN = NIE.IND_SSN(+)
    AND V.IND_ER_PER_END_DT = NIE.IND_ER_PER_END_DT(+)
    AND V.LCL_ER_RECV_DT = NE.LCL_ER_RECV_DT(+)
    AND V.IND_SSN = NE.IND_SSN(+)
    AND V.IND_ER_PER_END_DT = NE.IND_ER_PER_END_DT(+)
    AND V.LCL_ER_RECV_DT = NE.LCL_ER_RECV_DT(+)

    Solution for you:
    SELECT
    COUNT(V_CNT) PROCESS_RECORD,
    SUM(CASE WHEN(PROCESS_MONTHS) BETWEEN 0 AND 30 THEN 1
    ELSE 0
    END) ONE_MO,
    SUM(CASE WHEN(PROCESS_MONTHS) BETWEEN 31 AND 60 THEN 1
    ELSE 0
    END) TWO_MO,
    SUM(CASE WHEN(PROCESS_MONTHS) BETWEEN 61 AND 90 THEN 1
    ELSE 0
    END) THREE_MO,
    SUM(CASE WHEN(PROCESS_MONTHS) BETWEEN 91 AND 9999 THEN 1
    ELSE 0
    END) THREE_PL_MO,
    SUM(CASE WHEN(PROCESS_MONTHS) BETWEEN 0 AND 9999 THEN 1
    ELSE 0
    END) TOT,
    (SUM(CASE WHEN(PROCESS_MONTHS) BETWEEN 0 AND 9999 THEN 1
    ELSE 0
    END) *100/COUNT(V_CNT)) TOT_PER
    FROM
    (SELECT     V.ROWID V_CNT, V.LCL_ER_RECV_DT - ADD_MONTHS(V.IND_ER_PER_END_DT,3) PROCESS_MONTHS
    FROM     NCOER V, NCOER_IN_ERROR NIE, NCOER_ERROR NE, ALL_CMD_VIEW ACV
    WHERE     V.MIL_CMD_ASGN_CD IN ('FC')
    AND     V.LCL_ER_FORM_CD = '4'
    AND     ACV.CMD_CD = V.MIL_CMD_ASGN_CD
    AND     NVL(ACV.LCL_CODE_STAT,'N') = 'Y'
    AND     NVL(V.LCL_OMIT_FROM_STATS_IND,'N') <> 'Y'
    AND     V.PSC_CD IN ('FS10')
    AND     (V.LCL_ER_RECV_DT >= '01-MAR-2007' AND V.LCL_ER_RECV_DT <= '31-MAR-2007')
    AND     V.IND_SSN = NIE.IND_SSN(+)
    AND     V.IND_ER_PER_END_DT = NIE.IND_ER_PER_END_DT(+)
    AND     V.LCL_ER_RECV_DT = NE.LCL_ER_RECV_DT(+)
    AND     V.IND_SSN = NE.IND_SSN(+)
    AND     V.IND_ER_PER_END_DT = NE.IND_ER_PER_END_DT(+)
    AND     V.LCL_ER_RECV_DT = NE.LCL_ER_RECV_DT(+) )
    Regards,
    Rajs
    www.oraclebrains.com

  • Can I put a READ function in a TRUE/FALSE case structure?

    Hi,
    I have a vi that operates as controller for a mechanical system of motors.  There are several sensors of various types, that provide input to the vi, including encoders, whose period is being measured.  The attached vi is the encoder period measuring part. It measures 15 periods and tells me the average of the 15 with each loop iteration.
    In my application, the encoder period measurement is not needed unless the vi knows that ALL THE OTHER sensors in the hardware configuration are measuring values within the desired range.  For example, Sensors A, B and C should all measure between 5-10.  If they are all showing values between 5-10, then, we want the encoder value to read and display.  If only one of the sensors, say A, is measuring 12, then, we don't want the period value to READ or be subsequently processed.  So, it is easy to set up the sensors A, B, C, to give a TRUE or FALSE based on whether they are within range or not, and if all 3 are TRUE, then, that value can easily be passed to the case structure that holds my READ function for the period.  Is this a good way to do this?  The goal is to eliminate unnecessary execution time that the period READ function would consume, as well as all subsequent calculations that are performed on the period value collected.  The period data is of no use if any one of the other sensors is not in the correct range.
    If any one of the other sensors is out of range, we want to skip the encoder READ step altogether.  So, it is easy to structure a BOOLEAN in my vi as shown in the attachment.  If I do it this way, will it throw an error, or just skip the READ until the BOOLEAN is true again?  Is there a better way to prevent the READ from happening if one of my other sensor values is not within the correct range?
    Thanks,
    Dave
    Solved!
    Go to Solution.
    Attachments:
    forum JUly 18.vi ‏26 KB

    Sure, you can put a Read inside a case structure. For your application, just check that your sensors are all within range (Comparisons palette), then AND the T/F's and use the result of that for your case structure. (If you are already doing the in-range check, I can't see it here because you have 5 subVIs that I cannot open here.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • Re: Questions about Plan structure

    Reply-To: "Duncan Kinnear" <[email protected]>
    Q. if you have an Employee class with related EmployeeSubordinate and
    EmployeeSalaryHistory classes, should these all be in the same plan?
    A It is better to have them in the same plan.It depends on the design
    you have
    Q Why should the Managers be separated from their business classes?
    A Managers are usually service objects which might require different
    resources.
    These managers when deployed might be required by several other
    applications.
    Seperating them as a different plan will help in just using one
    installed partition to be
    Used by different applications (refer about Reference Partition)
    Q If you have the Database managers separate, what scope does each DB
    manager cover?
    A It is better to have the DB managers in user scope.
    It depends on the numbers of users, u have for the system.
    Since u are talking about 100 tables. It's a huge system.
    It also depends on the user licenses u have for the backend.
    Take care that u use proper load balancing of DB Managers for the
    system.
    Krishna CVSR
    GoldStone Softech Inc
    >
    Hi there,
    We are in the middle of designing the structure of a new system.
    I have read/heard that it is best to break down the plans into the
    following categories:
    Business Classes
    Managers/Services
    Clients
    I have a few questions about this structure:
    Should related business classes be grouped together in Plans? E.g. if
    you have an Employee class with related EmployeeSubordinate and
    EmployeeSalaryHistory classes, should these all be in the same plan?
    Why should the Managers be separated from their business classes?
    E.g. if there is an EmployeeMgr service which deals with anything to do
    with the Employee business class, why separate them in different
    plans? If you need the manager to access the class, you will always
    need both.
    Some of the Forte documentation talks about "Policy" managers and
    "Database" managers. How do the functions of these managers differ
    for a simple CRUD (Create Read Update Delete) class?
    If you have the Database managers separate, what scope does each
    DB manager cover? I.e. do you have one for the entire database (over
    100 tables in our case), or do you break it down by sub-system?
    Thanks in advance for any answers.
    Cheers,
    Duncan Kinnear,
    McCarthy and Associates, Email: [email protected]
    PO Box 764, McLean Towers, Phone: +64 6 834 3360
    Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
    Providing Integrated Software to the Meat Processing Industry for over 10 years
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    Get Your Private, Free Email at http://www.hotmail.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Reply-To: "Duncan Kinnear" <[email protected]>
    Q. if you have an Employee class with related EmployeeSubordinate and
    EmployeeSalaryHistory classes, should these all be in the same plan?
    A It is better to have them in the same plan.It depends on the design
    you have
    Q Why should the Managers be separated from their business classes?
    A Managers are usually service objects which might require different
    resources.
    These managers when deployed might be required by several other
    applications.
    Seperating them as a different plan will help in just using one
    installed partition to be
    Used by different applications (refer about Reference Partition)
    Q If you have the Database managers separate, what scope does each DB
    manager cover?
    A It is better to have the DB managers in user scope.
    It depends on the numbers of users, u have for the system.
    Since u are talking about 100 tables. It's a huge system.
    It also depends on the user licenses u have for the backend.
    Take care that u use proper load balancing of DB Managers for the
    system.
    Krishna CVSR
    GoldStone Softech Inc
    >
    Hi there,
    We are in the middle of designing the structure of a new system.
    I have read/heard that it is best to break down the plans into the
    following categories:
    Business Classes
    Managers/Services
    Clients
    I have a few questions about this structure:
    Should related business classes be grouped together in Plans? E.g. if
    you have an Employee class with related EmployeeSubordinate and
    EmployeeSalaryHistory classes, should these all be in the same plan?
    Why should the Managers be separated from their business classes?
    E.g. if there is an EmployeeMgr service which deals with anything to do
    with the Employee business class, why separate them in different
    plans? If you need the manager to access the class, you will always
    need both.
    Some of the Forte documentation talks about "Policy" managers and
    "Database" managers. How do the functions of these managers differ
    for a simple CRUD (Create Read Update Delete) class?
    If you have the Database managers separate, what scope does each
    DB manager cover? I.e. do you have one for the entire database (over
    100 tables in our case), or do you break it down by sub-system?
    Thanks in advance for any answers.
    Cheers,
    Duncan Kinnear,
    McCarthy and Associates, Email: [email protected]
    PO Box 764, McLean Towers, Phone: +64 6 834 3360
    Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
    Providing Integrated Software to the Meat Processing Industry for over 10 years
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    Get Your Private, Free Email at http://www.hotmail.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Suggestion for turning this into one case structure

    This is a snippet from some exisiting code we were hired to modify/clean up. I have to assume there is some way I can reduce this to only have one case structure, maybe with a not-and or not-or. Or maybe I'm overthinking this. Basically I keep confusing myself in relatively simple code when thinking about the booleans being compared. Any help is appreciated.
    CLA, LabVIEW Versions 2010-2013
    Solved!
    Go to Solution.
    Attachments:
    cleanuppls.PNG ‏11 KB

    KathrynB wrote:
    This does look to be just a NAND, pure and simple.
    The truth table I came up with was:
    old   new    write to global
    0      0         1 (< is false, new is false)
    0      1         1 (< is true)
    1      0         1 (< is false, new is false)
    1      1         0 (< is false, new is true)
    Classic not-and.
    Your logic works in the case where you want one result if both inputs are TRUE, and another result otherwise.  That would require modifying the original logic.  In the case where the original logic persists, then you need one result if one input is TRUE and the other is FALSE, and another result otherwise.  In this case, you need Implies.
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Case structure no false output

    Hey guys,
    To start off, I am very new at Labview.  I have posted about this project before but my professor has changed the assignment slightly.
    - Generate a random set of N points (x,y) between 0 and 100
    - Find the closest point to each point
    - Calculate the number of points with a closest point of less than D
    - Graph the points with the points with a closest point of less than D clearly marked
    So far I have manged to get everything done except for the last part, at least completley.  My approach was to create a case structure with < D as the requirement, if true build array if false I wanted it to do nothing, but I can't seem to do that.  I tried using a number ourside of the array size but that doesn't seem to work either.  Then I tried using a a shift register to do the same thing but had the same problem.  I could use some help if at all possible.  I have posted both codes below.  1_9 is the case structure alone and 1_10 is the shift register approach.
    Attachments:
    Assignment 1_10.vi ‏27 KB
    Assignment 1_9.vi ‏31 KB

    Not bad- monor tweaks set off with some color attached.
    NOTE use BD comments. Watch your data types (point closest should be an Integer type not a double) use increment rather than adding 1. kill the iteration indicators you are outo indexing off of an array generated with the Number of Points(N) control- there is no need to write N number of times to each indicator.  why you CHOSE to cross the wires into and out of the fourth loop baffles the mind
     EDIT: the SR should be initialized with an EMPTY array I just noticed that it has 1 element. that is a bug
    Jeff
    Attachments:
    Assignment 1_10_MOD.vi ‏26 KB

  • Advice about application structure before starting

    Hi all,
    I am so sorry for this longest post, but I have to explain all thing. Sorry again.
    I have been studying with Labview for a year by myself without taking any professional support. When I get stuck in preparing my VIs, I always post here and you answered me with great patient. Thank you for all. Now, I am about to start a new VI and before starting it I thought it would be good to consult you on that.
    The goal of this VI could be classified under 4 main topics: Acquisition, control, analysis, and recording the data. I am studying on a test system. There are two types of data to be acquired from the test system: pressure and temperature. For this purpose I have 1xNI 9203 (analog input-current) & 2xN9214(analog input-temperature). The test system is desired to be under control by use of a DC compressor with a frequency converter. To control that frequency converter I have to use NI 9263 (analog output- voltage). All hardware system is installed on NI 9188 cDAQ.
    Before preparition of this system, I have coded a VI that acquire, analyse, and record the data-there is no use of NI 9263 (attached here). In this VI, I used a basic structure and it works fine. The only problem of this VI is delaying when the stop button is pressed. Anyway, now I want to prepare a new one. The difference of the new VI from the old one is that it controls the system while acquiring, analysing, and recording processes. And this control is supported by acquired pressure and temperature values. This will be my first big project and I need your suggesttions on structure of this VI. Do I start to build it with state machine architect or another ones? To prevent the data loss what kind of precautions could be taken?
    Thank you all in advance.
    Egemen
    Attachments:
    MAIN PROGRAM_v0.vi ‏147 KB

    Egemen,
    First, Great! It is very important to plan and design your program before starting to write it.
    Next, you do not need to apologize for providing the information necessary for someone to respond to your request. We would very much prefer a post of several paragraphs which contains the relevant information to a brief post which only elicits questions for more details.
    Now to your questions.
    1. Look at the style guides.  Your block diagram was several screens high and wide.  It is recommended to keep the diagram to one screen.  Paticularly in programs which will get large and copmlicated like yours, this readability constraint will be very worthwhile.  Effective use of subVIs is one way to help minimize screen bloat.
    2.  Look at the style guides. The use of local variables to pass data from one loop to a parallel loop is not recommended.  It can lead to race conditions, force execution of the loops in the UI thread, and is slower than wires.
    3. Read the help on Event Structures. Only one event structure per VI is recommended. Although the way you have used them will probably work, it consumes hectares of block diagram space and may be vulnerable to problems when you or another developer decides to make a few changes.
    4. Because there is no data dependency, it is possible (although not very likely) that the main loop could start running before the clear history property nodes execute.
    5. How do your temperature charts know which waveform to display?
    6. You stop on DAQ errors but do not check for file errors. You may want to consider more robust error handling.
    Now, some general comments on program structure. You list 4 topics: Acquisition, control, analysis, and recording the data.  This may also be a good way to think about program structure. The structure probably needs one more topic: User Interface.  The program you posted essentially has 2 topics: User Inputs and everything else.  Think about the timing requirements for each topic.  User interface - needs to respond to user inputs in about 100 ms or the user begins to feel as though the program is not responding. Similarly, displays do not need to update more than a few times per second. Acquisition - Software timed.  Default value = 1.67 Hz. Output not specified, but since you are talking pressure and temperature, it is probably slow also. Once you start doing closed loop control, it may become more important to keep the timing constant. Record data - same timing as acquisition.  However, writing 8-64 channels of data two two files twice per second may not be optimum. And what happens when the OS finds that the files are fragmented and must allocate new sapce for the file and takes more than half a second to do so?  Analysis - Your subVIs were not included so I have no idea what they do, how fast they may be and what effects they may have on the overall operation.
    What I suggest is that you study the Producer/Consumer Design Patterns and State Machines.  I think you may end up with 3 or 4 parallel loops. One will be the User Interface loop with the only event structure. Another will handle all the data acquisition (possibly including outputs when controlling your test system). This will be a state machine which initializes the DAQ, Reads and Writes, and shuts it down when finished. The File writes may be in a separate loop. If file I/O is put into a parallel loop, it should be a state machine which opens, writes, and closes the files and retains the file path or reference for repeated writes. The control and analysis (another state machine) may be in a separate loop or could run in the timeout case of the event structure in the UI loop.  Which is best depends on details of your system.
    With the amount of data you are moving around and the number of property nodes you need to use, learn to manipulate the front panel from a subVI. Search the Forum for posts on use of control references and on updating the main front panel from a subVI. There are some good methods posted.
    Lynn

  • Case Structure using Byte Array

    I have an array that has 9 bytes. I need to determine method for selecting a case in case structure when a bit is high.
    I know how to do it when it is 1 byte but I am not sure the best method to use when its nine byte array.
    Can someone provide me suggestions? Or example code?
    Thanks..... 

    altenbach wrote:
    Assuming you have a Boolean array with 9 elements, use "boolean array to number" and wire to the selector terminal. Create cases for all relevant patterns and leave the default case empty.
    If only one element can be true at any given time, use search array and search for TRUE. Wire the output to the selector. Leave the "-1" case empty.
    I think the poster has an array of nine bytes, each with the appropriate booleans.  Therefore, I like jcarmody's suggestion that he index the array and performs the operations that the poster is already familiar with.
    Assuming an array of booleans, the first method you described is okay if there is a specific action for each pattern.  In most of the scenarios I've worked with, each bit represented a specific test, for instance, and there would be a lot of duplicate code if I used that method.  (For instance, binary cases 10 and 11 would both have test subVIs for test 2.)  For something like that, I would all my tests in sequence (using error in/out for dataflow, of course) and have T/F cases around each one with the indexed boolean array controlling which tests would be run.  Of course I tend to see things in a literal way, so if the requirements say "do the selected tests in this order", that's how I would develop it.  Maybe there's a better way programmatically?
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • How can I have multiple inputs into the selector terminal of a case structure

    Hi everyone
    I have a question on how to wire multiple inputs in to the selector terminal of a case structure. 
    Currently, I have three switches, each switch determines different case. So if I switch the switch 1 is on, the numeric indicator will show 1. If the switch 2 is on, the numeric indicator will show 2, so on and so forth. However, the selector terminal will not allow me to wire multiply inputs into the case structure, I tried Bundle by Name, Bundle and Array to Cluster, but they did not work. I set the case structure with 3 cases, they are 1, 2 and 3.
    Could someone help me please. I have attach an image and the VI of the work I did so far.
    I have another question, is there a function which can toggle other switches to off when there is a switch has been toggled on.
    Thank you very much
    Tommy
    Attachments:
    Trial - Case Structure.vi ‏7 KB

    Tommy, attached find a cheeseball way of doing this that has given me a LOT of mileage over the years.  IT lends itself nicely to a couple of really good practices that NI recommend, but I have given you the bare-bones to "see under the hood".  
    The recommended practices:
    1. You can make this a nice tight sub-vi where you can put it into a core library of routines that you'll use over the years, even extending the logic to look only for changes, etc.
    2.  If you are thinking about Front Panel design considerations, you'll want to use arrays of controls where possible, as that's a nice neat way of containerizing your switch for both the FP and Block Diagram.
    Have fun.  I have TONS of these types of things, so feel free to PM me if you have any other needs.
    Wes
    Wes Ramm, Cyth UK
    CLD, CPLI
    Attachments:
    Boolean Switch Logic.vi ‏11 KB

  • How do i output multiple arrays from a case structure to create one larger array

    I currently have a vi that has one hardware input that i needed to take a measurement then be moved and take a similar measurement at a different point.  To accomplish this i used a while loop inside a case structure.  The while loop takes the measurement  and finds the numbers i need while the case structure is changed per the new measurement location.  I want to take the data points i have created in each case and output them into a single table.  I assumed to do this the best way would be to get the data from each case into its own built array and build a larger array but I cant get the information out of the case structure so that it all inputs at different places.
    thanks for your help
    Attachments:
    Array.vi ‏30 KB

    Hi Ross,
    attached you will find a solution for your table building problem.
    I would suggest thinking about program design - having the same case content in several cases doesn't make sense. I also would not want my user to press several stop buttons depending on choosen measurement...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    Array.vi ‏45 KB

  • How to get a case structure to execute only once in a loop

    I have a while loop that is monitoring temperature. Once the temperature meets or exceeds a given setpoint I want to start a timer. At this point I don't want to monitor the temperature anymore. That is, if the temperature should drop below the setpoint, I don't want to execute the case structure again when the temperture meets or exceeds the setpoint(the temp may oscillate about the setpoint for a given period of time). In any event, I need the case structure to execute only one time, not every iteration of the loop.

    You can put a local Boolean variable "Flag" inside that case structure and
    set "Flag" to False. Outside the case structure, use an "AND" function
    output to control the case structure. The "AND" function has two inputs. One
    goes to the comparison results between real temp and setpoint. The other
    inputs connects to the "Flag" variable. In this way, once you entered that
    case structure, the "Flag" will be turned to False, and then in next
    iteration, you won't get into the case again because the "AND" function will
    be False as your "Flag" is False now.
    Hope this helps.
    Rentian
    1. Inside the case structure, put a
    "BB Herman" wrote in message
    news:[email protected]..
    >I have a while loop that is monitori
    ng temperature. Once the
    > temperature meets or exceeds a given setpoint I want to start a timer.
    > At this point I don't want to monitor the temperature anymore. That
    > is, if the temperature should drop below the setpoint, I don't want to
    > execute the case structure again when the temperture meets or exceeds
    > the setpoint(the temp may oscillate about the setpoint for a given
    > period of time). In any event, I need the case structure to execute
    > only one time, not every iteration of the loop.

  • How can I put a numeric indicator into a case structure using VI scripting

    I'm using VI scripting and I'm trying to add a numeric indicator inside a case structure.  I'm able to add the case structure and the numeric indicator just fine, but as soon as I specify the case structure as the "owner" of the numeric (as opposed to the block diagram being the owner) I get error 1060.  Is there any way around this?
    Note:  The reason I am doing this is because this specific pattern (indicator in a case structure) will prevent a VI from being inlined when it is being built.  This pattern will provide no functionality in itself, it only prevents the inlining.  It is added to a larger VI which is use to initialize objects in a simulation, and there are many of them in the total simulation.  If they are inlined, it takes a VERY long time to generate the C code, and performance on this VI isn't an issue since it is performed only once at the beginning of the simulation.  The rest of the VIs do need to be inlined for performance reasons.  Therefore, I'm open to other options to prevent a VIs from being inlined if the "indicator in a case structure" cannot be performed via scripting.
    If any of this is unclear please let me know and I can clarify.  Thanks.
    Solved!
    Go to Solution.

    I now understand what you were saying about inlining a subvi.  I did as you said and made a subvi with a case structure and an indicator within it.  I use the New VI Object node to add that subvi to the slow-inlining parent VI.  Then I tried to inline it using the invoke node, but I got error 1399, which make sense.  Is this what you meant for me to do, or did I misunderstand?
    Also, I tried the ControlTerminal reference approach you mentioned earlier.  Unfortunately when I called the move method on the control terminal property and had the 0th frame of the case structure as the owner I got error 1060 again.
    I really appreciate your help.  Do you have any other thoughts?

Maybe you are looking for

  • How to view the source code of JavaFx component ?

    Hi everybody, I just want to know if it's possible to view the source code of the component Button (from JavaFx) and how to do it ? In fact, I don't really understand if JavaFx is entirely open source ? Thanks.

  • Connecting Cambridge Soundworks speakers to a new Dell 4700

    New system: Dell 4700. Soundcard is a Soundblaster Live! 24 bit. Stereo outputs are confirmed to work because my headphones pick up sound (in the headphone jack, as well as the stereo outputs). Creative audio software. Old speakers: Cambridge Soundwo

  • NAT type moderate all of a sudden

    Been online gaming for some time.  Playing Modern Warfare 3 on PC and noticed that my NAT type was moderate.  It was Open as recently as yesterday.  Double checked my router settings and my PC is still in a DMZ.  Re-booted the router but still have a

  • How to open pdf manually from adobe?

    After I download a file I click on it to open it but adobe does not open it. A list of programs pop up to open it but none are PDF file readers. I even re-downloaded previous PDF files that have opened with no problems in the past. So I am trying to

  • Does anyone know compatibility touchscreen for Macbook Pro 15'' Retina with Yosemite?

    I am looking touchscreen monitor to work with. I have Macbook Pro (Mid 2014) 15'' Retina and OSX Yosemite. I am having difficulties to find a monitor that supports OS X Yosemite. Does anyone know monitor that would work?