Jump to content

ensegre

Members
  • Posts

    573
  • Joined

  • Last visited

  • Days Won

    25

Everything posted by ensegre

  1. Right, now that I turn to it, I see it. Harder, but perhaps not insurmountable: if I get it correctly, the showstopper is that there is no way to recast the saved class data back into classes by merit of some autodynamical mechanism; the hard way should be to include enough class-discriminating information in the JSON, and supplement a lot of ad hoc fragile code to place it back where needed. Anyway, tedious enough to wonder if it is really preferrable to my original xml dump. and me too.
  2. This is the way I'm currently exploring for flattening, and while coding it, it seems to work: make my top device class a child of JSON Object (not Value) for each descendant class, create an override Flatten.vi like this: The first subVI in the chain reads the relevant configuration parameters of my Heater class, and bundles them in a cluster. I just leverage on previous VIs I coded for the configuration UI of the application. For a more complex class, the extension of the exercise seems ok as well: (broken wires here in the snippets are only due to the missing class context) Do you see drawbacks?
  3. Coming to this thread with my monstruous configuration which is a blurb of about everything including array of classes with children, which so far I dumped as 50KB+ xml, and starting to have cursive looks at the Lineator too, I'd like to reask the same question of https://lavag.org/topic/16217-cr-json-labview/page-6#entry109240 (2nd part, serialize classes): what exactly do I have to do in order to dump my monster as json and viceversa? Create serializable.lvclas parent of all my other classes, perhaps, with two methods - doing exactly what? Is there an example? Also, suppose the monster still mutates, parameters being added or moved: what recommendations would you give in order to maximise the information which can still be retrieved from an out-of-sync configuration dump? TIA, Enrico
  4. So it is. The lifeline keeps blinking. It stops only when I press the stop button, or if I reopen the FP of the blinker and abort it (maybe obvious but foolprofing).
  5. Like you say, LV2014SP1 linux. The lifeline of Run VI dies either that Auto Dispose is on or off.
  6. ensegre

    Help

    Not the right references IMHO. In the first, light from the bottom reaches the camera at 90° only because the bubbles act as scatterers. Bubbles cause motion and volume uncertainty, though the perpendicular position eases perspective corrections. If the OP cannot even tolerate the density change due to the addition of a small quantity of dye (which, with the image provided, somehow surprises me), I doubt he can put up with bubbles (or possibly other neutrally buoyant seeds). OTOH, I wonder which precision he aims to with his measurements, and whether his aim is achievable with a generic camera even after a careful geometrical image calibration. The second one doesn't even look like a fluid column, but a led matrix display with a "bubbles" animation mode. Not mentioning, shooting in the far IR or UV where water is not transparent... but then he'd need a specialized sensor, and usually they don't came at such high resolutions. I'm taking this homework (?) for the face value stated: (untampered) water -- then density can change with temperature or (extreme) ambient pressure. Or it is not really water but some acqueos solution which has to be left alone. Density - then this water must have been weighted. Must use a camera from an oddball perspective - hence hardly 1% precision in distance measurements. Meniscus curvature effects not mentioned. If volume changes are small, a setup with big reservoir+narrow riser tube may help.
  7. As a matter of fact, I have reorganized the sources a bit, packaged them as a project, and put them under RCS here: https://gitlab.com/enricosegre/LVVideo4Linux
  8. ensegre

    Help

    dark background, reflection on the interface either from above or below (total internal), perspective reconstruction? Maybe you can get some ideas from this: Tracing the boundaries of materials in transparent vessels using computer vision
  9. http://rationalwiki.org/wiki/Not_Even_Wrong#Examples
  10. Growing large arrays in loops, which is what you're doing, is slow at any rate, because it involves reallocating and copying at each iteration. I would preallocate the array Y and fill it in the loop with replicas of the basic chunk.
  11. So ditto: it is an opaque implementation, there is a critical password-protected subvi, hooovah though about three weeks before me, I don't really need it but why not asking... I kudoed the idea.
  12. Much plausibly so. By now I've found the reason for my bug, actually elsewhere than in the time difference between the events. Nevertheless, the discussion helped. I have among the rest used what pawhan suggested to exclude simultaneity in the application, and went on pondering the faulty logic to find the true reason. @shaun: yes, it was an academic question... I used queues with timestamped data too, when I needed so.
  13. Right, that is a quick way and fits well my need of knowing the event fired timestamp; and when it is about filtering out just a couple of events out of many, it's really easy to set up an additional concurrent while loop with an event structure for them two. Thanks. However, remark, this doesn't give access (not that I really need it) to further information visible in the Inspector, such as the event and queue number. I would have expected some queue accessor from the Events Palette, like Preview Queue Element or Get Queue Status for regular queues. The only one of this kind, on the Events palette, is Flush Event Queue.
  14. Debugging an application of mine, I ran into a very possible occurrence of https://lavag.org/topic/9986-out-of-order-events-is-not-a-bug-sort-of/ . Now, I have reasons to suspect that, due to some race, while in the IDE I have a positive timestamp difference between one certain dynamic and another user event, in the compiled application the two can be nearly simultaneous. Enough for treating the race in the first place, but academically wondering: in the IDE I can help myself out with the Event Inspector; can anyone suggest a way to filter and display information from the event queues in the apps? Looking at the GUI of the Event Inspector, that looks like one of these many tools written in G, modulo using password protected blocks, I haven't been diligent enough to search for its whereabouts yet. LV2014.1. Otherwise, for the present case, I suppose that just sequencing the event generating blocks together with a Clock Tick and displaying the results may do, for the debugging I need. TIA, Enrico
  15. Another potential factor is EMI. Supposedly interference may set those chips in odd modes, so improving grounding and shielding might help. But all together, I think the cheapest and fastest option is to try out different usb-232 dongles.
  16. cheap usb adapters are known precisely for that problem, and I run into every now and then. The only cure known to me is to unplug/replug the usb, or reboot the computer. I remember long shaming threads on ni fora, on the topic "but VISA write should timeout". "No, it's not NI's responsibility, it's the driver function". "yes but" and so on. ETA: for instance http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/VISA-Read-hangs-Get-Resetting-VI-dialog-on-abort/m-p/2004797#M53616
  17. Since the day I upgraded I haven't seen the problem any further, so perhaps that would be your best option too. It is ubuntu 14.04 here.
  18. Right, it works. I thought I also tried that, with the continuously running subvi. Oh, I see -- I set the subvi property as "run when opened" and just inserted it in the subpanel -- forgetting that VIs in subpanels are not "open". Thanks for the tip...
  19. I ran into this; I wonder if I'm misunderstanding, or it's a bug. I have a FP, with buttons I want to toggle with keys, and I have string controls in a subpanel, like in the attached minimal example. I'd like to toggle the button while the focus remains in the subpanel string. While this is no problem for a control on the FP, pressing F1 while focus is in the subpanel string rises the focus to the whole subpanel container. What is wrong? If a bug, how to workaround? Setting KeyFocus to the sbubpanel string ref doesn't seem to help. Seen in 2014SP1 linux and 2014SP1f3 windows. main.vi subvi.vi
  20. Apparently, xml for an empty variant is different than that for a variant with some typed data content; you can circumvent that flattening the variant:
  21. Well, this is what I'm coming up with, I may later embellish it (for instance differentiate treatment of controls, globals, polymorphic). ETA: an improved version which treats VIs, controls, globals and reports some statistics, and on which items can be opened with double-click. LabviewProjectList-dda9fc0069d62440001862aad0be0301d4ed1f93.zip
  22. Would this do, then? The assumption is that the first column of the line is the pin number, then further columns can only be ON, OFF, a waiting time in ms or empty to end the sequence.
  23. If you want something complex, you need to write a complex program which parses each line of your spreadsheet file, and and controls all the possible execution options accordingly, there is no escape from that. For example do you want to write pin-status-wait-status-wait-status-wait... or pin-status-wait-iterations... Maybe you should start there, defining what is to be expected on a line, and what is intended to happen; then you can think at possible implementations which satisfy your constraints. I don't even understand, should the lines of your file be executed sequentially or simultaneously? The examples above assume sequentiality; I previously deleted a reply of mine in which I was answering you understanding simultaneous start of all pin cycles, then thought that perhaps it was not the case.
  24. Several ways. Two for example: in edit mode, click twice on the eighth button, which populates the array. Left click, Data Operation->Make current value default, Save VI.
  25. I see. Yes, maybe someday I'll play and will put together a tool of my taste. Indeed I see that to get odd vi properties is not difficult; I quickly put together the following as a proof of concept without bothering for recursive descending of the project hierarchy and item discrimination, maybe on some rainy day.
×
×
  • Create New...

Important Information

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