Jump to content

didierj

Members
  • Posts

    363
  • Joined

  • Last visited

    Never

Posts posted by didierj

  1. Does anyone have a clue how to set up a syntax checker.

    Here is the issue: I have an input form for a user that includes a string control where they can type in a formula.

    There are 6 variables allowed, the parentheses (), and the boolean operators "AND" and "OR".

    I want to somehow be able to check to make sure there are no errors in the formula, for example, a missing parenthesis,

    or a misspelled variable.

    A formula like this : (VARIABLEA AND VARIABLEC OR VARIABLE B would be incorrect because the ")" is missing after

    "VARIABLEC"

    Please HELP!

    As far as I know you'll have to program the stuff yourself. Maybe by googling you might find something that you can modify to your need.

    I suggest to make yourself confident with the string primitives ("Match first string", "scan for tokens" could be good to begin with) and recursion. Recursion is needed to go through the unknown number of paranthesis and find the order to execute the operators (AND has higher priority than OR: "a OR b AND c" == "a OR (b AND c)").

  2. Just stumbled over such an annoying thing :thumbdown: :

    post-253-1150879626.png?width=400

    In the code I use the primitive "in range and coerce" to check if "deviation" (modified meas-value) is in between "lo tol" and "hi tol" (including limits).

    When doing so, LV reports that the value is out of range. But the user, who usually sees 3-4 significant digits (in the fp-indicator) thinks the value is in range.

  3. Some serial instruments have some intelligent handshaking codes to verify when a command has ben executed, others don't. I have found that if you can't determine when the instrument has executed a command, insert a short delay between writing and reading to/from the COM port. It's not elegant but it works 90% of the time.

    Agree.

    I haven't seen the code (since I don't owe LV8, only LV7.1), but a frequent problem when performing serial/GPIB/... communication is speed or better slowness of the port. Make sure you have either (like Phil described) delays inserted or have set port timeout long enough or (if applicable) have set termination character. There must be demos in the examples (also include the online examples from in the example browser).

  4. How you can see everybody lie to sell their products today; they say you are the best, you are smart .... It's an animal kind of bisiness; the animals are afraid, try to please you...And before you'll die you'll realize everybody lied to you.

    When I want something and the salesman tries to please me in addition, then it's like the whipped cream on the cake.

    And you'll not take the animal products with you, only the knowledge and the experience from I AM CREATING GOD.

    Depends on your believings. Old natural religions placed different things beside the person who died, so he/she could take them in the "new" world. In other religions you'll find these things again, because you rebirth.

    ...but since I haven't read your book (and won't have time to read it the next few years due to my family and pets) I doubt I'll take that with me when I die :D .

  5. Not a bot, just someone who's trying to promote his book in as many avenues as possible.

    But by pretending that 97,7% of humans have a low IQ he is destroying all his promotion efforts (not that I would count myself to these 97,7%, most probably like everyone in this forum :D ).

    PS: This guy reminds me an older women in our country who once fell of a horse and now wears a white curtain, whirls in a bathtub filled with 2 week old water and has already pretended n times the apocalypse (sorry alfa).

  6. To handle events from buttons/values/enums... you only need an event-structure (witout timeout) surounded by a while loop. All the events of a FP will be handled by the same event structure independently of their position in/out of a tab/cluster/...

    Nesting events is possible but error prone, and doing it just because the controls are nested (in a tab) is IMHO really bad wiring.

    Use the timeout case for things that have to be done repeatedly (eg. update a time indicator or pressure/temperature/... indicator), but NOT to poll controls, for that you have the event structure.

    As reference also check the examples.

    EDIT: ...yes, please upload your example

    Didier

  7. ...but the Developer's Guide has got 1141 pages in PDF format and it seems to be quite difficult.

    So, and this the reason of this topic: Why theres is a LabVIEW Report Generation Toolkit for Microsoft Office and not for OpenOffice.org.

    If you align the whole office API tree on msdn I doubt it would be less than the 1141 pages. ;)

  8. You'll need to give us more information that "it wont work" - what about it won't work? can you please post the source code so we can try to reproduce your problem?

    I can second this. And print the error-window you get, it gives quite some info which sub-vi's are missing or what is the source of the problem.

    Also, have you checked if you haven't installed any toolkit on your PC that is missing on the laptop (haven't heard of a "WignerVille Transform" in the standard package)?

  9. Check out the new barbeque I bought - it's only a small one on the Aussie barbie scale, but I'll have to make do with it for now...

    This thing must consume more than an airplane :laugh:

    Having a gas station just across the street (of my workplace) and looking at the gas price, I'm really happy with my good old coal barbeque... although I couldn't use it this year, we had 10

  10. You'll have to make several processes, that run separated from each other. Communicate via queues or notifiers.

    Since your PID-task has to run 150 times a second (and most probably hiccuping won't be allowed due to the control work it does) and actual "office"-OS's are in no way "realtime" capable, I would recommend to perform the DAQ- & PID-tasks on a realtime system, like RIO: Combine the DAQ in/out and PID control into one loop and run this loop in the RT-environment. File-IO and ion calculation can be done by your PC. Communication between the two environment can be done with dual port IO or globals (even that globals are not "realtime" in their core, they are sufficient when you have a loop that runs at 150Hz)

    To combine the two sampling rates between DAQ1 and DAQ2/3 you have different options and will depend on how you build your system. I don't know RIO very well but think that different sampling rates are not a big deal for it.

    It is also doable with a normal DAQ-card, I did it a few years ago with a E-series card (at these times they were known as MIO-E-16) and... wait was it LV5.x ;) .

    Finally if your budget allows it and for simplicity you can put 2 cards in your computer.

  11. I think you are looking for a "chart" instead of a "graph". The chart holds a history of the data. So just feed in the new datapoint and it will be inserted on the right by shifting the rest to left. Set chart history length (rmb) and x-axis scale to your needs. Unfortunately it doesn't exist as xy-graph (x-axis is always time or a monoton growing number).

    oh, almost forgot: you'll have to insert the limits as point each time you insert a data point, or they are also shifted left outside view.

  12. Hi;

    In a nut shell, the answer is yes !

    However, you cannot enable/disable while loops dynamically...

    You can however have them idle till they receive some notifier to execute.

    You'll also need to have a state to stop the loop if you don't

    want to put a time out on the wait for notifier function.

    Without a timeout, this loop will wait forever and won't loop till...

    This type of structure is essentially a state machine.

    So look up labview help on state machines...

    good luck

    Walters

    You can do it without timeout. The "wait on notification" returns if the notification is fired or when destroyed. On last the primitive "wait on notification" returns with an error. Use it for your advantage and surround your work in the loop with an if state. When no error is returned by the notifier, then do the work and loop back, when an error is returned do nothing and stop the loop. Repeat this for every loop. Now have a 17th loop with the event structure that waits for user interaction to either fire a notification or when stop button is pressed. In this state release all notifiers.

    Download File:post-253-1148388229.vi

  13. that's quite logical. humans exist because of sex, labview is made by humans => someone must have had sex, so that labview can exist ;) I interpret the search for sex as the first step for gaining deeper knowledge about IT and LabVIEW in special ;)

    Could you make a similar approach with "beer"? :laugh:

    Another trend I see on the graphics: While LV searches decrease significantly during christmas holiday, sex searches increase significantly... sooooo sad ;)

  14. I'm not aware that there is any setting that could disable it, but you can do it "by hand" and using the event structure:

    post-253-1147355432.png?width=400

    With char you get the ascii representation of the typed key.

    44 = comma

    45 = minus

    46 = point (as decimal, depends on the computer "local settings")

    48-57 = values 0..9

    maybe you need more, eg. for <ENTER>.

    Didier

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.