10-28-2009 11:18 AM
Mathan wrote:
Ray.R wrote:By the way, how do you add LV2009 code snippet into your post? I might have 1 day left on my evaluation LV2009.
Hope you know how to make a snippet image. (Select the portion of Block Diagram you want to take a snippet and select "Create VI Snippet from selection" from the Edit menu. Save it as a png file. Now in the composer tool bar, select Upload or insert an image. That's it. Give the path from your computer and you are done.
Mathan, Broken Arrow, and others,
See this thread: WARNING: Don't clean out your image gallery! When uploading images or snippets, don't use the image gallery method of uploading the images. It will just lead to problems later. It is best to attach the actual image file to the message, then go back and edit the message like the old way of embedding images in the body of the message.
10-28-2009 11:36 AM
Ravens,
Can you explain.. "then go back and edit the message like the old way of embedding images in the body of the message."
thanks
10-28-2009 11:37 AM
Ravens Fan wrote:
It will just lead to problems later. It is best to attach the actual image file to the message, then go back and edit the message like the old way of embedding images in the body of the message.
Hope Lithium will do something to remove this pain. Laura listening?
10-28-2009 11:39 AM
Broken Arrow wrote:Can you explain.. "then go back and edit the message like the old way of embedding images in the body of the message."
Use the Add Attachments to post an image or a snippet and post the message. Then edit the message again and now use upload or insert an image to show the picture inside the post.
Cleared?
Mathan
10-28-2009 12:05 PM
Mathan wrote:
Broken Arrow wrote:Can you explain.. "then go back and edit the message like the old way of embedding images in the body of the message."
Use the Add Attachments to post an image or a snippet and post the message. Then edit the message again and now use upload or insert an image to show the picture inside the post.
Cleared?
Mathan
Yes, clear, now I understand, but I've only been registered since 2002.
10-28-2009 12:07 PM
Mathan wrote:Hope you know how to make a snippet image. (Select the portion of Block Diagram you want to take a snippet and select "Create VI Snippet from selection" from the Edit menu. Save it as a png file. Now in the composer tool bar, select Upload or insert an image. That's it. Give the path from your computer and you are done.
Thanks Mathan,
I knew it had to be something simple. 😉
10-28-2009 12:17 PM
Ben wrote:It looks like we could have just used the "rated HP" instead of the local read, yes. But, if this event was created by duplicating another event frame, then the use of locals is valid for a lazy developer (like me). When duplicating an event (or case) with controls, new control will be placed on the FP. If you do the same with an event with locals, you will get duplicates of the locals.
Wait...
I don't fully understand your logic for supporting the use of Locals in this instance (or the particular one shown in the diagram).
You've got the control "Rated HP", along with a Local read of "Rated HP", a sub-vi that uses it and then the sub-vi writes to a Local of "Rated HP". I can understand that it is not a race condition because the actual control just sits there looking pretty. Why would someone do it that way? Does the sub-vi change the value of "Rated HP"? If so, then reading the value could have been done from the control itself. Now, did the programmer actually want to make this a control or an indicator? Is it a poor design issue? We may never know..
Don't get me wrong Ben, I would not go as far as condemn Locals as one of the 7 deadly sins. Their abuse maybe.. 😉 To use them when you know of their limitations is fine. Remember the reason for this thread is because they nearly always end up being abused (poor abused Local Variable... 😞 ).
😉
11-02-2009 02:14 PM - edited 11-02-2009 02:15 PM
11-02-2009 03:49 PM
11-03-2009 07:11 AM
Thanks for(imstuck),
Glad you provided the example. I just finished reading a thread that ranted against threads like this one. The chap forgets that there are always 2 sides to a coin. The purpose of this thread and the Rube Goldberg is indeed to educate. Not to make fun. There are many people who are adament about wanting to use Locals at all costs and claimwed that it is a better way of programming. That's what brought up this thread.
So I'm glad that you are sharing your own experience, that way people learn that even the finest of programmers can get caught by using Locals. Do note that I did not use the term "abuse", because in your example, there was no abuse of it. I too post code examples and ask on how to improve it. It's good for everyone. 🙂