Using the Formula Node for PDA

I get a compile error when I use C code inside the formula node. Is it possible to use C Code inside the formula node for PDA applications? Do I have to include any file while building the executable for the PDA

Ok, I was able to successfully build an executable file without error. I attached the screen shots of your program in execution. Does this look like the desired result?
I'm confused as to why I can build and run the program on my machine. I have LabVIEW 7.0 and Windows XP. What version of Windows and LabVIEW are you using? Also, are you getting the error window when you try to build an executable or when you attempt to run the VIs within LabVIEW?
Regards,
-Joe-
Attachments:
tutor.JPG ‏100 KB
tutor2.JPG ‏122 KB
detector.JPG ‏46 KB

Similar Messages

  • 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

  • Formula Node on PDA

    I'm using a formula node on Labview PDA and i have problem regarding multiplying double variable. If I multiply integer number (as double) everithing is OK.
    example 45*2 the results is 90.0
    If I multiply 2 fractional number the solution is wrong:
    example 45*2.5 the results is 112.0705032 and there is some strange features inserting the values inside the number control.
    I Attach the source code and the PDA executable (to convert Lat, Long coord. to UTM) in order to undestand the problem. I you remember that the same code work perfectly if the execution target is Labview for Windows.
    Best Regards
    Sergio Zanoli
    Attachments:
    Geo2UTM_standalone.vi ‏47 KB

    I checked the feature using a simple application on the PDA emulator and I could not replicate the error.
    I have attached the VI i worked with ..check if this helps.
    Attachments:
    Untitled.exe ‏332 KB

  • How to change content in the formula node of the current vi

    Actually I want to give formula with array index. 
    My formula p=a[0]-30; But i couldnot give array index in the formula expression..
    Please help me in this issue.

    Muthu92 wrote:
    Thank you for your reply. It is very useful for me.  But i can't give conditional operator in that operator. It is showing error.
    My Test cases
    A[0]+A[1]>150
    A[31]-50 <100.
    If those are your exact statements, then they don't make sense in a formula node.  You have to use them in an if-statement or some other type of control logic.  This mimics text-based programming languages such as C... See here for instructions on formula node syntax: http://zone.ni.com/reference/en-XX/help/371361G-01​/lvhowto/formula_node_syntax/
    For instance, you COULD say something like:
    **In this example, let A[0] == x, A[1] == y, A[31] == z**
    if(x+y>150)
    /* do something if this is true */
    else if(z-50 < 100)
    /* do something else */
    EDIT: 
    It should also be noted that Variable Names MUST be lowercase!! I just discovered this
    EDIT2:
    I stand corrected.  After trying to create an example and digging through the LabVIEW Help, I stumbled across this:
    Differences between the Parser in the Mathematics VIs and the Formula Node
    The parser in the Mathematics VIs supports all elements that Formula Nodes support with the following exceptions:
    Variables—Only a, a0, ..., a9, ... z, z0, ..., z9, are valid.
    Logical, conditional, inequality, equality—?:,, &&, !=, ==, <, >, <=, and >= are not valid.
    Functions—atan2, max, min, mod, pow, rem, and sizeOfDim are not valid. You can use these functions in a Formula Node or use their corresponding LabVIEW functions.
    So it DOES NOT seem like Eval Formula Node can do conditionals like you want.  I would just implement them using a LabVIEW based algorithm after all.  Trying to out smart the formula nodes to avoid simple LabVIEW code is just too much of a hassle
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If someone helped you out, please select their post as the solution and/or give them Kudos!

  • Formula node for array

    hi
      i want to convert the values of an array using a different formula for each value in the array.     Can i use formula node for this?    if yes how
    if no then is there any other method except for extracting each one individually and converting?

    kunal227 wrote:
    there are 16 elements in the array and the number remains constant (actually they are temp values acquired by a fieldpoint hardware).
    the formula is a linear conversion (for example y = m*x + C) corresponding to the calibration curve of individual thermocouple connected to the fieldpoint hardware.   every thermocouple has a different calibration curve and hence every element in the array is converted using a different linear formula.
    All you need is an array of [m] and an array of [C], all the same size as your data arrray. No formula node needed.
    (I think that's what mikeporter had in mind above)
    Message Edited by altenbach on 07-24-2007 03:38 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    CorrectedArray.png ‏4 KB

  • Help comparing the value of a button using the Property Node (I get a variant)

    Dear Sirs:
    (I'm using LabView 6. I guess the solution is different for 6.1)
    Currently I have created an array of Boolean RefNums (which point to many, many buttons). When I need to know when any (and which) of the buttons was pressed I just compare every element on the array with the constant TRUE. It fact, as the array is built from RefNums, I should compare the VALUE from the Property Node.
    The problem here is that the Property Node for this type of Boolean is a LV Variant, and I need to compare this with a TRUE/FALSE value.
    I tried to convert the TRUE constant to a LV variant and visc. But nothing works... I always get that none of the buttons was pressed.
    Here it co
    mes the question: "How can I compare the value of a Property Node for a Boolean (Button) with a TRUE (or False) constant?"
    BTW, maybe I should explain why I'm using RefNums instead of the direct values: As my project requires tons of buttons, I would preffer using RefNums to refer to them. (I.E. I could use a single VI that takes the RefNum and formats the button to hide it for certain users).
    I have enclosed a VI that contains what I've achieved until now, which is nothing
    I appreciate your time and help.
    Best regards,
    JAVIER VIDAL
    Attachments:
    Other_Main_Menu.vi ‏103 KB

    Javier,
    There is another problem in your code: the booleans are not polled by the main loop so they will remain false until the user presses them again. This renders the boolean latch action useless.
    What you can do is to change the mechanical action of the booleans to non-latch. When you detect a "true" in the polling loop, set the boolean to false again. One added benefit is that once all boolean are non-latch, the value property won't be a variant but a boolean so conversion is no longer needed.
    LabVIEW, C'est LabVIEW

  • Using One Property Node For Multiple Controls/I​ndicators

    Question for all you LabVIEW gurus.  Is there a way to create 1 property node that is used for multiple indicators?  For example, if I wanted to display the same value on 10 different indicators using the property node - value function do I need to create 10 separate property node-value instances for each indicator?  Or is there a way to tie all of those indicators to only one property node?
    Thanks!
    Solved!
    Go to Solution.

    Hi hobby1
    You could create a cluster, and inside in it put all the indicators, see the image attached
    Attachments:
    capture1.JPG ‏14 KB

  • Using the invoke node VI Strings.Im​port

    I'm achieving a program to translate the captions which are on the front panels of existing programs.
     I use the invoke node VI String.Export to create a file containing the differents properties of the front panel objects of the target VI.
     I modify the fields <CONTROL ID .... name="xxxxx"> to change the captions and then i use the invoke node VI Strings.import to uptade the target VI.
    Then i use the invoke node VI Save.Instrument to save the modifications.
    The problem is that the Log File created by the invoke node VI Strings.import indicates me :
    Parsing error while importing strings
     to traduction_1.0.vi
     from C:\Documents and Settings\Administrator\Desktop\work\Labview\Exos\t​raduction\Vi_import.victl
    Tue, May 16, 2006 9:43:20 AM
    Error occurred while parsing for String object. Control name does not match.
    Which means that it can't change the captions name.
    Do i badly use the invoke nodes ? Do i have to use an other function?

    Apparently you are changing the control label, not the caption. If you created a caption for the control, the caption value should appear in the <PARTS> body, nested into the <CONTROL ...> tag.
    You can't change control labels this way. Labels are used to identify the control to which you are applying changes. Changing the label would cause the control not being found.
    Paolo
    Paolo
    LV 7.0, 7.1, 8.0.1, 2011

  • Are you using the MathScript Node in LabVIEW or the MathScript Interactive Window?

    Are you using the MathScript Node in LabVIEW or the MathScript Interactive Window? I am very excited with the MathScript Node inside LabVIEW. However, I would like to see what other people think.
    Avalim

    Avalim,
    Personally, I am determining that I like to use the MathScript Node in LabVIEW.  It makes it easier for me to pass my data in and out of the LabVIEW environment!!  But, like you, I am excited to see what any other users think!!
    -Jeff P
    Jeffrey P.
    LabVIEW Product Management
    National Instruments

  • 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

  • How do I change the icloud account on my iphone? I want to use the same account for all my apple devices (macbook air and imac and iphone). I can't see where I can amend the iphone account because it is in grey?

    I want to use the same account for all my apple devices (macbook air, imac and iphone). I can't see how I can amend the iphone account because it is in grey? I also can't remember the password for this account so i can't even delete it and start again?
    Help!
    Thanks

    Deleting an iCloud account only deletes it from the Device, not from iCloud.  In iOS 8, the name of this setting changed to "Sign Out" as that is a better reflection of what actually happens.  Your iCloud data remains on the server, available to devices still signed into the account, but the device you sign out of the account on is disconnected from the account, and as a result, the iCloud data from that account is removed from the device.  It will redownload to the device should you sign back into the account.
    The only issue you'll run into when you switch between accounts is with my photo stream photos older than 30 days.  When you delete (or sign out of) and account, your photo stream photos are deleted along with the other data from the account in question.  However, unlike other data which remains on the server and can redownload to your device when you sign back in, my photo stream photos only remain in iCloud for 30 days.  When you sign back in, you will only get back my photo stream photos added in the last 30 days (as older photos are no longer in iCloud to redownload).  Like other account data, any my photo stream photos on your other devices signed into the account are unaffected by this.  If you want to keep older my photo stream photos on your device as you change iCloud accounts, save them to your camera roll before deleting (signing out of) the account.

  • My external hard drive is 'seen' by my iMac and I can go into the Finder and open files and folders. I am using the hard drive for Time Machine back up. However Time Machine says it can't find the drive. Same thing has happened with Final Cut Express.

    My new LaCie external hard drive is 'seen' by my iMac and I can go into the Finder and open files and folders. I am using the hard drive for Time Machine back up. However Time Machine says it can't find the drive.
    The same thing happened recently between Final Cut Express and my other LaCie external hard drive used as the Scratch disk. It fixed itself.
    I've run out of ideas. Help would be very much appreciated. Thanks.

    have you done some searches on FCPx and time machine? Is there a known issue with using a TM drive with FCPx? dunno but ...wait...I'll take 60 sec for you cause I'm just that kind of guy....   google...." fcpx time machine problem"  Frist page link 
    http://www.premiumbeat.com/blog/fcpx-bug-best-practices-for-using-external-hard- drives-and-final-cut-pro-x/
           You cannot have time machine backups on your hard drive if you intend to use it in FCPX.
    booya!

  • How to update an existing item in a sharepoint list using the WSS adapter for Biztalk

    Is there a way that a record in SP list be updated using WSS adapter in biztalk ?
    BizTalk 2013 and SP 2013 ..
    Regards
    Ritu Raj
    When you see answers and helpful posts,
    please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

    A ListItem has its own unique row id so in all likelihood, an insert with the same data will result in a new list entry. The Lists Web Service however, has an UpdateListItem method which will take an update request. [refer
    http://msdn.microsoft.com/en-us/library/office/websvclists.lists.updatelistitems(v=office.15).aspx ]
    There is another note in the conference (marked answered) to your List Item Update problem. Probably worth a try too. [refer
    http://social.msdn.microsoft.com/Forums/en-US/bee8f6c6-3259-4764-bafa-6689f5fd6ec9/how-to-update-an-existing-item-in-a-sharepoint-list-using-the-wss-adapter-for-biztalk?forum=biztalkgeneral ]
    Regards.

  • Can Oracle be forced to use the spatial index for sdo_filter in combination with an or clause? Difference between Enterprise and SE?

    We’re seeing the following issue: sql - Can Oracle be forced to use the spatial index for sdo_filter in combination with an or clause? - Stack Overflow (posted by a colleague of mine) and are curious to know if this behaviour is due to a difference between standard and enterprise, or could we doing something else wrong in our DB config.?
    We have also reproduced the issue on the following stacks:
    Oracle SE One 11.2.0.3 (with Spatial enabled)
    Redhat Linux 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
    11.2.0.3.0 Standard Edition and 11.2.0.4.0 Standard Edition (both with Spatial enabled)
    Microsoft Windows Server 2003R2 Standard x64 Edition
    However, the SQL works fine if we try it on Oracle 11.2.0.3.0 *Enterprise* Edition.
    Any help or advice would be much appreciated.
    Kindest Regards,
    Kevin

    In my experience sdo_filter ALWAYS uses the spatial index, so that's not the problem. Since you did not provide the explain plans, we can't say for sure but I think yhu is right: Standard Edition can't use the bitmap operations, and thus it'll take longer to combine the results of the two queries (because the optimizer will surely split this OR up in two parts, then combine them).
    BTW: when asking questions about queries here, it would be nice if you posted the queries here as well, so that we do not have to check another website in order to see what you are doing. Plus it will probably get you more answers, because not everyone can be bothered to click on that link. It would also have been nice if you had posted your own answer on the other post here as well, because my recommendation would have been to use union all - but since you already found that out for yourself my recommendation would have been a little late.

  • I have the G Drive 1 TB (GEN4 1TB) external drive purchased in 2010. I need to connect to my new MacBook Pro. I'm using the external drive for media storage of my video editing projects. Will a 800fw to thunderbolt adapter cable work?

    I have the G Drive 1 TB (GEN4 1TB) external drive purchased in 2010. I need to connect to my new MacBook Pro. I'm using the external drive for media storage of my video editing projects. Will a 800fw to thunderbolt adapter cable work? I understand that using a USB port connection is not fast enough for video editing. I read somewhere the G Drives don't connect well to MacBook Pro.
    thanks
    larry

    I doubt this can be relocated or moved so you might want to just repost in the macbook pro area.
      MacBook Pro
    https://discussions.apple.com/community/notebooks/macbook_pro
    https://discussions.apple.com/community/mac_os?view=discussions
    Can you afford a new Thunderbolt case and cable? any case with FW800 is going to be slow 72MB/sec and less, and any new 1TB drive is capable of 75MB/s minimum up to 125MB/sec.
    Thunderbolt storage can of course when setup properly reach 100's of MB higher using multiple drives.
    Use what you have for a system backup or for secondary backup storage.
    you might be able to take the drive - most cases allow you to open and swap drives - and use this:
    G-Technology 1TB G-DRIVE mini High-Speed Portable Hard Drive                                   
    or this:
    http://store.apple.com/us/product/HB137VC/A/g-technology-4tb-g-raid-professional -high-performance-dual-drive-hard-drive?fnode=5f

Maybe you are looking for