Jump to content

Justin Goeres

Members
  • Posts

    691
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Justin Goeres

  1. Well, Norm's comments motivated me to take a look, I'll tell you that . I certainly can't tell you what Error 53 means in that context. The fact that it resolves to a networking error code looks like a red herring to me. Norm is right, you're doing some pretty funky stuff combining references and objects like that. My initial wild-###### guess would be that the problem might stem from the fact that you have your objects buried way down inside a pile of array/cluster relationships that you're accessing via a strict reference. Maybe when the cluster reference is being created (in your sub_InitCtrlArray_test1.vi), the strict reference is incorporating type information about the .lvclass buried down inside of it, in a way that breaks when you get the Value property of that reference later and the type of the .lvclass objects has changed in the meantime? Hey, check this out... If you change the cluster reference to a non-strict one (i.e. set the Application Data Output indicator in sub_InitCtrlArray_test1.vi to NOT Include Data Type) the error no longer occurs! That gives me more confidence that it's a strict/non-strict reference typing problem. It's still a bit odd, though, that the Variant value of the cluster doesn't seem to include anything about the Controller Selection Array. Or maybe I'm missing something. I'm certainly blowing through this quickly. My advice? Refactor your code so it's more, um, kosher . EDIT: Nevermind, the Variant actually does at least have the size of the array, so there's something in there. I just misread the indicator. My other points still stand, though
  2. QUOTE(eaolson @ Oct 31 2007, 03:30 PM) Exactly .
  3. QUOTE(neB @ Oct 31 2007, 01:09 PM) As long as we're brainstorming... I propose Scripting Fight. A reference to a blank VI is passed to two different VIs running in parallel. These two VIs (each written by a different individual) should compete to accomplish some block diagram goal while preventing the other VI from accomplishing the same goal. The "winner" is the VI that, after a certain time period or number of nodes, is closer to the goal by some metric (functionality, aesthetics, etc.).
  4. Didn't we just cover this in another thread a few days ago? EDIT: Oh, look! We did! And the original topic starter was sahara that time, too. The problem wasn't exactly the same, but it was close enough that I'd think anybody who solved that problem (or used the pointers we provided) would be able to solve this one.
  5. Norm, you should get yourself a sponsor. You could be The Original Norm Brought to you by Frito-Lay. Or Bank of America Presents The Original Norm.
  6. QUOTE(Aristos Queue @ Oct 29 2007, 06:25 PM) I looked inside semaphor.llb and found sort of what you're talking about, but not exactly. It looks to me like the file is Semaphore Refnum, not semaphor. EDIT: The situation is the same in rendezvs.llb: The file is Rendezvous Refnum, not rendezvs. This interests me because I've seen a dependency called systemexec in some of my projects that I can't trace to anywhere: Is it another instance of the same thing?
  7. QUOTE(Norm @ Oct 29 2007, 08:05 AM) Take a look at Join Numbers. It will turn your 2 U8s into a single U16. You'll find it in Numeric >> Data Manipulation. Actually, another option might be to just Type Cast your "array of two U8s" to a single U16. I forget whether that works or not (and using Join Number is probably more readable), but it feels familiar. It's in Numeric >> Data Manipulation, too. This is all stuff I usually just end up working out on the fly for any given situation. Once you start to get comfortable in the Data Manipulation palette the sky is kinda the limit :ninja: .
  8. QUOTE(Norm @ Oct 28 2007, 10:47 PM) I see what you mean. I'd never noticed that behavior. Just to clarify what Norm is saying, here's a snippet that illustrates it. Basically, the Scan From String function skips over carriage returns (0x0A): That feels like a bug to me. Why would a function that scans data out of an input string respect newlines? Doesn't that make it impossible to use with a multi-line input string (if you care about the newlines)? Does anybody else have a grip on that rationale that I'm just missing? EDIT: There's also no mention of this behavior in the LabVIEW Help. The closest it gets is "A space in format string matches any amount of white space, such as spaces, tabs, linefeeds, and form feeds," but the format string in my example doesn't have any spaces in it. QUOTE(Norm @ Oct 28 2007, 06:37 PM) When trying to parse the string (17 bytes) all approaches I try ignore byte 5. The maddening fact is that is the month. The recieved string is 4040 4762 0A1D 07D7 0103 0000 F30D 0A. FYI: the first four bytes are the message header and the last two are the termination bytes. In order the bytes of interest are (byte 5 through byte 12) Month, Day, Year(double byte here), hour, minute, second. I understand that 0A is the ascii carridge return. How do I parse this correctly using LV 8.0? And to move on to your actual problem... Since you're dealing with a binary protocol, I would convert the incoming string to an array of bytes before doing the parsing. That will give you the actual numeric value of each byte as an array of integers. Just use the http://zone.ni.com/reference/en-XX/help/371361D-01/glang/string_to_byte_array/' target="_blank">String to Byte Array function. It's in your palettes, under String >> String/Array/Path Conversion. Once you've got your incoming data as an array of integers, you can use a For Loop, Array functions, and whatever Numeric functions you need to get you home.
  9. QUOTE(Norm Kirchner @ Oct 26 2007, 09:19 AM) I'm not pissy, I just suggested that instead of whining in multiple threads about how no one was coming to his rescue, he should flesh out his questions more. As a side note, we've PM'd about it now and it's all cool :thumbup: .
  10. QUOTE(Yen @ Oct 26 2007, 04:34 AM) I was thinking exactly the same thing . I know I had detachable event data terminals working at one point (either 8.0 or 7.1.1), and I could've sworn it was with an INI key. I remember using it, disliking it, and turning it back off. Apparently in the process I also purged my brain of how to do it . What I'm really still dying to know is how the Required Outputs happened. Michael is being awfully coy about that. OK, Mike, how many IOU A BEER AT NIWEEKs is it going to take to get you to reveal your little secret? I'm in for 1. :beer:
  11. QUOTE(stamatios @ Oct 25 2007, 03:51 PM) Fair enough, although I'm sorry you feel that way. Good luck with your project.
  12. Replying to your other post in a completely different thread... QUOTE(stamatios) I am not a vision expert, but I would guess that no one is helping you because your questions are far too broad for anyone to be bothered to deal with. For instance: QUOTE As u will see in the word document that i have in the ZIP file I didn't see that. I saw a .docx file, and when I forced Word to open it, it just displayed a bunch of garbage. Maybe that's my fault (or my version of Word's fault), but I gave up right there. Two of the other files in your ZIP are just pictures of eyes with no annotations or anything. I understand that these are probably your source images, but without being able to view the .docx I don't have time to figure out from scratch what it is you're trying to accomplish. QUOTE Did i use wrong filters Maybe. QUOTE or do i have to change something? If your code is not working correctly, then yes, you probably have to change something. QUOTE If u can plz show me the correct filters Why not just say, "Can someone please do my homework for me?" If you can give a more detailed description of what, exactly, you've tried so far, and maybe some screenshots of the results you've gotten, maybe someone can help you. Until then, I fear you may just find yourself screaming into the void around here.
  13. QUOTE(CamilloN @ Oct 24 2007, 12:34 AM) It sounds like you're looking for some single built-in LabVIEW function that just doesn't exist. You can certainly write code to do what you want, but you'll have to build it from the functions you have available. Yen's suggestion to take a look at In Range & Coerce sounds like a good one to me. Note, also, that as NevilleD pointed out, Threshold 1D Array only works with increasing data. If you've got noise in your signal (which it looks like you do) that might prevent the threshold function from doing anything useful.
  14. QUOTE(silmaril @ Oct 24 2007, 01:49 AM) I agree. My sort of off-the-cuff brainstorming about it imagines that it would take into account the positions of all the nodes inside the structure, and the positions of all the tunnels on the strucure and resize the frame so that none of those move relative to the main root of the diagram. If I'm not mistaken, I think that would (in principle) allow resizing from all 4 corners without disturbing the structure contents. (Actually, not quite -- it would still have to consider the extents of wires going from node to node to truly do a good job.) As JDave & crelf pointed out, though, resizing from anything but the bottom-right might require some gymnastics. Specifically, it would mean moving the objects around on the diagram inside the structure. It's not clear to me (in my head, at least) if that part would be practical.
  15. I like my block diagrams small, but that means that I frequently have to expand a Case Structure or For Loop or Event Structure or whatever to add new functionality to it. I usually do this by making the structure bigger than it needs to be, and then re-sizing it back down when I clean the code up. I wish there was an easier way to shrink the structures. For instance, if I could right-click on the structure and select Shrink to Contents from the context menu, that would be a time-saver. I don't need the structure to auto-shrink by itself -- I'd be happy if it was just something I could fire off as needed. Of course, there should be a buffer of a few pixels (configurable with an INI key? ) around the contents for aesthetics. As a side note, could this be accomplished with Scripting? How hard would it be to get the extents of the contents of the selected structure, and resize it accordingly?
  16. QUOTE(Mads @ Oct 22 2007, 07:29 AM) I think what you're really pointing out is that the Call By Reference node doesn't remove the dataflow dependency on the subVI call -- it just allows you to dynamically choose which subVI to call each time it executes. I know that's simplifying it somewhat , but the point is the dataflow difference between Call By Reference and the Run VI invoke node. So in http://forums.lavag.org/index.php?showtopic=9330&view=findpost&p=37362' target="_blank">Vinay's previous post, the Call By Reference node will still block the bottom loop, but not the top one. Of course, as Vinay's example is written, the Call By Reference (with a constant VI path) is basically the same as a subVI call. (He mentions that his actual application is different, so I'm assuming that's an artifact of him just trying to rig up examples for his questions).
  17. QUOTE(rolfk @ Oct 21 2007, 11:18 AM) Quite right. I just meant "canned" as in "found either in LabVIEW as installed, or somewhere free." Just so this reply isn't completely useless, here's a http://sine.ni.com/nips/cds/view/p/lang/en/nid/10418' target="_blank">link to NI's LabVIEW DSC Toolkit.
  18. QUOTE(sahara agrasen @ Oct 19 2007, 09:23 AM) Isn't that a lot like just finding all the prime numbers between 33 and 500? Am I misunderstanding something? I'd do something like this (assuming you can't just start with a pre-cooked list of primes, which would kind of defeat the purpose): Initialize an empty array, which we'll call "Known Primes" For each i from 2 to 500 (because i=0 and i=1 are degenerate) Divide i by each element of "Known Primes" which is less than or equal to sqrt(i). If none of the results are integer values, then i must be prime, so add it to the "Known Primes" list. If any of the results is an integer, then i is not prime, so don't add it to the "Known Primes". I'm not totally sure that will work, but I think it should. I'm not going to test it for you. You're already lucky enough that I like prime numbers.
  19. QUOTE(vinayk @ Oct 19 2007, 06:18 AM) You've got a couple misconceptions that are common among beginners. First, setting the priority of a VI or subVI doesn't work the way you think it does. A VI's priority refers (basically) to its execution priority relative to other VIs/subVIs when those other pieces of code are executing in parallel with it. In general, the execution model of LabVIEW is pretty good at doling out execution time, and I find myself changing a VI's priority only in very specific cases. In your example, there's no need to mess with the priorities of the various subVIs, and you should probably set them all back to Normal. Second, the reason your code seems to "pause" when the dialog opens is because you've got a dataflow dependency between the code that does the "counting" and the code that does the "dialog". The While loop can only iterate when all the code inside it has finished executing. But the dialog subVI doesn't finish executing until you close the dialog. That blocks the While loop from finishing its iteration. What you need to do is restructure the code so that the "count" loop doesn't depend directly on the dialog. Here's a very simple example of one way you could refactor your code: Notice that the two loops (the count loop and the dialog loop) are now completely independent of each other. Information (like "count" and "stop") is passed from the bottom loop to the top loop using Local Variables. This allows the dialog box to be displayed without blocking the execution of the count loop. NOTE 1: There are about 1000 ways to skin this particular cat, and the example above is one of the simplest. The above example may work well in a very small application, but for anything more serious you will find that it may not scale well. There are more advanced techniques that are necessary for bigger applications. EDIT: The other posts above this one touch on some of those techniques... NOTE 2: I suspect this is your first exposure to Local Variables. PLEASE DO NOT FALL IN LOVE WITH LOCAL VARIABLES. They're going to seem like the solution to all your problems, but they're not. The excessive use of Local Variables is considered poor style and their use in large or complicated VIs can make the code buggy, unreliable, and (most importantly) almost impossible to debug. Attached Example: Download File:post-2992-1192804918.vi
  20. QUOTE(Mache @ Oct 18 2007, 07:24 PM) As I was reading that my mind floated back to some of the demos in the LabVIEW Zone at NIWeek. My recollection (and anyone can feel free to correct me on this) from the 2 NIWeeks I've been to is that the applications that are on demo on the LabVIEW Zone are basically confined to two categories: Applications that do really neat things with NI hardware, even if they're not "industrial" applications (like the DDR machine or the Beatbox demo (which I guess wasn't in the LabVIEW Zone, but you know what I mean)), and... Little games and toys put together (from the rumors I've heard) by AEs. (which, if you'll excuse my condescension, are not always that impressive.) What I would love to see in the LabVIEW Zone is, for instance, an image-editing program, or an MP3-playing app with playlist management, written in 100% pure G and running as a compiled, standalone executable (with the source code on the machine, too, so we can see under the hood :ninja: ). Something that would make people who see it say, "There's no way that's done in LabVIEW." I'm not saying that NI needs to build and support an image editing app just to prove a point, but the fact is the most of us have never seen any "mainstream"-style applications written in LabVIEW, even though we're the ones who are already drinking the Kool-Aid. Of course, this is the kind of thing that could come from the community, as well. Is it time for those of us who want to see mainstream applications in LabVIEW to step up to the plate? (with all that spare time we've all got on our hands, of course. )
  21. QUOTE(TG @ Oct 17 2007, 07:36 PM) QUOTE(crelf @ Oct 18 2007, 04:50 AM) IMHO, you should post your thoughts and ideas, rather than just posting that you have them. "This post is not executable. The full development version of LAVA is required to fix the errors. This post is not executable. The full development version of LAVA is required to fix the errors.This post is not executable. The full development version of LAVA is required to fix the errors.This post is not executable. The full development version of LAVA is required to fix the errors.This post is not executable. The full development version of LAVA is required to fix the errors.This post is not executable. The full development version of LAVA is required to fix the errors.This post is not executable. The full development version of LAVA is required to fix the errors.This post is not executable. The full development version of LAVA is required to fix the errors.This post is not executable. The full development version of LAVA is required to fix the errors...." I dunno, that's just what came to my mind . I also agree, though. Dish the dirt!
  22. QUOTE(Dean Mills @ Oct 15 2007, 01:34 PM) "I'll keep it short and sweet. Family, religion, friendship. These are the three demons you must slay if you wish to succeed at LAVA." source I get my daily dose through the RSS reader in Thunderbird. RSS is really the only way to keep up with it all and still have time to do anything else.
  23. QUOTE(NIBC @ Oct 16 2007, 10:50 PM) My initial guess would be that you're just misunderstanding the Advanced Serial Write and Read.vi example slightly. Notice that the example (which you're using as a subVI) has a While loop inside it. When your code runs that VI as a subVI, the execution will get "stuck" in the subVI because that While loop will just keep running over and over. The read string won't get passed out until that While loop stops. (You can check this by running your code, then opening the subVI's front panel and clicking the Stop button in the lower left.) If you're looking for example code to edit for use in an application, I would advise you to take a look at the Basic Serial Write and Read.vi, as well. It executes once and exits, which is more likely to suit your purposes for a subVI.
  24. QUOTE(crelf @ Oct 17 2007, 05:26 AM) Wikipedia only has "G (LabVIEW)" in its http://en.wikipedia.org/wiki/Alphabetical_list_of_programming_languages#G' target="_blank">list of programming languages. Are they missing something? And as a related question, do you know who has a trademark on "G"?
  25. QUOTE(vinayk @ Oct 17 2007, 05:39 AM) Welcome to the board! What you're talking about is definitely possible. The complexity of what you can do is really limited only by how much time you have/want to put into it . QUOTE when you push a button named 'Setup' on the 'Main Screen', the 'Setup' screen should be opened) If you want a modal screen (i.e. one that, when it appears, prevents you from switching to any other windows until you close it), an easy way to get started is to use the Dialog template (File >> New... >> Dialog Using Events). You can use the resulting VI as a subVI in your code, and when it executes it will display its front panel to the user. Note that you can also make any VI behave this way by setting its Window Properties (File >> VI Properties... >> Window Appearance >> "Dialog" or "Customize"). QUOTE security levels (for eg: an operator should not have access to changing some values while the maintenance personnel should have entire access) This is more of an application design question. Again, it's completely possible to do what you want to do, but in this case there's no "canned" solution. You will need to become familiar with property nodes (see also here), especially the "Disabled" and "Visible" properties.
×
×
  • Create New...

Important Information

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