Jump to content

jed

Members
  • Posts

    52
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    San Francisco
  • Interests
    LV, woodworking, photography

Contact Methods

LabVIEW Information

  • Version
    LabVIEW 8.6
  • Since
    1994

jed's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In Rare

Recent Badges

0

Reputation

  1. Thank you again for those last comments. I went to the detailed pages for each VI, but did not see the link to the larger help (which may have just been me not paying close enough attention). I don't even bother looking for things in the Help... menu since only a handful of tools utilize it. I'll try and remember to check it going forward, since you took the time to write all that. Thanks again!
  2. Awesome, thank you for that idea. To answer your question... I tend to only work with JSON as a monolithic static element. That is, my applications seldom require me to adjust a portion of the JSON. If you are working in another language, it makes sense to use the JSON as the actual data cluster that is modified as it moves through one's code. But the thought process for me has always been Retrieve JSON (as a file or HTTP request) -> Convert to LVCluister -> Process. Now, combine that with the other part of this... the JSON to me is just a tool to get data in and out. I am usually tasked with some other important process, not learning how JSON works. And the tools provided in LV are pretty monolithic. So all together, it's never occurred to me to treat the JSON element as you did above... I just want to turn it into a cluster and get to work! (For this specific application, I am processing the response of a call to get a list of web-connected devices and their properties (what I posted is a small subset of many fields). This JSON object would not be used by my code, so there's no reason to maintain it as JSON; converting to a LVCluster upon return is both convenient and simplifies my code. Of course, this assumes it's a relatively simple matter to convert to LVClusters. If I have to really crunch this thing I will probably only convert the data I anticipate using) Of course, now that I am working with more web APIs, the need to get into the fundamentals is more important. And WOW, your tool is one of the best things I have seen out there. So thank you. I must say, dealing with some of these APIs is frustrating. It's clear to me that these functions were coded by multiple people who didn't coordinate. In my example above, why would one not place those variable objects in an array? I know in other languages enumeration is simple, but it's also even simpler to have a logical structure (and I won't even mention how this particular API reports errors; no consistency whatsoever). Also... I looked at several JSONtext pages but could not find this answer... is there any documentation that would tell me how to use that <JSON>variables element? I am still uncertain whether this just populates the string automatically with JSON or if the <JSON> tag causes this. (A guide for newbies on using your tool would be great; I would contribute to it. Please let me know if you would want me to put some examples together, including how to process non-straightforward examples like this. It would also help me get familiar with your tool).
  3. Figured it out... I was using the path $.[X] to try and access the top level array, but that's actually $[X] without the period. What I ended up doing was to create a cluster with a variable array that looked like this [{name, type}]; but I named it "variables.and.types" so that the parser would ignore it. Then, after doing a full parse of the entire cluster, I used the getMultipleItems (non typed) with the path $[i].variables.* and looped over the now known number of elements (substituting i) in the top level array. This returned the names and types in two separate string arrays, which I then recombine into the array of clusters.
  4. Hello! I have a JSON string that looks something like this... [ { "id":12345, "name":"E1", "functions":[ "randoNameX", "randoNameY", "randoNameZ" ], "variables":{ "randoName1":"int", "randoName2":"string", "randoName3":"dbl" } }, { "id":54321, "name":"E3", "functions":["randoName"] }, { "id":31645, "name":"E5" } ] Things to note: 1) The functions and variables elements may or may not be present in each element. This is no problem parsing individual elements, but for some reason it fails when processing them as an array. 2) "functions" is a simple array of strings, so that parses easily into a [STR] element 3) variables is more complicated, it's a LIST of random key/value pairs. That is, I don't know what the keys will be, and they are arranged into a JSON element, not an array. So looking at another post, I tried using JSONtext and accessing those "variable" elements through the path. But while I can use a wildcard to access the values and ignore the keys, I can't seem to figure out how to use a path to find the key names. I can't use a numeric to access their position in a list (as if it was an array), that errors out. any ideas?
  5. Anyone out there (especially in the San Francisco Area) involved in FIRST and can give me an idea where I can find a team to volunteer for (or start one up with my kids' school?)? Their website is a mess, none of the email links are working, and the search for teams feature appears to be broken. The NI community page for first doesn't seem to have any info either. Thank you! Jed
  6. I am designing a test fixture for a cable assembly. It will need to connect to bare 20G solid wires, and handle up to 500VDC. I would like to stay away from screw terminals. In the past, I have used what look like stereo speaker push-buttons. Anyone have any better suggestions?
  7. I am writing an app that has a couple asynchronous Subroutines running in the background. They were originally small stand-alone routines used to control hardware. So they have some controls that when changed trigger events. To control these from a master application, I set them running and then duplicated their controls on the new program. When those controls are changed I use events in the master VI to write the "Value (Signaling)" property of the same control on the subroutine. On both of these subroutines, the control will change on the panel. On one of them, this also triggers the original Value Change event within the subroutine. On the other, the control updates, but the Event case is not triggered. Can this be dependent on the typeDef of the control in question? -------------------------------------------------------------------- Crap. Nevermind. It was something else causing the subVI to stop running that was killing it. Seriously, I looked at tthis for 15 minutes before posting, then 10 seconds after posting I figure it out. every time.
  8. Hi Jason, Is there some way that I can contribute to a new release? If I moved through the code and replaced the lagacy with the new function, could I then submit the code for you guys for a release? Seriously, I do a LOT of work with TS and these formatting tools, and if I forget to overwrite this library Iget phone calls late at night! Jed
  9. Format Variant Into String__ogtk.vi doesn't handle timestamps, you get an "Unexpected Datatype" error, as the TDEnum reports it as a Waveform. I have put in place a fix that seems to work without issue, but I can't be sure that it doesn't falsely detect timestamps when processing other types of data. Is this something that can be integrated into the release? Up to this point I just have to remember to copy my version over the OpenG version. It would be nice to not forget and break my code every time I move to a new machine! -jed
  10. I thought about that. It may come to that!
  11. I need some help figuring out how to streamline a new tool. I wrote a tool that is invoked by my SCC server; when a change is submitted, the server scans any submitted VIs and controls for revision changes and records them into the SCC's change spec. This allows me to track changes at a very atomic level. But here's the trouble... the code for reading the history WITHOUT opening up VI dependencies only runs in the development environment. So the original EXE script that I wrote to do this doesn't work. OK. I'll just invoke Labview with a command line argument to launch the VI I want and pass in the relevant SCC info. No dice. If LV is already running, the command line arguments are the ORIGINAL ones, not the ones used to call it the second time. So what I have is a LV EXE that is invoked by the SCC. It calls my revision tool via VI server. This works, as long as LV is running. (I suppose I could start and stop LV, but I don't want to deal with that latency every time I submit- which can be often). So now I have LV running 24/7 on my windows machine (windows 7 pro, no server). Is there a way to run the Dev environment as a service so that it's not running in the UI? Any other ideas? Thanks!
  12. Sorry I'm late to the party. I have been using P4 for > 10 years with Labview. I whole-heartedly agree that you don't want your workspace to be c:\ I typically work out of c:\Users\USER\p4 on my personal machine (windows 7) and map the specific client's code to c:\project on their machine. I use VIPM extensively (I use the pro version so that I can include my own libraries, but you don't need to do that). I include a VIPC file with my distros so that I can easily get all those libraries. You could just archive your VIPM cache into P4 somewhere. Unfortunately, since all those drivers are dumped into the non-controlled, non manageable instlib folder, it's VERY hard to maintain that with P4. I have two methods... 1) Don't manage the instrument code. Zip any dependent libs up and include them in a support/drivers section of your main code area along with a basic readme to explain where they need to go. This is what I usually do. Hopefully I do not have to make changes to their code. If I do, I treat it like it's a portion of my own code. 2) You can also include just the <user.lib> and <inst.lib> folders in your workspace definition. Just be careful when upgrading LV. I hope this helped a little. I agree it's a pain in the neck to deal with it.
  13. I have written an app for a client and included a couple web services to pull some data. Works great. I was wondering how difficult it is to design a simple web page that can take advantage of the web services; Specifically, how hard is it to have the user click a form button, have that call the web service and then pull data out of a specific XML field and update the page? I know this could get pretty involved, but basically I was hoping to write a simple web page with a table and update values in the table from the web service; I was hoping NOT to have to do this down at the labview level- although that might be what I have to do. -jed
  14. Help! Roughly every 5th time I run LV 2009 SP1 (W7 x32), when LV closes the Labview.ini file is deleted. I am not sure what this affects, but 1/2 of my IMAQ VIs are no longer on the palette, the scripting functions aren't showing up, even though it;'s installed, etc. Any ideas?
  15. I have a client that needs a servo drive module that can be pre-programmed with a sinusoidal position profile (single axis) which can then be triggered by LV software (via ethernet, serial, USB, etc). Any suggestions? The cRIO products might be a good candidate, but that platform may be more than the customer needs. Thanks! Jed
×
×
  • Create New...

Important Information

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