Jump to content

Ascen

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Ascen's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. QUOTE(tcplomp @ Dec 12 2007, 01:27 PM) One event structure / tab page would be an option, but that would lead to having to manage several event loops in case of a change. A bigger issue is that I havent figured out how to group these objects logically - I may have 20 objects named "Input1" in the event selection list, since the control names are cut off at some length (or at some special characters? I use TABNAME:CONTROLNAME naming convention) I am building a training simulator for a panel-controlled logic controller, and I have N pages because that is what the controller has. And yes, they need to be accessible at least somewhat instantly - separate popup windows from subVIs are not an option. There are some pages that are there just for navigating the GUI (maybe 1-3), but most pages display data.
  2. I am building an application that needs to use a extensive GUI having ~15 tabs and altogether around 40-60 front page controls spread across those tabs. Now, LV GUI is pretty handy for maybe up to 10 controls and couple of tabs, but after that it gets awfully messy, and putting all the event handling to single event handler loop results in >30 cases. I can't help but wonder if there is some way of organizing these elements so that they don't end up being such a clutter that they are at the moment.
  3. QUOTE(Justin Goeres @ Nov 29 2007, 06:14 PM) Heh, thanks a ton for your help, it's working just like it should right now. Was about to mention that it needed %.; instead of %,; but you beat me to it.
  4. Hello.. I'm trying to read MATLAB-saved tab-separated ASCII files into 2-d double arrays, and while in theory the use of Read From Spreadsheet File seems straightforward, it for some reason only uses the first significant digit of each number. I've tried playing around with the formattings (%f instead of default %.3f, %d, %.20f, everything..). What is the very basic thing I am missing here: The input data looks like 0.0000000000000000e+000 2.8400000000000000e+002 1.6530000000000000e+003 5.1299999999999997e+001 etc (http://www.hut.fi/~jdahlbom/extinput.txt to get the complete rows.) What makes this even more annoying is that I've followed the instructions given at this NI site and still can't get it to work. (The command issued in MATLAB having been 'save extinput.txt datax -ascii -double -tabs') Thanks for the help in advance!
  5. First of all, thanks for taking the time to have a look at the code. I was getting desperate already. QUOTE(Norm Kirchner @ Nov 2 2007, 12:17 AM) The odd data structure and by-reference usage stems from several user requirements that all need to be met: * The system as a whole is to be a software based simulation platform, that in time might be extended to also interface with DAQ equipment and controllers. * The system needs to be extendable controller- and process-wise, the same simulator engine should be possible to use without changes when different controller schemes are implemented. Now, for the current design choices made: 1. By-reference: I use by-reference because I need to have at least three separate parts that each have different timing and all use parts of the same data: a: Process simulation, which runs at around 50/s frequency at its fastest, and 1/s at slowest. b: Process measurement display, needs only to update around 4/s frequency c: Event (Button pressed) handling part that only proceeds on events fired by GUI buttons that either update the process parameters or are used for navigating the multiple-screens-done-with-tabs GUI. By-value implementation would lead to separate copies of the data, which would not fulfill the purpose of being able to access the same data across the functional parts of the program. Is there a proven solution for using by-value on a branching program? 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. QUOTE(Justin Goeres @ Nov 2 2007, 01:35 AM) 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. ... (about strict type references breaking the class type, etc) ... My advice? Refactor your code so it's more, um, kosher . 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. Still, looking at my reasons above, could you give a hint on what would be a more 'kosher' way of implementing it? EDIT: Made my text a bit more readable.
  6. QUOTE(Ascen @ Oct 31 2007, 05:37 PM) As I still haven't been able to figure the issue out, I created a reduced model of the data structure that still creates the same error. That model is Main_test2.vi within that zip-file above. There definitely is something fishy about passing that reference handling with classes as datatype in that array. I also tested the similar structure without the classes, and that worked perfectly. With probes in place you can see that the initializer sets the cluster values correctly, but somewhere along the wire the reference or the value is somehow messed up. Is there some known issues with the classes by-ref that are documented somewhere? What could possibly cause this error?
  7. I am developing a application that needs both an extendable computation engine and a GUI that needs to both receive from and update values to the computation engine. For the extendability, I use classes with inheritance, and for the engine-GUI splitting I use a forked reference to the data cluster. However, when using Property Node : Value (or Value(Signaling)), I get the Error 53. I find it confusing, as it referes to Networking Error codes, which I did not expect to occur with just cluster references. To make matters worse, the location in the code generating this error seems to vary. Here is the code: ClassExperiment.zip My own guesses would have to do with badly done initialization or problem with threading, as several different loops write to same reference. What usually generates such an error, and how would one go about to avoid them? Is there a good documentation on usual causes and solutions to most usual errors?
  8. Thank you for that. Embarrassing to get to stuck to such a trivial issue.
  9. Even after hours of prowling the forums, etc, I have been unable to find out how to set a cluster reference to Include data type. I need to use strictly typed cluster reference as a input to a subvi - I have managed to get it do just that by creating the subvi with local variables and then going through "Edit>>Create SubVI". However, I would like to know how to create proper references directly, without going through those steps. This here (Lavag - Control References) simply states "by right clicking on the refnum (or its terminal in the block diagram) and selecting "Include Data Type" in order to set a control reference data type. However, when right-clicking the control refnum, the Include Data Type is greyed. I'm using version 8.2.1
  10. Hello.. I'm a bit lost with several issues about LVOOP, which in general would seem like a fantastic way of doing things. First of all I should note that I come from Java/C background, so my thinking is heavily influenced by that. First of all, using classes by-reference. I came across this NI GOOP tutorial which passes the reference to the class along in order to run the internal system, and to be able to operate on the GUI separately. Deducing from other posts here it uses some toolkit that creates those New etc methods. Since I'm a beginner with LVOOP classes, but not a beginner programmer, I would rather create my classes manually to understand the workings properly. Now, my question is: how to set a class reference as a VI output? And how to get the reference to a certain instance of a class, in the first place? Secondly, there was some notion that building classes into a single executable is a problem if there are subclasses using VIs with same file names. Is this really a show-stopper in 8.2.1, or is there a reliable workaround for it? Executables are definitely needed, although the users can be trusted to the degree that having separately dangling files is not a problem as long as they can be included with the executable. Are there some other snags in using GOOP classes, and what would they be?
  11. QUOTE(lraynal @ Oct 12 2007, 10:51 AM) Thanks a lot! I figured it might have something to do with breakpoints, but tried approaching it from the "Find Breakpoint" tool, which I obviously couldn't figure out how to use.
  12. This is probably something trivial for anyone having used Labview more, but I have run out of ideas: At some point during testing a subvi of a larger system, I somehow switched the subVI to some sort of a permanent debug mode, noticeable by the red border around the block diagram window (http://users.tkk.fi/~jdahlbom/lv_redborder.jpg). This results in execution getting paused every time the execution enters the subVI block. No, "suspend when called" is not checked. Neither is any of the other similar things. While unchecking "VI properties" -> "Execution" -> "Allow debugging" resolves the issue, it disables the possibility of using probes to follow up on the process. What is this mode, and how do I disable it?
×
×
  • Create New...

Important Information

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