Case structure help needed~

Hi guys, i am running into some problem trying to output multiple data source into one single indicator, i have attached a screen shot of my schematic below. let's to refer to it...
i need to run the big case structure after condition is met, but once it is met it will also need to check for certain condition, like '21' and '31' (i have many more) and display whatever constant that is to be displayed, but after i wired it up, it says wire connects to a undirected tunnel. is there is way to wire this sort of logic? i already tried it for quite sometimes, but still couldn't get it to work...
Thanks in advance for all your help~
Attachments:
error9.JPG ‏63 KB

Simmy,
1st) Please do not use variables if not really neccessary
2nd) Think of the wires in LabVIEW just like wires in electronics. Connecting two sources lead to a short. In your case, the short is not obvious since LV didn't typify the outputtunnel from the lower case structure.... which is strange to me, but for usage just as bad as a short....If you like to create a string "21" out of "2" and "1", you have to concatenate the two strings "2" and "1".
hope this helps,
Norbert
Message Edited by Norbert B on 08-01-2008 02:18 AM
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.

Similar Messages

  • Before the selector value reach a Case structure I need to stop it until a push button is pressed. How to do?

    Before the selector value reach a Case structure I need to stop it until a push button is pressed. How to do?

    altenbach wrote:
    UliB wrote:
    simply wire your selector value through a while loop. Stop the loop with your button. After the loop stops, the value will go on to the case structure.
    Hmmmm.....
    Hello altenbach,
    roflol .
    Thank you for the link to 'A Field Guide To LabVIEW Objects - Selfish Loop'. I'll keep that in mind, when answering other questions with while loops.
    Uli

  • Case Statement Help needed

    case
    when datepart(mm,[SDate]) between '9' and '11' and datepart(mm,[PDate] ) between '9' and '11'
    Then 'Q1_'
    when datepart(mm,[SDate]) between '12' and '02' and datepart(mm,[PDate] ) between '12' and '02'
    Then 'Q2_'
    when datepart(mm,[SDate]) between '03' and '05' and datepart(mm,[PDate] ) between '03' and '05'
    Then 'Q3_'
    when datepart(mm,[SDate]) between '06' and '08' and datepart(mm,[PDate] ) between '06' and '08'
    Then 'Q4_'
    else 'N/A' end as QTR
    from DDA_2015_FSR
    Datatype for SDate and Pdate
    2014-09-01 00:00:00
    I need help with above case statement, When I run the case statement I get 'N/A FSY_2015   ' When I add the following where clause to validate the results. In my table I do have records for all four quarters, Except Q1, all other rows I get  'N/A
    FSY_2015   '
    Am i missing something? Can someone help me here?
    where
    datepart(m,[SDate]) 
    between
    '12'
    and
    '02'
    and  
    datepart(m,[PDate]
    between
    '12'
    and
    '02'
    FM

    There is no CASE statement in SQL; it is a CASE expression. Big difference. 
    Since SQL is a database language, we prefer to do look ups and not calculations. They can be optimized while temporal math messes up optimization. A useful idiom is a report period calendar that everyone uses so there is no way to get disagreements in the DML.
    The report period table gives a name to a range of dates that is common to the entire enterprise. 
    CREATE TABLE Something_Report_Periods
    (something_report_name CHAR(10) NOT NULL PRIMARY KEY
       CHECK (something_report_name LIKE <pattern>),
     something_report_start_date DATE NOT NULL,
     something_report_end_date DATE NOT NULL,
      CONSTRAINT date_ordering
        CHECK (something_report_start_date <= something_report_end_date),
    etc);
    These report periods can overlap or have gaps. I like the MySQL convention of using double zeroes for months and years, That is 'yyyy-mm-00' for a month within a year and 'yyyy-00-00' for the whole year. The advantages are that it will sort with the ISO-8601
    data format required by Standard SQL and it is language independent. The pattern for validation is '[12][0-9][0-9][0-9]-00-00' and '[12][0-9][0-9][0-9]-[01][0-9]-00'
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Case statement help needed bit tricky

    I have a requirement for a Column Quarters which will idenitfy records based on their service and paid paids.
    Output of Column should be
    QTR
    FSY2015Q1
    Our Quarters start like this Q1= 9/1 /2014-11.30.2014 , Q2 12/1/2014 -02/28/2015, Q3: 3/1/2015 - 05/31/2015 Q4:06/01/2015 -08/31/2015.
    With the below Case statement  records that hit Q1 should be for the FSY upcoming.  records  in Sept, Oct, November of 2014, would actually be for FSY15Q1  (not FSY14Q1).   How can i correct
    this ?
    case
    when datepart(mm, Service_Through_Date ) between '9' and '11' and datepart(mm, c.paid_date ) between '9' and '11'
    Then 'Q1 '
    when datepart(mm, Service_Through_Date ) in ('01','02', '12' ) and datepart(mm, paid_date ) in ('01','02' , '12' )
    Then 'Q2 '
    when datepart(mm, Service_Through_Date ) between '03' and '05' and datepart(mm, paid_date ) between '03' and '05'
    Then 'Q3 '
    when datepart(mm, Service_Through_Date ) between '06' and '08' and datepart(mm, paid_date ) between '06' and '08'
    Then 'Q4 '
    else ' ' end + ' ' + 'FSY ' + '' + cast(datepart(Year, Service_Through_Date)as char(7)) as QTR
    FM

    Your best bet here is going to be to create a calendar table, which has your quarters in it.
    I wrote an article on them here: http://social.technet.microsoft.com/wiki/contents/articles/29260.tsql-calendar-functions-and-tables.aspx.
    For your particular scenario you'll need to add a column to the existing code, something like this:
    SELECT CASE WHEN DATEPART(MONTH,@date) IN (9,10,11) THEN 'FSY'+RIGHT(YEAR(@date)+1,2)+'Q1'
    WHEN DATEPART(MONTH,@date) IN (12) THEN 'FSY'+RIGHT(YEAR(@date)+1,2)+'Q2'
    WHEN DATEPART(MONTH,@date) IN (1,2) THEN 'FSY'+RIGHT(YEAR(@date),2)+'Q2'
    WHEN DATEPART(MONTH,@date) IN (3,4,5) THEN 'FSY'+RIGHT(YEAR(@date),2)+'Q3'
    WHEN DATEPART(MONTH,@date) IN (6,7,8) THEN 'FSY'+RIGHT(YEAR(@date),2)+'Q4'
    END AS fiscalQuarterName
    Once you have this column, you can simply join to the calendar table:
    SELECT service_through_date, paid_date, sc.fiscalQuarterName, pc.fiscalQuarterName
    FROM myTable t
    INNER JOIN calendar sc
    ON t.service_through_date = c.today
    INNER JOIN calendar pc
    ON t.paid_date = pc.today
    If you can't, or don't want to impliment this, you could solve the issue in your cast statement by moving the year into the CASE, like this:
    SELECT CASE WHEN DATEPART(MONTH, Service_Through_Date ) BETWEEN 9 AND 11 AND DATEPART(MONTH, c.paid_date) BETWEEN 9 AND 11 THEN 'FSY'+RIGHT(YEAR(Service_Through_Date)+1,2)+'Q1'
    WHEN DATEPART(MONTH, Service_Through_Date ) = 12 AND DATEPART(MONTH, c.paid_date) = 12 THEN 'FSY'+RIGHT(YEAR(Service_Through_Date)+1,2)+'Q2'
    WHEN DATEPART(MONTH, Service_Through_Date ) BETWEEN 1 AND 2 AND DATEPART(MONTH, paid_date) BETWEEN 1 AND 2 THEN 'FSY'+RIGHT(YEAR(Service_Through_Date),2)+'Q2'
    WHEN DATEPART(MONTH, Service_Through_Date ) BETWEEN 3 AND 5 AND DATEPART(MONTH, paid_date) BETWEEN 3 AND 5 THEN 'FSY'+RIGHT(YEAR(Service_Through_Date),2)+'Q3'
    WHEN DATEPART(MONTH, Service_Through_Date ) BETWEEN 6 AND 8 AND DATEPART(MONTH, paid_date) BETWEEN 6 AND 8 THEN 'FSY'+RIGHT(YEAR(Service_Through_Date),2)+'Q4'
    ELSE 'FSY'+RIGHT(YEAR(Service_Through_Date),2)
    END
    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.

  • Case Statement Help needed [Nested]

    Hi all,
    I need to write a case statement my requirement is
    ENC.EET.40 E_Disposition populated from either “E_ Status” field of HP_Response_table, “File Status” of HP _TTT_Response_Table,
    or “E_Status” of DDA_R_Table. If no data in any of these fields, default to “Submitted”
     So my case stmt should look like
    case when E_Status is null then 'SUBMITTED'
    when   e_status is null then 'Submitted'
    when    FileStatus is null then 'Submitted'
    Else case when E_status is not null then ............?????????????
    else case when
    Im Confused.. Can someone help me ?
    FM

    select ...
    coalesce (resp.E_Status, resp2.FileStatus, dda.E_Status, 'Submitted')
    from ...
    Obviously I have used alias for the respective tables according to your logic.

  • Case structure help

    Rusty with labview and need help.
    Each value (13 total) from an array is selected one at a time to form part of a command which is sent to test equipment.
    The first frame of the stacked sequence structure should execute all of the array values then move to frame 2. 
    Note: The only difference in each frame is a value of a channel card, channel "1"  is selected first then channel "2" is selected in the second frame.
    My problem is the frame doesn't execute all the values in the first frame before moving to frame 2.  
    If there is a simpler way of doing what I am trying to do please let me know.
    Mike 
    Attachments:
    test 71.vi ‏66 KB

    I am planning to expand the test capability of my first test program I created in LabView a few years ago. Back then it was my first shot using LabView so my final version of this test program became a monster. I have a chose to start from scratch and put together a new, more creative and mainly more efficient program or modify the beast of a program I already have. I'm not sure what direction to go right now. I am not an expert using LabView by no means; this is basically my first and last test program I created. This test program does the following:
    I push the start button on the front panel
    LabView commands the data switch (34970) to output a logic high to switch a multi-channel RF relay. This relay is a one in, 12 out coaxial relay with 12 logic terminals for switching the relay.
    So, one at a time the relay switches in and out depending on the logic line selected from LV (array). Each of the twelve coaxial outputs from the relay is connected to the device under test (DUT). The RF input port of the relay is connected to a network analyzer (also under the command of LV) to measure VSWR. 
    When all connected and test program is running, each of the 12 DUT's are measured at room temperature. Then the temp chamber (not under command of LV but running in auto mode) goes to 100 deg and soaks for one hour.
    After one hour all 12 DUT's are re-measured. The process is repeated when the temp chamber goes cold.
    There are 15 temperature cycles total. At the end of each half cycle data or VSWR is measured and stored as a *.png file within the network analyzer.
    m

  • Creating Extractor Structure Help needed

    I m looking to create a custom datasource with function module (without delta)in rso2.
    but first i have to create
    1.a functional module( which i know how to create)
    2.a extract structure
    can anybody tell me how to create extract structure
    Any document(s) for whole process will be appreciated.
    thankx in adv.
    regards,
    San!

    San,
    Check this:
    In this field you have the name of the type to which the component is assigned.
    The following cases are possible:
    A screen element is assigned to the component.
    A structure is assigned to the component.
    A table type is assigned to the component.
    The component references a class or an interface, or it has a generic reference to ANY, OBJECT, or DATA.
    The field component type is not filled. The data type, number of positions, and, if required, the decimal places are specified directly after the pushbutton Predefined type has been selected. In this case, the field component type remains empty.
    To find out which type is assigned to a component, refer to the field data type.
    Thanks

  • Installation directory structure - help needed

    Hi,
    we are looking to install a cluster of weblogic servers, based on a SAN network.
    We are looking for advice on what the best practise is for the installation within
    directories /opt/bea/...etc for the various components: product, configuration,
    application, jar, ear, etc.
    Can anyone provide some good pointers of what they have used?
    thanks
    S

    Hi,
    we are looking to install a cluster of weblogic servers, based on a SAN network.
    We are looking for advice on what the best practise is for the installation within
    directories /opt/bea/...etc for the various components: product, configuration,
    application, jar, ear, etc.
    Can anyone provide some good pointers of what they have used?
    thanks
    S

  • Need help with case structures- please help :)

    Hey all.
    I'm currently trying to program a infrared furnace. I'm setting a temperature, subtracted my set temperature from the actual temperature (thermocouple hooked up to SCB-68), and voltage is being sent to the controller of the furnace accordingly. However, I need to hold the set temperature for a certain amount of time. I need help programming this: when the VI reads the set temperature from the thermocouple, it results in a timer running down. When the timer runs down to 0, the While Loop ends. I'm thinking case structures is most appropriate, but if you have a better suggestion, please let me know.
    Thanks

    You should probably implement a state machine.
    The state machine would keep track of the temperature and making ajustments on a timely basis.
    There is a template of a state machine is you select under the File menu > New > From Template.
    You can also look under Help > Find Example > and do a search for state machine.
    There are lots of state machine examples on this forum, some of which may be quite useful.
    RayR

  • I have a case structure writing a digital out and I need it to express this case for 1 min......how?

    basically I just need to know how to make my case structure express a certain case for a specified amount of time. thanks...

    Two ways
    Use a Functions palette>>Time and dialog>>'wait'  function and set a 1 minute delay( 60000 m sec) delay
    If using a state machine, do a state transition only after the specified time has elapsed, as shown in attached vi
    Hope this helps
    Regards,
    Dev
    Attachments:
    n sec wait.vi ‏29 KB

  • Help with case structure

    In the VI that i'm enclosing, i have used a boolean array of two booleans to operate two case structures. Inside the case structure, when the boolean is true the shift register value is to be incremented once.The difference between the two incremented values is taken as count. I am facing two problems, firstly, the increment takes place continously instead of just once every time the boolean is true, secondly, the count switches to zero when the switch is turned back to false.
    Thanks in advance.
    Attachments:
    New.vi ‏11 KB

    Try something like this.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    NewMODCA.vi ‏8 KB

  • Can I use a formula node to start the execution of a case structure?

    Hi,
    I am working on editing a VI to make it much easier to understand (for colleagues and non LV users). For one reason or another, the VI's creators did not fully make use of the power of case structures and other structure types. In the application we need it for, the instrument cycles and repeats measurements on several objects. We are interested in measuring the motor currents for several motors in the system. As it stands now, for each sample object's run, there is a separate sub-vi diagram which displays its waveform trace and several indicators such as max current, time at max, etc. That code was contained within a T/F case structure and copied and pasted 20 plus times.... Obviously the vi became extrememly cluttered and needed a huge screen to see. The trigger for the current case structures is an EQUALS comparison between one input (which is the sample object counter; and this part I will likely leave unchanged since it makes a lot of sense already) and a constant which was defined 1 through 20+ for case. 
    I have since made one case structure and 20+ instances of that case and have labeled them (at the top selection box near the detent arrows) "1", "2", 3, etc. I am wondering if I can use a formula node to act as the "trigger" which sets each case structure running? I believe that a simple IF statement should work. Please see a snippet of my attempt at making this in C below.
    For the node, I defined X as the input and Y as the output. The input to the node, X, is connected to the sample object counter. The output, Y, is connected to the case selector of the case structure. My attempt at the code is below:
    int32 y
    For(x == 1)
       y = "1";
     For(x == 2)
       y = "2";
    etc, etc.
    Is that above code snippet correct? Do i need something like "ENDIF" or "end if" at the end? Does "y" have to be defined as "int32" or can it be something else?
    Thanks for the help!

    Is your formula node doing anything else besides what is shown?
    Why don't you just wire the value that is going into it at X directly into the selector of the case structure?
    Attachments:
    Example_VI_BD.png ‏2 KB

  • 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

  • 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

Maybe you are looking for

  • Can i install a wireless card in my Satellite P30-141 's wireless bay?

    The P30-141 doesn't come with wireless functionality and i can't track any wireless antennae cables which should reside within the top casing of the machine, but i'd like to know if it's possible to undertake my own installation of a toshiba wireless

  • How do i transfer a pdf to microsoft word

    i do not know how to transfer pdf to microsoft word

  • I can't change the sender/receiver name on my email

    This seems like a simple problem, but I can't solve it.  On my email, I send a message and it shows my wife's name as sender on the recipient's received email. I thought it was caused by my wife's entry in the Address Book showing our email address,

  • Itunes syncing issues

    I have recently changes my sons iPod apple ID account over to his own for new apps etc. however when I try to sync his iPof I keep getting a message that says 'can not load data class' and iTunes freezes up. It will not sync. Thanks

  • COPY command with Transparent Gateway

    We have tried to use copy command to copy the data from AS/400 database (tns name as AS400) to Oracle database (Data2) in NT thru Transparent Gateway. The following works using INSERT statement:- INSERT INTO EMP select * from scott.emp@as400 But when