Jump to content

ensegre

Members
  • Posts

    565
  • Joined

  • Last visited

  • Days Won

    25

Everything posted by ensegre

  1. I would first of all look at which hardware are you going to use. A stepper motor? They usually come with controllers, and you talk to them for instance with simple VISA commands. A DC motor with a set of range microswitches to understand the floor at which the elevator is, whether to open doors, etc? Then you'd need a current driver for the motor and some digital ins for the switches. Something else? DAQ, is there something analogic? Arduino: do you need software to run embedded on it, or can you leave all tasks to the host, so that the arduino would just be a DAQ alternative? On top of that VI logic. Transfer function? In the terminology I'm familiar with that has to do with the frequency response of a linear system; for an elevator?
  2. All interesting ideas, hats off! Can't really mark four or five posts as the Solution, do I?
  3. How can you make a boolean with size depending on its value?
  4. yeah, that gives a better experience. The price perhaps is that the focus condition has to be continuously polled in the timeout case, but its impact should be negligible. EDIT: I see that it works because the editable value read is exactly that of the current element of the array, i.e. that containing the string which has currently focus. I would not have thought at once. I'm afraid that, besides requiring the position to be continuously polled, it will identify the element only as long the mouse is on it. Or, at least as long as it is detected that focus entered to the string (following a mouse click). But tabbing, etc... In any event, thanks everybody so far for the suggestions.
  5. thanks, but that is what I meant by Extending, I could also think ahead at pseudo-disabling mouse-operated controls, like booleans or menu rings; for them indeed trapping the mouse down (and working out the coordinates) should be doable.
  6. Cool, I need to study it. As you say, it may be that the infrastructure needed overwhelms the benefits in my use case.
  7. Right, that is an idea. But how to identify the array element? Key down doesn't return coordinates which can be worked out, and Array, unlike table, doesn't have a property which returns EditPosition.
  8. For a GUI I'm doing, I find myself wishing for something like which notoriously is not possible per element, as array element properties (e.g. disabled) apply to all elements. On the other hand, the array container is soo convenient because it's growable and indexable at runtime. Can someone share an idea of implementation? I've been thinking: programmatical rewrite of the content of the "uneditable" elements which are changed (bad, it gives the user the impression that content could be written into); placement of a fixed maximal number of replicas of the element cluster on FP, and visibility of those needed (will become inconvenient for large numbers); array of clusters with subpanels (no goer). Actually my customer is suggesting something like which would be easily realizable (input field is copied to result on Value Change for editable elements, blanked for uneditable), but I find it a little overbloated, if it has to be extended to more cluster fields. Moreover both Enter and Focus off cause Value Change, unless they are trapped and treated...
  9. Right click on [3] "Play video", "Record Button" Value change -> Edit Events Handled by This Case. What is the word Homework in the title of your window?
  10. you have "Lock panel" on in handling your event case?
  11. without seeing your code, no. My guess would be that, if you're following the usual way of the IMAQdx example, that is register a dynamic event for frame done, and handle completed frames with an event structure, your webcam is generating events faster than you can handle/the front panel is locked while you're handling that event or something the like. I remember having seen a number of webcams/usb,firewire,Gige genicams generating two events per frame rather than one with this scheme, for reasons I never understood.
  12. So, after hours trying to pinpoint an UI bug, I've narrowed it to this: I have a main VI inserting a subpanel and calling it like this while the supbanel may decide to change the tip strip of one of its controls: It's obviously pointless to rewrite the same property every 100ms, that was the unspotted mistake of my original UI. Skipping whether that was dumb or not, here is the weird fact: if the tip strip property is written, cut/copy/paste into any of the subpanel controls using Ctrl-C/X/V won't work, no form of them (all content, selection, at the insertion point). Only Shortcut Menu/Copy Data & Paste Data work, on the whole content of the control, and, in linux, 2nd-button mouse inserts regularly the X selection. If, say, text background color is written instead, copy/paste is ok; I didn't try extensively other properties. Can this be called a bug or is it just a worthless idiosincracy? I've tested these snippets on linux, but observed the original bug which led me here on windows as well. SimplePanel.vi UncopiableContainer.vi
  13. Note taken, thanks. In defense of llbs I can say: they are fit for me to unclutter small scale projects (up to a few tens of vis, SCC secondary), which are to be deployed as main.vi + ancillaries packed in a single place, when the development environment is anyway present on target. That is our common use case in the academia. We have a blanket license and don't mind installing the extra copy, lifetime of software may be very short (three days till the student realizes that he wanted something else, or that the measurement has to be performed differently), need for maintenance and adjustments onsite are a constant, and instruction is often part of the game. And plain llbs don't need a project.
  14. At the risk of saying something obviously off mark, couldn't be that displaying the extracted numbers in FP indicators is the real bottleneck? (especially if you have a weak video adapter)
  15. I'm on ubuntu with qgit (my comments about integrating LVCompare). I have tortoise for mercurial and am not aware of plugins for git, maybe they exist but I haven't researched too much.
  16. doh! you're right. [excluding Dependencies/vi.lib, I assume]
  17. Has anyone tried this on linux so far? I gave a shot to it and stumbled into the following: LVCompare opens a new session of LV at each call. I presume that it is screaming for me to change labview to labview -launch in the couple of relevant places within the script. Btw the mechanics of /usr/local/natinst/lvcompare/LVcompare involves creating a file /tmp/LVCompare.ini which contains the absolute pathnames of the files to be diffed and the comparison flags, which the closed vi /usr/local/natinst/lvcompare/supportVIs/_prolvcmp.llb/LVCompare.vi subsequently erases; however there seems to be no problem as long as calls from an external script are correctly sequenced and the files to be diffed survive until termination of LVCompare. I anticipate a problem if more that one file couple is compared at a time. Integration with common git GUIs. I've randomly tried in qgit (the one I use daily), gitk, gitg, git-cola, giggle. In none I could get diffing work nicely if at all. Common issues are: a) an external diff program can be configured, but inflexibly for all file types; b) the temporary files to be diffed are nevertheless treated as text, truncated at the first \n, and useless to LVCompare. What instead turns to be a non-issue, is absolute pathnames, because these guis pass it nicely to the configured differ. That doesn't mean that I might not try harder in future, studying harder the options of git config, or writing a diff script which calls either meld or LVCompare depending on the file extension, for perusal of the only GUIs which treat binaries as binaries, but for the moment my motivation is low -- unless someone has already a ready solution to share.
  18. which brings me to rush to do it at this point, like this: but what should I do for *.lvclass (and other types which I possibly forgot)?
  19. Thanks everybody. Will dip into the threads suggested. Good to hear that I'm on the right track.
  20. Maybe a blurb of noob faqs, so apologies if I'm asking the obvious. I have used different SCCs for various text-based projects in the past, like cvs, svn, git, and I'm familiar with the idea. Now I decided to adopt git (namely hosting at gitlab.com this time, for convenience) for a big LV project which screamed for it since its beginning, and I'm tucking fine with that. . However, git itself is agnostic in treating all my vis, llbs and so on like binary files. That means to me that my repository grows in time at a quite fast rate, and that diffs are completely obscure. I am not able to tell for instance if an llb changed because a single vi was recompiled or because of more extensive changes. That may ultimately constrain my strategy of committing, for example avoiding llbs at all in favor of subdirectories in order to gain in granularity, or reducing the frequency of updates to limit size blowup. I'm also missing specific tools for, say diffing and blaming files in a LV meaningful way. This in contrast to text-based languages. In the present project my only text files are .lvproj, .lvlib, some xml configuration files and lyx documentation, not the core code, so that doesn't bring me very far. To compare two snapshots of the project I presume that I would have to create two copies of it on disk, rename some relevant VIs, load both copies in LV and compare them... not inspiring as a workflow. Is it all one can get, or am missing the obvious? I mean, after all what is this Tools/Options/Source Control/Provider name thing, and why does it display "<None>" in the pulldown? Oh, help: "On non-Windows platforms, LabVIEW runs a query to determine if Perforce is installed". So what, I can do SCC only if I depend on a single commercial service provider? Can't believe...
  21. Indeed. I realized that only afterwards. leftover of my other attempts with other types, while trying to understand. Agreed. my aim was to detect value changes in the class object, hence I'll have to decide whether I still want to allow NaNs as data in it and go like this, or to change design. Thanks for your investigation and for escalating the matter for me!
  22. Ok, I understood something: my object has some NaNs, so I'm essentially affected by (NaN != NaN) being true. However, there is still something which puzzles me: to test the differences between passing the data reference in a tunnel or a shift register I've put together this variation The class object and the cluster (or even a single NaN constant, for what matters) don't behave the same way I could speculate that the Equal? and the Not Equal? blocks are smart in some way that avoids the detailed comparison if they know a priori that the data reference is the same, and that the shift register must do a data copy at every iteration; however, something may be different in the mechanics for classes. Intriguing.
  23. I ran into this. Two class objects which should be identical, result as different in the following: I've tried a few variations of the snippet, and it seems that the comparison of this particular class object with its data (but not other instances) diffs if the shift register is involved, while two static copies of it would result as identical. Intriguingly, if I pass the objects to the subVI Diff... they result as identical. Is someone able to shed light? I'm on LV2014/linux, haven't yet tried in other versions. ClassComparisonBug.zip
  24. Would this be better? I've moved the generic referencing to my config panels inside the children accessors (and duplicated it for every children), using class specific typedefs. Maybe it is more boundary savvy, still I found no better way to conceive my "read from class object and write to config panel" and "read config panel and write to class object" than as accessors for a VI ref. Accessors for parameters config would result in a different cluster for each class, with the previous issues; and the FP reference is needed in order to insert in the caller subpanel.The VI ref has to be generic in order to be overridden, hence I can't use a Call by reference, and still resort to retrieving the configuration panel control as a variant, and cast it within the WriteConfig accessor. In any event, if I'm asking too much attention on this thread, I can pause, and walk a bit on my own feet. Your assistance has been very helpful!
  25. I've been scratching my head thinking "is it me who doesn't see it because I'm fresh to OO, or" for a while... But there may also be design reasons for me to keep things like this (and fit to my competence level) for the time being. Among them: Variants: a side advantage of the present form is that I can detect a class type change as well as a value change within the same type, just with a single disequality. bundling and unbundling: I'm fine with them for the time being, because I'm still figuring out which parameters of each class to expose as configuration, and which as operational. And for configurations things may get a bit tricky: i.e. Cells may have two Heaters, Heaters may have Configuration and Setpoints, but it is not said that Cell.Configuration is Cell.{Configuration.Heater1,Configuration.Heater2}; for some kind of Cells part of the second may depend on the first, and so on. VI refs: my anticipated scope is the only two calls above in a single main VI, I don't feel the need of abstracting for now. Also, I fear that both configurator examples mentioned by Yair are an overkill for my learning curve, but AQ's one I'd rule out since I don't want to configure the whole Cell class, only some of it. My design choice is to split classes per hardware, not per functionality. And I wouln't want to create a parallel hierarchy of Configurations.
×
×
  • Create New...

Important Information

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