Jump to content

Phillip Brooks

Members
  • Posts

    899
  • Joined

  • Last visited

  • Days Won

    50

Posts posted by Phillip Brooks

  1. Well, it looks like you're using the VI from here.

    Suggestions:

    Set the timeout (default 10,000 ms) to something longer. If it works sometimes and not others, the call may just be timing out waiting for a slow server.

    The vi provided (and the one from the link above) do not have any connector pane inputs or outputs. How do you pass in the user name and password?

  2. Yin-dee-ton-rab, psiam!

    If you can you show us any code, it might be easier to help. Upload a picture or a sample of the VI you are using.

    Questions:

    How does the operator enter a user name and password?

    Are you using the "Prompt operator for input" Express VI?

    QUOTE(psiam @ Feb 25 2008, 12:06 AM)

    I already used the DataSocket and it work but some times it isn't work becuase it need to re-access (web page need user and pwd) but we already put user and pwd before.

    We following this format..

    http://[user]:[pwd]@192.168.13.236:20080/[wep_page_name]

    Do you have any suggession ?

  3. The problem may not be in your LabVIEW code; it may be related to the remote device not freeing ephemeral ports in a timely fashion. The error code might tell you more.

    Try using a fixed timeout (5 seconds) and check the error returned from the TCP open.

    See these threads from the NI forums...

    http://forums.ni.com/ni/board/message?boar...ssage.id=240177

    http://forums.ni.com/ni/board/message?boar...=215544#M215544

  4. Are you using the continuous run button? If so, the counter is reset to zero each time you press the stop button.

    I've attached a modified version of your vi (LabVIEW 8.0).

    I made the following changes;

    Used a Select operator from the comparison palette instead of a true/false case statement. This makes the code generally easier to read.

    Changed the while loop's conditional terminal to stop on true. (stop sign in lower right corner; right click to change)

    Changed the mechanical action for the Stop button on your front panel to latch on release.

    Changed the value for the Less? comparison operator to 0.5, as you indicated in your original post.

    post-949-1150195711.gif?width=400

    Download File:post-949-1150195544.vi

    :thumbup: Great job! You might want to explore the comparison palette a bit more. Press <CTRL-H> to turn on the context help and you will see some basic info on the different operators.

  5. I don't think it's an omission from a menu; if you search the 7.1 help for error ring, you will see a topic "Error Ring Constant". You can click in the topic and place the error ring on the block diagram.

    The Error Ring Constant does not appear in the search under 8.0 help :thumbdown: Missing from the palette AND the help. Hmmmmm.....

    Update. Googled, and found reference in the 8.0 release notes, page 13:

    In LabVIEW 8.0, the error ring constant is not on the Functions

    palette. Use a 32-bit signed integer constant instead to enter the error

    code that you want.

    Now if I just knew the error that I wanted.... :headbang:

  6. ...any feedback on how they work on other configurations is welcome...

    First of all, welcome! :)

    I'm on LV 8.0.1 with XP and SP2, and your examples are fine. I especially like the Special Folders VI. :thumbup: Keep it coming!

    This is the first place I come to when I'm trying to solve a coding problem. I monitor the forums by subscribing to the RSS feeds using Firefox with Sage. With the loss of some of the Info-LabVIEW archive sites, I hope more Info-LabVIEW folks come to LAVA for things like this.

    When you need a break from wireworking, The Lounge is a fun place to unwind.

  7. TestStand experiences/observations

    Competition with existing products (TestStand)?

    The idea that everything in LV *must* be in G?

    There's a scripting package in the works / Unseen technical impossibilites?

    Now I understand Mike's question better. I thought the goal was to run scripts from within LabVIEW, not to use scripts to execute LabVIEW :)

    I've had the priviledge to work with some guys who taught me much of what I know about LabVIEW. The last project we worked together on involved a lot of "families" of products with similar test requirements. Their decision was to deploy TestStand (then 1.0). The family of products was well suited to this type of test development. My part of the project was to write a LabVIEW ADO wrapper (before the DBC toolkit was available) and to create some TestStand sequences to look up instrument info in a database. The VIs would update TestStand globals that were referenced in other sequences.

    I haven't used TestStand since then, but on a recent visit with these same people, I saw their newest TestStand implementation (using 3.5). I was impressed with the capabilities of TestStand, and what these guys had done with it, but at the same time was suprised at how much of the coding was actually done in TestStand.

    OK, who cares? These are my observations:

    Competition with existing products (TestStand)? TestStand is much more than a scripting language. The price and licensing costs should be proof enough! TestStand is great, but the current version is overkill for what 80% of an average LabVIEW user might want. With such a large investment in TestStand, I wouldn't expect NI to release something that would hurt this product's sales.

    The idea that everything in LV *must* be in G? This was what suprised me with my friends. It appeared LabVIEW was more of a a wrapper for instrument control and a few complex calculations. There was very little G programming from what I saw (I may be wrong). I would rather spend my day writing G code than checking pre-and post condition actions and checking the spelling of sequence and station global references.

    There's a scripting package in the works / Unseen technical impossibilites? I was reading the other day about changes to the type descriptors in LV 8 (now 32 bit). Maybe this change will somehow overcome technical difficulties or make support of a scripting package possible?

    The learning curve for TestStand is STEEP. Just ask someone who has used TestStand about modifying the "Process Model" :thumbdown: If you want to do some general scripting, TestStand is NOT for you. Up until recently, the sequences could not even be protected. Anyone with TestStand could make a change to the sequence. I think 3.5 now includes some form of password protection.

    What might be nice? A version of TestStand that would only sequence LabVIEW functions, and that would be part of the Professional edition of LabVIEW. The run-time for this version should be free. :beer: Maybe this could spur TestStand sales for NI? LV programmers could use this and learn it's potential and then justify the cost of buying the full package.

    What are the options? As Joe pointed out, perhaps NI will enlighten us some day. Otherwise, we'll have to make due with third party tools, ActiveX and .NET interfaces.

  8. You didn't mention which platform you were running on, I'll assume Windows....

    Your scripting needs reminded me of a BLOG post by Brian Tyler. He gave an example of using the LabVIEW .NET interface with something called IronPython.

    This technique might be more open than using the CINs you describe, and would conceivably be more scalable/stable considering the larger user base that .NET type tools target. If nothing else, it might be an interesting read :book:

  9. Should I submit a new revision and password protect the diagram? I'm not a contributor to the NI Exchange forum, but I did a quick search to find the first post. I found stuff back to 1999. Maybe it was imported from some other list or something?

    Anyway, I'll show my grandkids someday and they will say "WOW!", then tell me to stop talking about when people programmed in 2D.

    "Dang whippersnappers! I had to align my own wires and used an actual CRT monitor! None of this holographic nonsense!"

  10. I agree with Michael. The string functions can be your friend.

    There are various reasons to round; the most typical is presentation.

    In presentation, your requirements may change over time. I worked for a fellow that constantly wanted to change reports, often just to answer preferences of a single customer. Why did he do it? because he was the boss and he could. I had steady work, but it was mind numbing sometimes.

    Anyway, you can combine the INI functions and string formatting functions to:

    • Read formatting strings from key-value pairs
    • Use these strings to format your results

    Someone says, "Hey, LabVIEW guru, we need to change the data in your program to report SI units. Also, the quoted uncertainty isn't possible based on the number of digits presented, change it to 6 digits."

    You edit the INI file and change "%.4f" to "%_6p"; browse the LAVA Lounge for an hour :P , goto lunch, then return with a sigh and say, "It's done... :thumbup: "

    (If you compile your applications, this technique would not require rebuilding and reinstalling either!)

  11. Your VI works :)

    I used it with my network's mail server name, then used my local email address in the FROM and TO fields. When I entered my external gmail.com address for the TO field, the server response window indicated "Unable to relay".

    This is a limitation emposed at the server and configured by my company, it has nothing to do with the LabVIEW program.

    Once you know the name of your email server, use a local email address for the from and to fields as I did. Then try targeting an external to address field. The messages shown in the response window should help you debug the problem.

    As far as security, the VI you posted uses simple SMTP transfer, with no support for authentication. You may need to consider other options if your server requires authentication.

    For more info on how SMTP works, try reading this.

  12. I was a little surprised to see Phillip Brooks post the first file and in response no less to a LAVA post.

    When I made the "First Post", I had no ill intent.

    It was pure impulse, which when I reflect on it made me think of my three year old daughter. We've just moved into a new home, and there is a large flower bed in bloom. I was walking behind her to the door when she suddenly stepped into the flowers and started to stomp them. I screamed "WHY?!" and she started to cry. I asked her again after she stopped crying, and she said "I don't know".

    That's how I feel now, "I don't know why..." I've actually lost some sleep thinking about what I did. If you don't believe me, look at my avatar and signature. Here are the conclusions I've come to:

    I belong to various communities in my life. These are all of my own choice. These communities sometimes cross paths. I continuously discover that I share interests and habits that reaffirm my membership in the LAVA community. Thats why I'm a member and contribute. I'm part French, and once mentioned Pineau des Charantes in a LAVA post. These sorts of things appear to be outside the community.ni.com Community Policy.

    I sense that NI sees "beautiful fruit" (vis, solutions) in the LAVA community, and would like to find a way to create this sort of "orchard" for it's whole customer base. The tools that are hinted at (revision control, collaboration, integration with the Find Examples tools) are exciting, but do not a community make. Tell us how we can use this great tool and still keep our independance, and I'm sure we would listen.

    NI is the catheadral and LAVA is the bazaar. I go to cathedral once a week because it is compatible with my way of life (test engineering). I go to the bazaar every day to trade fruits (ideas and code) and occasionally to talk about life. When I'm at catheadral, I reenforce my knowledge and skills. When I'm at bazaar, I don't evangelize; and try to live by my beliefs (universal only, absolutely NO GLOBALS :D . I hope to actually go to The Catheadral in August, if time and money allow).

    Thank you Colin for the opportunity to share the meager fruit of my garden. If I have extra and can help feed the masses, I will give when I can. I hope I can offer the millionth, and I won't expect an iPod. I might suggest that you begin to make references to A community rather than THE community. I will continue to belong to both, but will not confuse the two.

    P.S. My daughter still stomps the flowers :angry: She's young, and will learn. I'm old enough to know to say "I'm sorry, Papa Michael. :wub: " ( I've edited my LAVA post and placed a copy of the file HERE.)

    P.P.S. Would this post be moderated out on an NI forum ;)

×
×
  • Create New...

Important Information

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