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

Similar Messages

  • When is best to use a formula node?

    Hello:
    I just started wondering when would be a good situation to use a formula node??. It's just to save space in the diagram if there's the need to create a complex arithmetic operation?? Wouldn't it be better to just use G??
    Robst - CLD
    Using LabVIEW since version 7.0

    The only time I use a Formula Node is when I need to enter an equation (which is not very often).  Here's a VI I wrote just the other day that was simply faster to write, and probably easier to understand mathematically, than attempting to wire up the same thing.
    -D
    Message Edited by Darren on 02-09-2006 01:32 PM
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman
    Attachments:
    formula_node.jpg ‏44 KB

  • HT204204 My phone crashed after updating it to IOS 8. I can't use it cause its stucked on the start up menu, the apple logo with black background.

    Hi to all,
    I hope someone can help me. My phone crashed after updating it to IOS 8.3. I can't use it cause its stucked on the start up menu, the apple logo with black background. Even when I restart my phone, it is still stuck on the start up menu, the black background with apple logo in the middle.

    Slone,
    I finally decided to turn this annoyance into an opportunity.  After a lot of experimenting I found that my iPad was just fine under 7.1 if I simply restored it as new.  I have a lot of time on my hands and I had 1424 apps on my iPad!  This is why every attempt to restore took so long.
    I decided to restore as new, spend a day restoring the apps I really used.  Doing so gave me a quick iPad with only bout a quarter of the storage used.
    Granted it was a pain in the arse, but I wrote it off as in the old days when you had to do this with windows 95 just to keep a stable system.
    I DO have some data in a few files of the now unused backup but a quick google search finds a couple Mac programs out there that will allow you go extract audio recordings, app data files etc. from the backup.  I'll do that someday if I even miss the files I've probably forgotten that are there.
    Anyway, there was nothing wrong with my hardware.  I think there were just some troublesome setup items that 7.1 didn't like.  Once set up as new, the ipad was fine.
    Good luck!

  • Can I use my creative cloud account at the same time for my iMac and my MacBook?

    Can I use my creative cloud account at the same time for my iMac and my MacBook?

    Thank you Sheena!!
    Guy
    Op 2-jan.-2015, om 12:16 heeft Sheena Kaul <[email protected]> het volgende geschreven:
    Can I use my creative cloud account at the same time for my iMac and my MacBook?
    created by Sheena Kaul <https://forums.adobe.com/people/Sheena+Kaul> in Adobe Creative Cloud - View the full discussion <https://forums.adobe.com/message/7059158#7059158>
    Hi Guy Heyligen,
    Absolutely. You can use the creative cloud account on two machines.
    You may also refer to the link below:
    Creative Cloud Help | Creative Cloud / Common Questions <http://helpx.adobe.com/creative-cloud/faq.html>
    Regards,
    Sheena
    If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7059158#7059158 and clicking ‘Correct’ below the answer
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7059158#7059158
    To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"
    Start a new discussion in Adobe Creative Cloud by email <mailto:[email protected].com> or at Adobe Community <https://forums.adobe.com/choose-container.jspa?contentType=1&containerType=14&container=46 70>
    For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624 <https://forums.adobe.com/thread/1516624>.

  • Can I use BOTH IE & FF and retain the shortcuts to both to use at will?

    Can I use BOTH IE & FF and retain the shortcuts to both to use at will? I can download FF ok and use for a day or so along with IE, but after that I start to get messages from Windows saying IE is not my default browser and do I want to make it the default. If I answer no, many links in my windows mail and other links in the windows system don't work...I get a message that the file can't be found . If I answer yes, the FF shortcuts disappear and can't bring up the FF from the FF folder, I get a msg that the FF folder is corrupt!

    Hi, aparently we're a problem while you installed firefox. try to uninstall and reinstall firefox again,
    after you do that, open firefox and go to Tools>options>Advanced>General, and see that it have to be an option at last that sez "always check to see if firefox is the default browser on startup" uncheck that option.,
    Then go to IE, go to tools>internet options>programs>and clic on "Make Default".
    With this you make that IE the default browser.
    Bye

  • Formula node output on the right hand side

    I want to use formula node to find the  independent variable (right hans side equation). For simiplicty let us say y=x+z. When I make z as the output it gave wrong answer but when the y is output, it works fine. I have a more complicated equation which prevent modification to make the output on the left hand side. I attached the VI

    Husain111 wrote:
    I want to use formula node to find the  independent variable (right hans side equation). For simiplicty let us say y=x+z. When I make z as the output it gave wrong answer but when the y is output, it works fine. I have a more complicated equation which prevent modification to make the output on the left hand side. I attached the VI
    LabVIEW does not contain a symbolic math solver. If you cannot rewrite the formula in the way you want (try wolfram alpha!), I would probably use newton-raphson to find the solution. It ypically converges very fast. Make sure there is only one unique solution and that you know a reasonable guess.

  • Can FAST_START_MTTR_TARGET use on SE? What's the implication?

    Can FAST_START_MTTR_TARGET use on SE? What's the implication?

    Interesting. I find an Oracle Metalink Document which states the following;
    Oracle Server - Standard Edition - Version: 10.2
    Features Not Available with Oracle Database Standard Edition or Standard Edition One
    Area and Feature Comments
    Fast-start fault recovery This feature provides fast and predictable recovery from system failures.
    Differences Between Enterprise, Standard and Personal Editions on Oracle 10.2
    Doc ID: Note:465465.1
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:4418251543887257425::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,465465.1,1,1,1,helvetica
    Adith

  • HT204053 If I have set up my Mac with two different users,  can I use two different Apple IDs on the same Mac?

    If I have set up my Mac with two different users,  can I use two different Apple IDs on the same Mac?

    Each user account may have its own Apple ID.

  • I am receiving a new ipad (3 i guess) from my mom who is in the U.S but i am currently in the philippines. I ofcourse, want to have apps,games,movies etc. can i use an itunes giftcard (also from the U.S) to buy my apps without any problems?

    i am receiving a new ipad (3 i guess) from my mom who is in the U.S but i am currently in the philippines. I ofcourse, want to have apps,games,movies etc. on it. can i use an itunes giftcard (also from the U.S) to buy my apps without any problems?

    No.
    iTunes terms of service:
    The iTunes Service is available to you only in the United States, its territories, and possessions. You agree not to use or attempt to use the iTunes Service from outside these locations. Apple may use technologies to verify your compliance.

  • Can I use an airport extreme to extend the range of my wireless modem

    Can I use an Airport Extreme to extend the range of my wireless modem?
    At one end of my house I have a dual band wireless ADSL modem which provides my internet connection and I want to extend (improve) the wireless coverage to the other of the hosue where my Apple TV (2nd gen) is located. I have being trying to extend my wireless network with an Airport Extreme but so far without success. I can get the Airport to join the wireless network, but I suspect that it is only acting as another client and not actually extending the wireless range. There is a setting in the Airport configuration to "extend and existing network", however when I choose this option the Airport no longer connects to my existing wireless network and I am beginning to suspect that this fuction only works with another Apple device (Airport Extreme or Express).
    Has anyone been able to extend the range of a third party wireless router / modem with an AirPort Extreme? If so, any advice that you can offer wold be appreciated.
    Regards
    Michael

    Thanks Tesserax,
    Your answer has confirmed my suspicions.
    Option 1 from your suggested solutions is not a goer because the modem and Airport Extreme are in different parts of the house making it impractical to run a cable between the two devices. 
    I did try option 2 and bought a Netgear range extender, which according to Netgear it would work with my D-Link modem - not.
    However I have managed to work around the problem (sort of) by using the Airport Extreme to create a wireless network between my iMac 27 and my Apple TV. The idea is that the iMac will act as a router between ethernet connected ADSL modem and the wirelessly connected Apple TV.
    The good news is that I am now able to play the content from my iTunes library on my Apple TV without interruptions due to a poor wireless connection . Although the connection from the Apple TV to the internet is not working I think this is most likely just a configuration issue and for me it is not really a show stopper.

  • How can I use an IF ELSE statement and the xdoxslt: get_variable together?

    First of all, I'm a big fan of this forum and I just want to thank the community for helping make the BI Publisher world a better place.
    I'm trying to populate a table with a years worth of data with the column=PRODUCT and row=month of DATE. Here's the catch, not all of the months will have data. So here's where my problem is, I'm not able to use an IF ELSE statement along with a XDOXSLT:GET_VARIABLE expression so that if there's no data for that month the default value will be 0.
    Can someone help me find a solution to either one of the attempts below or a completely new method? Thanks!
    BP4 = numeric month value using DATE (more code to pull only month from DATE not included here)
    JAN1 = PRICE if data exists, else 0
    1) I tried this and it didn't work:
    <?if: xdoxslt:get_variable($_XDOCTX,'BP4'),01 then xdoxslt:set_variable($_XDOCTX, 'JAN1',PRICE) else xdoxslt:set_variable($_XDOCTX, 'JAN1',0) end if?>
    <?xdoxslt:get_variable($_XDOCTX,'JAN1')?>
    <?end if?>
    2) I tried this and it didn't work:
    <?xdoxslt:ifelse(xdoxslt:get_variable($_XDOCTX,'BP4')='01',xdoxslt:set_variable($_XDOCTX, 'JAN1',PRICE),xdoxslt:set_variable($_XDOCTX, 'JAN1',0))?>
    <?xdoxslt:get_variable($_XDOCTX,'JAN1')?>
    <?end if?>
    3) I tried this and it didn't work:
    <?xdofx:if xdoxslt:get_variable($_XDOCTX,'BP4')='01' then xdoxslt:set_variable($_XDOCTX, 'JAN1',PRICE) else xdoxslt:set_variable($_XDOCTX, 'JAN1',0) end if?>
    <?xdoxslt:get_variable($_XDOCTX,'JAN1')?>
    <?end if?>
    sample XML:
    <ROW>
    <Name>Craig Hernandez</NAME>
    <DATE>2013-01-01T00:00:00.000+08:00</DATE>
    <PRICE>31</PRICE>
    <PRODUCT>BPD</PRODUCT>
    </ROW>
    -DrT
    Edited by: 990965 on Feb 28, 2013 8:27 AM

    let me clarify my logic, the template 1) searches for the relevant PRODUCT (in the case below, it searches for BPD which is the column in the table) 2) searches for the relevant month in DATE (which is the row in the table) 3) if data exists, get PRICE else default to 0
    Variable definitions:
    BP4 = numeric month value from DATE (more code to get this value not included here, but it works...)
    JAN1 = set to PRICE if data exists for that month, else 0
    the query is only pulling all of the existing data, so if there's no data for March then there wouldn't be a March entry in the xml. In the sample xml below, we only have data for the first two months (Jan, Feb) so that's the only data in the xml. I can't check if PRICE is null because the xml will not have any data for March.
    I've read through other threads and it seems that BI Publisher can't use an IF THEN ELSE with the XDOXSLT:GET_VARIABLE. I sent the template and xml to you.
    Sample XML:
    <ROW>
    <Name>Craig Hernandez</NAME>
    <DATE>2013-01-01T00:00:00.000+08:00</DATE>
    <PRICE>31</PRICE>
    <PRODUCT>BPD</PRODUCT>
    </ROW>
    <ROW>
    <Name>Craig Hernandez</NAME>
    <DATE>2013-02-01T00:00:00.000+08:00</DATE>
    <PRICE>30</PRICE>
    <PRODUCT>BPD</PRODUCT>
    </ROW>
    Edited by: 990965 on Feb 28, 2013 8:30 AM

  • I want to hook up a mac mini and us my tv as a monitor. how can I use airplay from my phone on the mac mini like i can with an apple tv (without having to buy an apple tv!). the airplay capabilities i want to use are mirroring and streaming from my iphone

    i want to hook up a mac mini and us my tv as a monitor. how can I use airplay from my phone on the mac mini like i can with an apple tv (without having to buy an apple tv!). the airplay capabilities i want to use are mirroring and streaming from my iphone!

    Download AirPlayer for Mac - Transforms your Mac into an AirPlay-compatible display. MacUpdate.com

  • HT204053 Can I use an icloud email address as the primary email address for an Apple ID?

    Hi There
    Can I use an icloud email address as the primary email address for an Apple ID?

    Whenever you create a new icloud email it is an Apple ID, but if you previously had an Apple ID you cannot use the new email to replace the old one. You have to abandon the old accout and you will lose all the content you had with that account. But what I did was upload all my itunes to amazon cloud, these were the only purchases I had. I already bought books from kindle and I now rent movies from amazon instant video. Everytime I log in I use my icloud email and password. I just used it to sign in to support communities.
    The notification that you posted about changing your Apple ID was present when I created my icloud email and made the change.

  • Can I use my norwegian iPhone 4 in the US for a few weeks?

    Can I use my norwegian iPhone 4 in the US for a few weeks?

    So I have lived in Daegu, South Korea for 9 months now. And our iphones work perfectly.
    Thankfully we didn't sell our phones in NZ, I had a look online and NZ doesn't lock IPhones to their networks like other countries.
    We went to SKT (in Daegu / National University of Ed) and bought new simcards for $10 each.
    Then signed up for contract / plans.
    We pay roughly $50 a month for unlimited data, 200 minutes, 600 text messages.
    It costs $9 to roam overseas a day.
    We've managed to travel to Japan and Hongkong using our South Korean sims.
    It' been pretty succesful for us.
    All I can say is, do heaps of research peeps, and don't stress :-)

  • Can i use my iphone 5 charger for the ipad air

    Can I use my iphone 5 charger for the ipad air?

    It's really not recommended. The iPhone's 5w charger does not output enough current to properly charge the battery. It -may- charge but if it did, it would charge the iPad very slowly.
    This would be like trying to fill a bucket of water (iPad) with a squirt gun (5w charger)
    Also under iOS 7, the charging requirements are much stricter than iOS 6. You'll likey get an error message if you try.

Maybe you are looking for

  • Open new session in another language - Helpdesk tool!

    Hi, We have a lot of Chinese and Indian colleagues who ring up our German hotline with SAP problems. Normally we are signed on in German (which we understand!) but we would like to open a new session in English, without having to sign on again, so we

  • Can two computers use USB to print to the same printers?

    My wife and I have two macs, side by side, one a G5 iMac and the other a G5 PowerMac, both running 10.5.1 We have four printers, and we both use all of them at different times. We have one powered USB hub with four ports. What we would like to do is

  • Using photo comments in iWeb

    I typed in all of my descriptions to my photos as comments in iPhoto and then tried to post to iWeb but it didn't use the comments. Is there a way instead of retyping all of the desciptions?

  • Would like to use/see extended ascii characters in...

    I've got an E72 and I love it, but I would like to be able to see and use extended ascii characters.  Here is an example: σ__σ .  It looks like an upside-down, mirror-image capital Q on either side of the regular underline character.  To get the char

  • How many tables can i create in Oracle 10g ?

    hi every body ! how many tables can create in oracle 10g ? thank you !