Jump to content

hooovahh

Moderators
  • Posts

    3,388
  • Joined

  • Last visited

  • Days Won

    283

Everything posted by hooovahh

  1. I've never tried it but I think there is a LabVIEW.exe call that can do this called MoveBlock https://decibel.ni.com/content/docs/DOC-9091 Still I've seen that XNode mentioned by NI and it should work.
  2. I've never tried this but here is apparently a way to decrease compile time drastically by using TurboBoost. http://forums.ni.com/t5/LabVIEW-FPGA-Idea-Exchange/Multi-core-Compiling/idc-p/2301338#M297 This should really get more visibility. As for the OP sorry no clue.
  3. If you want to over complicate things sure you can use Classes or Variants. But seriously what is wrong with just ignoring the data that isn't needed for that type of DIO? It is quite easy from a developer perspective to see that you are just ignoring control values if the DIO is an input. Dynamic Dispatch can do this work for you, but with no extra VIs, and a single type def you can have the same functionality. Variants could be used with a convert from one type to the other if it is an input, or output, or PWM output too but there we possible type conversion errors to worry about which might not be that big of a deal depending on how it is written. I'd KISS in this case. If we are talking about any larger of a design, where a channel could also be a counter, with PWM in or out, or an analog with in or out, or output wave etc. Then yeah classes would probably be what I suggest.
  4. Set a timeout in the event structure, and drop down an Elapsed Timer express VI. This will tell you if some amount of time has gone by. If it has get the next image which should be the next index in an array of file paths.
  5. Well the idea is to use a publisher subscriber design. So this means you can communicate 1 to 1, or 1 to N from the parent, but only 1 to 1 from the child. So you could send out a single global event that all children get. This would then be acted on at more or less the same time on all children at once. Just like how you send the Quit and they all quit at once, no child is waiting for another child to quit. As for the response. Because the design is 1 to 1 from the child perspective, I'd say you could send out a global out, from the parent, then each child can generate the same event back to the parent, with different data identifying which child it came from. Looking at my code I feel bad for not completing this part which was in my head but not in my code. Notice that again there are 3 events made which is unique for each child. Set Settings, Get Settings, and then Get Settings.Reply. The intent was the parent could send 1 to 1 using Set Settings. And the parent could get data by sending a 1 to 1 on Get Settings, which would cause the child to send back data on Get Settings.Reply which the parent would register for. I also can't believe how many subVIs don't have icons, such a shame.
  6. At my previous company I was "upgraded" to a 64GB SSD drive. This was when standard sized SATA SSDs were quite expensive. That puppy was always on the brink of being full. I had something like 6 different versions of LabVIEW installed at once, and for fun I wrote a batch file that would launch them all at once. It was something like 4 seconds to be at the getting started screen on all versions. It was glorious. Later I was upgraded to a hybrid drive and enjoyed the extra space. The job market has been going towards laptop only for a while now. I think the last work desktop I used for my main development work was 2006. Now you get a laptop and you install all you need on that HDD. That is unless you have a mini-PCI slot like some elitists. EDIT: No SSD now but I have been touting a I7 with 16GB of ram for the last 2 years. The power brick is huge.
  7. You are going to want to learn how to use the event structure. Your code continually regenerates the images with no wait in the while loop. This will consume tons of CPU resources for no reason if the user isn't interacting with the controls. Using an event structure will also have better response time for large images. I loaded a large image and tried to exist and I had to wait several seconds for the final conversion to complete. Using an event structure it will be immediate if nothing else is being done at that time. Is there a reason all subVIs and primitives have their labels shown? Is there also a reason all labels are bold? The value of Off Channels also doesn't change within the loop, so there is no need to continually read its value and become a FF or a 0. The error data type can have boolean operations like Not operated without having to pull out the Status. As for your questions, (sorry it took so long to get to that). The IMAQ image code has many more tools for doing ROI on sections. The IMAQ tools for ROI are free to download, but to do any manipulation with that image using the ROI you'll need the vision toolkit which isn't free. I added a quick Image Subset to your program but I doubt it is fully what you want. You may be able to get away with using multiple image subset and stitching them together. Attached is my updated version using the changes I mentioned. Jpeg Color Editor Hooovahh Edit.vi
  8. No I have no examples. This was just test proof of concept code and I have yet to use it in an application. I don't fully understand what you are trying to do. In the example there is the global event (or rather an event for all children) which is Quit, and then there are events for each child like Set Settings as mentioned earlier. You can generate this Set Settings event which has a variant as the data, and depending on the value of the data do different things. Like the data of the variant can be a cluster of a String, and a variant. The String can be the type of setting you are attempting to set, and the variant can be the payload of the event. I personally use Variant attributes but that is harder to explain if you are unfamiliar with them. Post some code if you are still confused.
  9. I always used Junction back in Windows XP days to have symbolic paths. I had forgotten about that tool until now. Glad to see it is part of the OS.
  10. I always wondered where this additional installer stuff was located. Thanks for the info, I think I may blow my MDF away at some point since it looks like it has all kinds of additional installers for versions of LabVIEW I rarely make builds with. For comparison my NIFPGA is 30GB, but my MDF is only 15GB. LabVIEW 2011 - 2014 installed.
  11. Yup an XNode already exists for this along with many others done by gb119 which are pretty neat. Also there is compatibility issues with LabVIEW but you likely wouldn't know that if you just stick with the newest. For me when I develop code I try to develop it for 2011 knowing the compatibility issues. Here is a chart showing what versions can open what versions, and what versions can back save to what versions. EDIT: Oh and as for cleanup, I generally have a constant on my GenerateCode which can enable cleanup when doing debugging, but then turn it off after I'm done. I also use templates and inline them instead of creating the VI from scratch each time. It is faster to develop this way, but I suspect the scripting is faster to execute too.
  12. Think data flow. You enter your loop it reads the value of boolean as false, and stop as false and then sits and waits forever for a menu selection to occur. Turn on highlight execution and you'll see that there is no data flow. So changing the value of controls is fine, but you are never actually reading those values. An easy solution which avoids the whole "why are we doing this?" question is to just set a timeout on that event structure of something like 100ms.
  13. Okay so this is all conceptual and I haven't actually tested any of this. Notice that in the Run Panel case in the Main.vi you are creating a variant to give to the child. This variant is actually similar to a Variant Repository I posted earlier but that is a different story. In this Variant we embed the same Quit user event. We also embed a Set Settings event, a Get Settings event, and a Get Settings Reply event which is unique for each child. The idea is that you could keep this information and can send user events to one child at a time, or throw it in a loop and set all of them.
  14. Okay I have a feature request. Very often I'll setup a project with an EXE and installer with what I want. Then after changing the software the only thing that the build specifications ever changes is the EXE version, and the installer version. Wouldn't it be nice if you could right click your EXE, and choose instead of Properties which opens the whole window and takes a while to load, just pick "Change Version" and a separate window popus up allowing the version to be changed. Then if you right click an installer and pick "Change Version" a similar window pops up, but this window shows the version of other EXE builds, and allows you to set the installer version, to the same version of the EXE. I'm pretty sure this can be done in a Pre-Build VI but have never tried it. 2014 added new controls for setting build versions programatically. Before then you could do it by setting tags and each version was slightly different.
  15. Flarn does tend to make being a moderator / admin interesting around here. I'm not so sure there is a need for a hard-copy, I mean the description on how to do this is in everyone's RSS feed by now. The step by step is so simple that the posted VI isn't even required. One thing I find interesting is that the signature has nothing to do with the actual code, just the names of the items in it like the VIs used. So before this signature weakness was found, one could simply install a valid tool, then edit the VIs in it to get the functionality you want. Or replace the existing VIs with your own without renaming and it would work. If I were investigating how to do this type of thing that would be the first step I would take, so I'm sure others found a weakness in the signature process before.
  16. I haven't personally used this QuickDrop but it allows you to take a selection of code and make a template from it. Then that template will be in your palette, and you can drop it down from quick drop.
  17. This chart is always a pain to read but I think 8.2 is the newest version that can open 4.x version. EDIT: Oh and by the way I started in the 6.x era so I think my code can be opened in modern versions.
  18. We need to have like a self confession thread, where we post code we are ashamed of. I haven't looked at any of my old code on my site, and I'm going to pretend that site doesn't exist except once a year when I have to pay the fee to keep it up.
  19. Okay so I didn't get around to doing the double the buffer size technique. I'm not convinced it would be for the best due to the extra memory needed, and the fact that two writes need to take place for each write. But attached is a non-XNode version of the circular buffer which is implemented with strings. I wanted to share this improved version with offset and length for reading subsets of data, and not performing a shift 1D array if it isn't needed. Also if a shift was needed for the read, then write the shifted data back. There were also some bugs with what happens if the buffer wasn't filled once. There is also a mild bug with doing a read when the offset is greater than 0, and the length is greater than the size it will wrap around. I didn't get to figuring out a way to fix that. If anyone gets a chance take a look at the read and see if they can come up with a better way, or give the thumbs up to the way it was done. Non XNode Circular Buffer.zip
  20. The future of technology, or at least what people won't shut up about, is wireless. You know, things like walkmans, flashlights, and solar calculators.
  21. Okay I think I get it but for this to work the dual write operations need to stop after every buffer location has been written to once correct? allocate a buffer twice the size the user requested apply writes to buffer also to buffer[usersize + i] Once the buffer has every point written to, continue writing at buffer[usersize+1] wrapping back around to buffer[0] after buffer[usersize+usersize] is written use Array Subset Node to return any contiguous part of the buffer very efficiently as a contiguous subarray
  22. I had a function a while ago and I'm not sure if it was included in this post but it would give relative position from a parent to a child, or absolute position from the desktop to the child. Saving this information, then using the Windows Move function on load could be done relatively easily. Now if you have custom connections for a child window you'll need some custom way of re-making those connections on load. This demo just shows a random number generator for a window, but one could see that a publisher subscriber architecture could be used where a child window subscribes to data to display. And these are the connections I am talking about that would need to be saved and loaded as well.
  23. You should it is awesome and I'm not biased at all...okay well I just wanted to explore more XNode stuff, and I think it could be useful. Right now the read returns the whole buffer, I can see that reading a subset could be useful especially if a rotate is not always needed. Also I'm getting the idea that if a rotate was required, that we could then write the newly rotated data back and set the pointer back to 0. I think this would mean that you can no longer have a write and read happening in parallel, but right now I think you could, not that I would want to. The benefit of this is that if you did two reads in a row before a write, the second read would never need a rotate. All sound improvements team, I'll implement these changes soon.
  24. Okay I typed up a big long explanation on how it worked and half way through I figured out it wouldn't work the way I was thinking. Never mind I need to see an example first.
  25. Oh that is clever. So the trade off would be that your data in memory will be twice the size it needs to be, but no shifting operation is needed, and the other down side is each write is two writes. I'm not convinced it would be worth it, but it could be done. Again I guess it comes down to the fact, will you expect to be reading more than you are writing? Or writing more than you are reading?
×
×
  • Create New...

Important Information

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