-
Posts
3,432 -
Joined
-
Last visited
-
Days Won
289
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by hooovahh
-
I am all for this type of development, and I think I can see how this could help with that. Thanks.
-
I don't fully understand what you are saying but am curious. I have used event call backs on .net DLL calls so I am passingly familiar with them but I don't know how they could help simplify my code. So when the mouse enters my panel VI I can have that run a VI through the callback feature, which can generate a user event, that tells the parent this event has happened? I don't see how that is better then at the moment where the VI ref can be passed to the parent, then register for the mouse enter event, causing the event to be handled in the parent when the mouse enters the panel. Don't take this post as me saying "This is stupid and my way is better" I just don't fully understand how it can help because I've had very little experience with event callbacks.
-
Anyone else OCD about alignment and positioning in block diagrams?
hooovahh replied to Sparkette's topic in LabVIEW General
Okay I don't think I'm as bad as some of you guys but I too find my self moving things one pixel at a time some times to line them up nicer. But there are a few times that I hate the terminal choices used by NI. Here are two times that I can think of that irk me. Why do these not line up? Seriously NI? Seriously? -
Very true, you could flush it then process the last one that was flushed. I haven't used the new Event Features yet but I assume after flushing it will return all the events that were flushed like a flush queue. Then if 100 value changes come in you flush them all and process the analog output on the last one. There's a bunch of ways of working around this and the timer idea neil mentioned is another I have used.
-
Okay it's morning and I have a few more links. Inlining INI key http://zone.ni.com/devzone/cda/pub/p/id/347#toc2 Thread discussing it and code http://forums.ni.com/t5/LabVIEW/Dr-Damien-s-Development-Improve-Load-Time-with-Inlining/m-p/823418
-
I agree that this can be a place where the Flush can be used, but my work around was when the slider had a value change all it did was set a boolean true in a shift register. This boolean would set the event structure timeout to 0ms. Then in the timeout case I would perform the analog output, then set the boolean in the shift register back to false. The timeout case only gets executed when there are no other events in the event queue. So I would only set the analog out after the 100s of value changes had stopped for 0ms. This would reduce the number of analog output commands from 100s to on the order of 10 or so and it would always set the last value.
-
Why? If I have a C++ project with 100 text files can I combine them into one monolithic text file? Sure, but now that one file is very hard to manage, and edit. It can be done and in previous versions of LabVIEW there was an INI key that would allow you to right click a sub VI and choose "Inline" which is different from the execution inline. This inline would replace the subVI with the code from the subVI. This turned the code into very hard to understand code because it would just programatically plop down the code. But really why do this? If you really want one file create a source distribution, maybe an LLB with a top level VI. Or just zip the code, that's usually what you see on the forums when people have multiple files that go together.
-
I totally knew that going into it. But I feel like having 500 tabs and have them be hidden is not a big issue, but having 20 subpanels for each tab making 10,000 subpanel controls just not being used, would be overhead that may have an effect on performance. What I'm saying is the 20 page limit is arbitrary sure, but can be a very large number without any real issue. I never thought about this. It sounds like it might be a good idea to try since adding/removing pages dynamically would be a nice feature that the native tab can't support. EDIT: or VIBox might work too.
-
Well...do you have another mechanism for attaching floating windows to other windows? If you go with subpanels you can do it but you need something like 100 subpanel controls, all hidden on start, and then when you need to insert a VI you go get one and move it to the location you want and insert a VI. But if you need 101 controls then you need to go and make more subpanels in the source and make a new build. If subpanels could be added programatically at runtime this would be fine but you can't so I don't know another way to do this. By the way, I have tested this UI design with subpanels and it does work, but it is more limited. EDIT: Also things like panel resize while docked gets a little tricky with subpanels, where the user32.dll gives access to allow a window to be resized like a floating window.
-
Wow I can refresh and watch Sam work. Must be some poor co-op student.
-
Good luck with it. Xmodem_VISA.zip
-
I know it's hasn't even been a week since NI Week ended but does anyone know about the availability of presented slide material? Throughout the conference I would hear presenters say something like "All this material will be available online". So my question is will there be an aggregate place similar to this one for presentation material? And if so when can we expect to see it?
-
I've never heard of ALOHA but might check it out. If it is an unbounded number of panels I assume they are doing similar techniques with Parent Child relationships. Using subpanels alone does work but you have a limited number because you cannot add a subpanels (or any other control) at runtime.
-
Feedback Requested: Daklu's NI Week presentation on AOD
hooovahh replied to Daklu's topic in LabVIEW General
I didn't realize there was a new QMH in 2012. You can still find the old (which is the one I was referring to) under File >> New... Templates. The Project template for a QMH in 2012 is quite different and I have a whole new set of feelings towards. Before 2012 I didn't think there would be a question on what is a QMH because NI had a template on it, and JKI had a template on it that both used an array of string. So having these two be the only two examples I've seen I assumed that's what made it a QMH. An array of states (in this case string) to be processed one at a time by going to the respective state. Adding user events, and shift register data still kept it a QMH in my mind so all discussions of QMH I've had were with this very open state machine like pattern. You would be wrong. Generally I have a -1 timeout. I use User Events as my messaging structure and I don't have timeouts unless I see a need for them to actually poll something periodically. But even that can be handled by sending a message periodically instead. -
Feedback Requested: Daklu's NI Week presentation on AOD
hooovahh replied to Daklu's topic in LabVIEW General
Again maybe my misunderstanding but I thought it was well defined. If I ask NI what is a QMH won't they open the template that comes with LabVIEW? Now I never use that template as it is, I think I always add an event structure in the "" case, add a Default case to handle typo issues, and add a BFC (Big F***ing Cluster) on a shift register. Is this now no longer called a QMH? It feels like it is a QMH but it also feels like it is something more specific but it is still a QMH is it not? -
FGVs, Action Engines and DVRs: a rif on Nancy's NI Week presentation
hooovahh replied to Val Brown's topic in LabVIEW General
I wasn't talking about terminology to public methods VIs, I was trying to say that when in a public forum and discussing FGV vs AE all that matters is that the audience understand what we are talking about. And by that I mean a uninitialized shift register. -
NI Week was a blast and while there I got to mention a few things I was trying that I'd like to share with the community. One of them is this thing I'm calling a Multi Panel Interface (MPI). The code is rough around the edges, very rough. This is probably the least polished code I've posted in a long time but this code has been sitting in a half working state for a while, and if I took the time to clean it up, it might never be ready. So please be gentle, there's room for improvement but I think the basics are there. Now with that out of the way here's what I got. I wanted to make an interface similar to Veristand. I don't want to re-create the wheel when it isn't necessary but anyone who has worked with Veristand knows that there are quite a few limitations, and as a result I started developing a UI that is dynamic. So that controls and indicators can be added and setup in way that could be saved and loaded for different operator types. This would be setting and getting event based information from Actors running asynchronously. Implementation It is a publisher subscriber architecture. Here there are actors for each set of hardware we care to read from. Later we could talk about controlling Actors but for now lets just talk reading. So for example there maybe an Actor for CAN, Power Supply, AIO, DIO, FPGA, Real-Time (talking to another PC), UPS, etc. Each Actor has a functional global that describes what data it has for other panels to display. For the time lets call any data an Actor is publishing a "channel". An Actor will publish the channel data to user events, and in a global it will have the list of user events and their names so they can be subscribed to. The actual messaging system between the Actors and the Panels can be anything and in my demo I actually just have random numbers because the demo isn't meant to showcase the messaging it is meant to showcase the UI. UI The purpose of the demo posted is to show that a tabbed interface can be made, and be made semi-dynamically. There are 3 things to be defined to understand what is going on. The Parent VI, the Panel VI, and the Child VI. In the demo the Parent is the top level "Main.vi". Clicking the "Add" button will add a Panel VI which is a shell of a VI that has controls to minimize, pop out, and control menus to the Child. The Panel has a subpanel that contains the Child VI. The Child VI in this demo is only a graph showing random data. The Child VI is tied to the Panel VI using a subpanel. The Panel VI is tied to the Parent VI using Windows user32.dll function calls. The user can interact with the Child anyway the child defines. There is no right click override (like in Veristand) where you can no longer right click on a graph and get a menu. The Parent VI also has little restrictions. It is a normal VI with a menu bar which can be used for things like managing Panels. In the demo there is also tabs in the Parent. They are fake tabs in that there are 20 but the ones not being used are hidden. There are neat UI elements that are hard to describe in text. Things like docking/undocking Panels, minimizing Panels while docked or not, resizing Panels while docked or not, moving panels quickly and easily, renaming panels, intuitively adding tabs while moving panels. These are the basics that I didn't know if I could do so I did first. The messaging I described before is not difficult it just takes some time to define how Actors talk and how Panels subscribe to the data. I know there are some UI bugs. The biggest one that you'll notice is trying to move a Panel when docked will have some z-order issues with other Panels that are docked, but there are others. Code The actual code in the demo uses several pieces of code I've found. The parent child idea I originally saw in the Dynapanels demo. Then there are several user32 functions from the Windows API. Panel controls were from UI Panels. OpenG Array, Error, and Application Control is needed, I'm not sure if there are others. http://screencast.com/t/P9SJ1anR Please feel free to comment and use as you see fit. Just know I won't be supporting this as a real project. Multi Panel Interface.zip
-
LabVIEW 2013 Favorite features and improvements
hooovahh replied to John Lokanis's topic in LabVIEW General
That's very interesting. So I would guess (haven't tested yet) that any coding around we have done in past applications to improve performance, will continue to improve performance in 2013, but we may find that these improvements are no longer needed. Thanks. -
FGVs, Action Engines and DVRs: a rif on Nancy's NI Week presentation
hooovahh replied to Val Brown's topic in LabVIEW General
So I'm sure others have done this too, but when I get this type of AE I will usually wrap the functions into SubVIs so only the important terminals are being shown for that function and then inline the VI. So maybe Init will call the AE 3 times with different methods and using some but not likely all of the connector pane inputs. I'm pretty sure I saw this technique on JKI's blog at one point. I agree with your definitions, but I also agree with Shaun that the need for these different terms might not be necessary. I guess it should be directed to the audience you have. Some may know what a Functional Global is, and no clue what an AE is (Action Engine for those who don't). The different terms don't bother me too much because when talking to others about it, it rarely matters what kind of global is being used (as long as it isn't the native one), it just matters that we understand a non-re-entrant VI with uninitialized shift registers is keeping track of some data between calls. Also I'm curious, has anyone developed a tool to perform a search, for a specific VI, where it has an enum constant wired to a terminal, with a specific value wired to it? I don't think it would be too hard but if I want to find all the places this particular VI has had the "Write Data" method used I either have to find all calls to that VI and look for the constant, or find all places that "Write Data" appears in my code with a string search. -
This is great, but I have a home grown one that works with user events, and it works at run time as well. So I have one window that will show me the last N number of user events generated between my Actors, and can then display the data (using the Variant Probe). So if something goes wrong in the application I can see the chain of events that caused it. Neat but I think I will only use this on shutdown. It isn't very often that I find a queue of events pilling up that I would need this but it's nice to have. Neat again, but I don't think I'll need it. Possibly to flush away extra window resize events, as already mentioned but I doubt I'll need it. Finally. I posted on Lava a while ago when I found this "was not implemented". Finally. The ability to zoom a graph with the scroll wheel sounds like a feature that all graphs should have. Also when doing things like having a scrollbar not attached to a control you can now have more flexibility on what happens when a user scrolls on top of a cluster (it can then change the scrollbar value) All neat and I'm sure will help develop code faster. I never ran into this issue.
-
Feedback Requested: Daklu's NI Week presentation on AOD
hooovahh replied to Daklu's topic in LabVIEW General
This is very well possible (that I don't fully understand). If what you are saying is true then maybe the real reason I have a difficulty knowing the difference is I've never used a QMH the way you describe. Sometimes I start with a QMH template, but by the end I have what you described as an Actor. So I guess what I'm saying is I'm not sure I've ever used a QMH in an application, only an Actor. -
FGVs, Action Engines and DVRs: a rif on Nancy's NI Week presentation
hooovahh replied to Val Brown's topic in LabVIEW General
Semantics aside a FGV can have race conditions, just like a normal global. But a FGV gives me the ability to perform other functions, other then just read and write. Because I don't know how my applications needs will change in the future I never use native globals, and only FGV. Lets say I'm storing an array of values, well I can have my method on the FGV "Read" "Write" and "Average" a native global can't do this without extra code which isn't that big of a deal but I prefer this method. Other functionality that can be done is stuff like WORM. Where a global can only be written to once then it will generate an error if it is written to again. Many of the pitfalls of a native global exist in these other VIs, but allowing added functionality, and also adding other debugging tools helps to make sure you don't shoot your self in the foot. But it can still happen. -
Thank you for the clarification I knew there was some bug fix regarding how this was handled but I wasn't sure the specifics because I personally have that issue.
-
LabVIEW 2013 Favorite features and improvements
hooovahh replied to John Lokanis's topic in LabVIEW General
This is by far my favorite too. I missed your presentation because it was the same time as another and a tough decision was made. While web services are slick but I don't know if I will use them any time soon. And what about MyRIO? I know this is a new features of LabVIEW thread but why is a FPGA and dual core arm running linux real-time, with built in WiFi, and USB host for $500 not getting lots of attention (price was mentioned by NI but not confirmed yet) -
What if you want to reset the graph when the user resizes the window? Or right clicks on a control? Or. Double presses the escape key? How would you handle this without the event structure? The code you described is very common using the timeout case. The only thing I would do different (but isn't needed) is to set the timeout to 1ms, then use elapsed time to only update every 100ms. Any event generated will reset that timer so if a user spams the keyboard where the event structure handles key down, the timeout may never happen. This functionality slightly changed in 2013. I haven't tried it but I heard the timeout isn't reset with dynamic events anymore.