Jump to content

Scatterplot

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by Scatterplot

  1. No apologies necessary, this tool is absolutely wonderful and I have no right to demand anything I hadn't used the multipoint path functionality before and wasn't actually aware it existed. Mind if I ask how you're handling config file initialization? My go-to behavior has been for the "reader" code to check for a valid entry, and if it's not found, use a hard-coded default value (either a "good guess" or a sentinel such as NaN) and write it to the config file. When the user modifies it, the config file gets updated with the correct value. Do you either hand create or have another program to initialize the config files? How do you handle "entry not found" errors? I'm always open to other approaches, and if this hasn't come up with any other users since this tool was published then I'm guessing I'm the oddball here.
  2. That seemed to do it, thanks! I wrapped that up in another VIM that tries the standard way first, then if it doesn't work it uses the Unflatten function. Thought it might help someone else out. Is there any reason to NOT want this behavior, by the way? I'd guess to detect badly formatted files, perhaps? Set Item (as LVtype) multilevel.vim
  3. Is it possible to use "Set Item" recursively? For example, starting with an empty JSON string, I'd like to be able to set tell it to set a nested item, and automatically create all of the levels it needs to. Say I want the following JSON to be created from scratch: { "Templates": { "Generic": { "Voltage": 14 } } } I would've thought I could use "Set Item" with a Path of $.Templates.Generic.Voltage, but that gives error 402840, "Unable to Insert at .Templates.Generic.Voltage". If I stack multiple Set Items, it works as expected- the first would set Voltage to 14, then set that to Generic, then set that to Templates. The second way is a lot more cumbersome. I'm using JSON for a config file, and I'd like each module to be able to read its own settings from the config file. If it doesn't find its own settings, it uses a default value (which currently works great) but it can't make its own value without doing multiple adds. Am I doing something a dumb way? Or perhaps I'm just formatting my $Path wrong?
  4. Just wanted to say thanks from the future, and that this fix still works. Deleting the cache prompted me for admin access a couple times, so I suspect that somehow some of the files in the cache didn't get the permissions they needed. Perhaps I ran VIPM as admin one time, and it updated the cache with some new packages (that I didn't actually download), then next time it got stuck? I'm not sure, but clearing the cache definitely fixed things for me. Thanks again.
  5. Interesting- so does the "lock during processing" start when the event is triggered, or when the event case dequeues the event from its stack?
  6. That makes perfect sense. Thanks for the help! I've been using event structures for a while now and these situations haven't come up too often- certainly no multiple event case applications. It just hit me that I didn't really *understand* them until I saw that question come up in the CLD-R prep material.
  7. In looking through the CLD-R prep material, I ran across one example problem that made me realize I didn't quite understand how Events are registered/queued/whatever. See the attached image. In it, Value1 gets set to a certain value by means of a Val(Sgnl) property node. When executing this code, Value 2 will be set to the same value as the constant set to Value 1 (in other words, it gets set to 10). What I'm not understanding is the event queue mechanic. Before reviewing this and running the code, I would have assumed that the Val(sgnl) write event would have been discarded since there were no Event Queues set up at the time of the signaling event. Clearly though, the event structure Value Change event triggers once the dataflow gets to that point in the program. Do all events simply start stacking up in an event queue somewhere from the beginning of program execution? Is there an intelligent manager that only stacks up events for potential queues that may or may not happen later in the code? Similarly, if I duplicate the Event queue in that While loop (and change the Value 2 to a new variable, call it Value 3), then both queues get executed. Is there a separate event queue/stack/whatever for each event structure? Thanks for the help. If there is already a good thread on this please link me- I did some searching and didn't see anything.
  8. AeroSC, you have officially saved my bacon!! I've been working about 8 hours now on a solution to my own problem... your code totally fixes it. I have a very similar application requiring deliate voltage changes- thank you SO MUCH!! Bert
  9. I have a recurring problem that I have been unable to solve so far with any satisfactory methods. My company has the frequent need to be able to begin writing an arbitrary waveform, then have it repeat indefinitely until something happens (user presses Stop or similar). This part is easy- set the daqmx to continuous with regeneration, then stop the task when I need to. The problem here is the stopping- I need a way to write out the ENTIRE waveform, then stop. We are using voltage controlled actuators, and a step input is almost unacceptable here. We need to be able to finish the cycle before halting the task. So far, the only really good way I can think of to do it is to use an analog input to monitor the output voltage and stop it based on that signal, which is obviously undesirable. The ideal case is to be able to say, ok, this next write is the last, stop regeneration after this. However, the regeneration property is unsettable while the task is running. I have also tried software re-buffering, where I write a new waveform every cycle in non-regeneration/continuous samples mode. This doesn't work either. When I write the last set of desired samples, I do a Wait Until Done, but get an underflow error. I have also tried setting the property NextWriteIsLast, but I get an error saying it is not supported by the device or is not applicable to the task. I am using a USB-9263 in a USB-9162 carrier, if that makes a difference. ANY help would be GREATLY appreciated!!! Thanks Bert
  10. I would like to see some code like that, if you don't mind. A screenshot or something would be most helpful!
  11. Well I'd thought about using several axes made before compiling and using the visible property, as Antoine suggested, but you're right- it's a whole lot less sexy haha. Well thanks for the help guys- at least I got a good solid answer without going through any more work! 'Preciate the help guys.
  12. I'm wondering if it's possible to programmatically create a new axis in an XY graph. I know there are built-in tools to handle axis manipulation, but I can't find a way to generate a new axis at runtime, either through a right-click menu or a property node. I do know about the Active Y Scale property, but for that to work the axis must already be present. I tried setting the Active Plot to "2" on a brand new plot, but it gave me an error. When I added more axes to the graph in edit mode, it would let me select "2" when I ran it- but it wouldn't -generate- the axis for me. Please tell me there's a way to do this... I've been pulling my hair out over here!
  13. I have a need every now and then to create several instances of the same VI. I was wondering if it was possible (in order to save space and make program flow neater) to make a subVI that is expandable, similar to many of the array functions. For instance, "Build Array" can be expanded by the drag-down menu to make more inputs for you to build the array from. Is it possible to make my own subVI with that functionality? I suppose I could make the subVI polymorphic with support for arrays of whatever data type I'm using, and when it sees an array of (data type X) repeat the operation on each element of the array, then return another array with the all of the elements operated on, which I could then index... but at that point it's become rather messy, defeating the desire to make an expandable subVI in the first place. Thanks for your help!
×
×
  • Create New...

Important Information

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