-
Posts
691 -
Joined
-
Last visited
-
Days Won
11
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by Justin Goeres
-
QUOTE(Yen @ Nov 10 2007, 09:40 AM) That behavior has always confused me a bit, because it doesn't seem entirely consistent. Sometimes (usually) when I post two consecutive replies in a thread they merge, but sometimes they don't. My guess has been that it's a threading issue (i.e. it depends on which post(s) I'm replying to when I make the 2nd post), but the totally informal tests I've done haven't shown me any patterns.
-
Event Structure as State Machine
Justin Goeres replied to EJW's topic in Application Design & Architecture
QUOTE(JDave @ Nov 9 2007, 11:59 AM) Actually, I was referring to both/either. I didn't exactly make that clear. QUOTE And when you write "Event Structure in a state machine" I think of the architecture where the Event Structure is located in one of the cases of a State Machine. So after a sequence of states completes, the state machine returns to the IDLE state to handle any new events. I think EJW is talking about an Event Structure in a While loop--nothing else there. But maybe that is what you meant... It's in the ballpark of what I meant . I see an Event Structure by itself in a While loop as a special case (no pun intended) of the "Case Structure with an Event Structure in one of its frames" layout. I've never actually designed or built anything with the structure EJW is talking about, but I see no reason why it wouldn't be worth looking into. I think that we mostly think of the queue-driven producer-consumer design because that's what NI kind of pushes at us in the standard templates, but there are lots of ways to do these things. -
Event Structure as State Machine
Justin Goeres replied to EJW's topic in Application Design & Architecture
QUOTE(EJW @ Nov 9 2007, 09:22 AM) I have recently been to the mountaintop and have begun to discover what dynamic events can do (after having mangled the queue-driven state machine into almost every possible contortion). Upon my return, I now fear that I may have found my next hammer-which-makes-everything-within-arm's-reach-look-like-a-nail . I am currently hitting everything with it. So yes, I think using the Event Structure in a state machine is absolutely a workable pattern. As with anything, there are right and horribly wrong ways to do it, but overall it's a great option. -
ThinkofhowmuchbandwidthwearesavingMichaelbytalkingthisway!
-
QUOTE(crelf @ Nov 7 2007, 06:04 PM) I would be interested in getting a cantankerous Aussie's take on this scandal: (via http://en.wikipedia.org/wiki/Victoria_Bitter' target="_blank">Wikipedia) QUOTE(Wikipedia) In 2007, The Foster's Group who make Victoria Bitter are planning to change the strength of the beer from 4.9% ABV to 4.8% ABV to cut the amount of excise Foster's pays on the beer it brews.
-
Include other folders than the support folder
Justin Goeres replied to Mads's topic in Development Environment (IDE)
QUOTE(Mads @ Nov 8 2007, 03:32 AM) If I understand you correctly, this is all available in the App Builder. Go to the Destinations pane. You will see (by default) two options: <YourApplication>.exe and Support Directory. Click the '+' button to add a new destination directory. Set up its label, path, etc. on the right side of the pane. Now go to the Source File Settings pane, find one of your manually included files in the Project Files tree, and select it. In the Destination pulldown on the right side, the new destination(s) you previously created will be available for you to select. Note that you can also set the destination for all the included items in a particular source folder, as well. -
I'm really of two minds about this. The core of your question, I think, comes from the experience we've all had of creating a control on subVI A that we're just going to wire to a terminal on the parent VI B. If A is required, and you want B to be required, it takes what, like like four extra operations to set that behavior??? That's pretty poor usability for an operation some of us have probably done hundreds of thousands of times. But making required inputs on a subVI automatically drop as required inputs on a parent VI really just trades one side of the problem for the other side. I can't say for sure how often I want those parent inputs to be Required. I'd guess it's more than 50% of the time, but I dunno if it's as high as 75%. The other 25-50% of the time, I probably want them not to be Required. So I would probably lean toward saying in your scenario they should be "Required," but I certainly can see other people coming down on the other side of the fence. Wouldn't it be nice is the whole "connecting terminals to the connector pane and setting their attributes" process was easier in the first place, given that it's kind of a core concept of the language?
-
QUOTE(Rimmergogo @ Nov 7 2007, 07:52 AM) I'm not totally sure I understand exactly what you're doing, so forgive me if I'm way off-base. If you were using LV8.2 or greater, I would suggest my LVOOP Imagemagick library . But even though you're on LV7, you can still use ImageMagick directly to do what you want. Check out the convert utility, especially the density and/or resample operators. What you can do is build your command-line string in LabVIEW, execute it with the System Exec.vi function, and then load the resulting output file as a PNG/TIFF/whatever. ImageMagick usually involves a bit of trial and error, but it's a terrifically powerful toolkit. Finally, if you're messing around trying to see if your operations are taking effect, you might find the identify utility will save you from having to actually open & display your output files.
-
YDKJ Online, a new game every week. This week is Episode 36. I finished with $12,466, which isn't my best work . EDIT: Some content may be inappropriate for younger viewers . EDIT 2: They also have an RSS feed to let you know when a new week's game comes out!
-
LAVA forums wish list policy
Justin Goeres replied to Jim Kring's topic in LabVIEW Feature Suggestions
This link to the Product Suggestion Center works for me, although the only real difference is that the fancy redirect junk on the front of it is missing. NI must've shuffled some stuff around. -
QUOTE(crelf @ Nov 5 2007, 03:23 PM) And you'll get nothing less! And you will like it.
-
I've always liked the Paste Special... function in Excel that lets you choose what you want to paste. For LabVIEW, I can immediately think of a few things a dialog like that could handle for control/indicator pasting: Value Display Format Colors Control Size and more. Of course, I'm sure this would probably be wickedly complicated on the back end, to handle all the different datatypes in anything approaching a sane way. But I can dream...
-
QUOTE(brianafischer @ Nov 5 2007, 05:01 PM) I don't know of any specific libraries, but since I can't keep my hands off a good regex problem... Download File:post-2992-1194319732.zip
-
QUOTE(Zeclark @ Nov 5 2007, 12:32 PM) No problem. Just to be completely pedantic about it, here's a screenshot that demonstrates what I suspected: http://lavag.org/old_files/monthly_11_2007/post-2992-1194295069.png' target="_blank">
-
My wife is a Hokie, so I'm always proud of the program they've built there.
-
QUOTE(Zeclark @ Nov 4 2007, 01:31 PM) The reason that you can paste the URL into the file browser when you leave the path input unwired is because Windows understands what a URL means in the file browser. In fact, I would bet that what's actually happening is that Windows (probably through IE?) is downloading the image from the URL to a temp file, then returning the path to that temp file to the Read JPEG File.vi VI. You just never see any of this happening because it's buried inside the VI and hidden by Windows. But that's different from passing a URL into a subVI via a path control. So Ton is right about the '\' character being added, but it actually doesn't matter because Read JPEG File.vi doesn't take a URL at its path input to begin with. The bottom line is that I don't think you can use Read JPEG File.vi to do what you want to do, unless you download the source image to your computer first and load it from there. But it sounds like that poses a speed problem for you . Maybe you could streamline the process by implementing the communications manually, i.e. manage a single TCP/IP connection in your program, do the transactions in raw form (so the data comes straight to your app rather than to the disk), and then convert the raw data you receive to something suitable for your picture control. But that's a fair bit of trouble to go through. You might also be able to display the picture in some sort of special ActiveX control, but I'm the wrong person to ask about that .
-
African money transfer scam spam as LAVA personal message
Justin Goeres replied to hviewlabs's topic in LAVA Lounge
Settle down, everyone. I already talked to Mr. Sango and told him I can definitely help him out. Sorry to lock you all out of such a once-in-a-lifetime opportunity like this, but unfortunately there's only room for one person to make off with all this loot. But don't worry, I won't forget all my favorite LAVA members, and I'll probably keep my Premium Membership up, at least for another year or two until the construction of my own personal castle in Dubai is complete. -
Actually, that's a decent design problem. Kudos to your teacher for giving you a relatively practical assignment. As tcplomp pointed out, we're not going to do your homework for you. However, if you have specific questions about code you've written (why it's slow, what an error message means, etc.) you'll find people here who are happy to help. And when you have a question, posting sample code along with it so we can see what you're doing is invaluable. Welcome to the board, and good luck with your assignment.
-
Convert binary values to color indicator
Justin Goeres replied to sukhoon's topic in LabVIEW General
QUOTE(Norm Kirchner @ Nov 2 2007, 07:04 PM) As crass as this sounds, I would be more inclined to answer homework questions if the people asking them would buy Premium Memberships first . -
QUOTE(Norm Kirchner @ Nov 2 2007, 08:08 AM) I was actually discussing almost exactly that with someone the other day. With all the homework questions around here lately, it's actually starting to make me paranoid about answering simple newbie questions from non-homework-hustlers. While I can't be anyone's private tutor (unless I'm on the clock ), people who are real, interested novices should definitely feel comfortable asking what are, to some people, stupid questions . For that matter, there's plenty that I don't know, and that I would have to start out by asking some pretty inane questions about. I wouldn't want to look like a hypocrite by coming down hard on a n00b, then turning around and asking a question that looks equally stupid to someone else. However (like in the above case, for instance), when someone comes here asking for fundamental definitions of basic instrumentation concepts, they have to be satisfied with a simple link back to another reference site.
-
:!: WARNING: ZOMBIE TOPIC!!! :!:
-
QUOTE(Popatlal @ Nov 1 2007, 08:11 PM) 1. Dictionary.com 2. It depends completely on the characteristics of your ADC. Wikipedia might shed some light on the subject, but I didn't read the article. 3. See #2. 4. Wikipedia. 5. Resolution means slightly different things in different contexts. Since you're talking about ADCs, I'm guessing that for you resolution means the smallest analog voltage signal change that causes a change in the digital output of the ADC. For instance if you've got a 10-bit ADC working in a 0-5V range, the resolution of your ADC will be something like 5 V / 210 = 0.00488 V = 4.88 mV. The Wikipedia article in #2 covers this, as well. 6. I'm confused a bit by this one. For sampling rate, see #4. Number of samples is just the number of samples acquired during a data acquistion. Generally speaking, Number Of Samples = sampling rate x amount of time you spent acquiring data.
-
QUOTE(Ascen @ Nov 2 2007, 04:08 AM) What you're building is a fairly complicated system. I think you're on the right track with a by-reference implementation rather than by-value, but the problem is that you're trying to get the best of by-value objects, but trying to access them by-reference (more specifically, you're trying to access them using a reference to a front panel control that happens to contain them as data.) I suspect that what you may need is actual by-reference objects, which are not the same as making a cluster of some data and just getting a reference to it (as you've found ). There are several different ways to do by-reference objects in LabVIEW. At the risk of seeming unhelpful, though, I'm going to pass those recommendations off for other people to handle. Through some quirks of nature I've fallen a ways behind on by-reference objects since LV82 -- I play more in by-value objects lately so I'm not up-to-date on all the strengths & weaknesses of the various options. QUOTE Is there a proven solution for using by-value on a branching program? I don't mean to be snarky, but yes, it's possible to do very complex things with by-value objects. You do have to design the system, however, around the limitations imposed by their by-value nature. Some of the stuff that's easy with by-reference access to an object is either hard or impossible with by-value out of the box. But I find that by-value objects force me to really enforce better encapsulation and looser coupling on my data (which is, of course, the point of objects in general). Notwithstanding what I just said, though, your situation sounds like a pretty good case for actual by-reference objects. QUOTE 2. The cluster-array-cluster-array-class -structure This stems from both my ignorance and from the requirements that this system reproduce some of the behaviour the older system had. Let us call them (1.cluster-2.array-3.cluster-4.array) a. Use of classes for controllers. As extendability is required, classes provide a perfect container that each contain their own internal data. Classes also can be cast as Parent Controller Class that defines interface methods for each Child Controller Class to implement. With these overriding methods it is possible to simply go through a array of controllers and have each execute the appropriate method. b. What I am trying to accomplish with the 1.c-2.a-3.c-4.a-class -structure is: 1. cluster is just a container for all the operating data needed in the whole system. 2. array is a array of "controller slots" - in a real system these controller slots would each correspond to one 5mA-20mA output channel. In software implementation this will be imitated by having each correspond with a given index of an array of output values. 3. cluster is there to contain information about this "controller slot". As of now, it contains an controller object array and a numerical field that indicates the index of the array that contains the selected controller object for this "slot". 4. array of possible options (controller objects) for this (2. array) "controller slot". The reason why there are initialized controller objects in the array (thus leading to N * M initialized controller objects of which only N will be used), is that the previous system would save the controller configuration info even if another type of controller was selected for the slot. And also because I could not think of a better way to do this. That's ambitious (and I mean that in a good way!). I'm afraid your problem is much larger than what you're going to find a pat answer for on a forum like this, but let's see what we can all come up with to kick you in the right direction (so you can at least stop getting stupefying error messages if nothing else ). I'm reminded of something that a LabVIEW R&D person said to me once (it might've been AQ, but I forget): "If it's in a cluster, you should put it in a class." If you're interested in using the features of LVOOP, I'd put everything in your list above into a tree of classes. That means starting with AppData.lvclass and working down from there (although in practice, I'd start at the bottom of your array-cluster thing and work outward). At each level, think about exactly what each class represents in your physical system, and try to avoid putting apples & oranges in the same class. And remember, it's OK for classes to contain other classes instead of inheriting to them. Membership and inheritance are complementary, but not identical, things. Now, the problem is that once you've done that you've created a big ol' by-value representation of your system, which doesn't match up with your by-reference access goals. Yeah, that sucks . However, this gives you an object framework to work with. What you need is something to manage those objects. What I might do in a situation like this is create a sort of traffic-cop loop that keeps the AppData in a shift register. It's responsible for doling out individual components of the AppData to other loops that manage those objects. When one of those slave loops needs to update the value of an object, I would provide a messaging framework for it to do so by communicating back to the traffic cop (via queue/notifier/whatever). This is actually not as hard as it sounds, although by-reference may still be the answer for you. Another semi-random point: Instead of keeping an array of all the Controllers and indexing them with SelectedController, why not have one element called ActiveController and an array called InactiveControllers? That gives you the ability to index them in and out of "Active" status by their InstanceName, without the hassle of having to index/replace in the array every time you want to access the active controller. Sorry this is all kind of scattershot. You've got a fairly wide-ranging design goal, so there are lots of ways to skin it . QUOTE Thanks for the opinion about the Error 53 being a red herring, I've been dumbfounded trying to figure it out. And please don't get me wrong for snipping your code out from there - I'll have to try out your tricks on my code before I can comment more on this. No problem. I'd still love to hear exactly where that error is coming from, but I think only NI could tell us. Which reminds me, you could call them and ask them .