- Popular Post
-
Posts
947 -
Joined
-
Last visited
-
Days Won
39
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by jcarmody
-
-
I added a menu to the Tree to facilitate expanding & contracting. This has got to be it for today or I'm just going to get annoying...
- 1
-
I have a couple of comments:
- I think that using system controls would look a lot better than 3D control
- Instead use this (because the ">" and "<" are only needed if you have SubMenu(s))
CaseSelector : My_Menu_Tag
- Additionally, it is recommend that you use some meaningful tag, so replace "My_Menu_Tag" by "Case_Selector_Tag" for example.
Done, thanks for the feedback.
* I'd get rid of the big "OK" button
* It would be nice if the vertical scroll bar would auto-hide itself if it is not needed
Done. I had added the OK button because I had always considered it bad practice to stop your program that way; it wasn't in the early versions. I agree though, it is nicer without it.
- 1
-
Vell, Zaphod's just zis guy, you know?
-
Done.
Fixed issue where letting go of the scroll bar inside the tree acts the same as a selection. I didn't like that behavior.
- 2
-
[...] Maybe not today, maybe not tomorrow, but soon.
"I'm saying it because it's true. Inside of us, we both know you belong with TestStand. It's part of your workflow, the thing that keeps production going. If that project leaves the ground and you're not with TestStand, you'll regret it. Maybe not today. Maybe not tomorrow, but soon and for the rest of your life." Casablanca
- 1
-
A very nice improvement! Here are more suggestions:
- Its window should be set to "floating"
- It should run as an asynchronous process -- it should not close its front panel after the user double-clicks on a value (you should probably invoke it with the VI.Run method so that it doesn't block the Right-Click Framework)
- It should allow multiple instances -- make it reentrant so that I can use to work on two Case Structures at the same time.
- It should make sure that the user actually clicked on a named cell (using the PointToRowColumn method) -- it is currently treating a double-click on the tree node expander ([+]/[-]) as a frame selection.
Cheers,
Done. I've changed from double to single-clicking and I couldn't see how to make the PointToRowColumn do what you suggested, but I've implemented the same effect.
Now, how about some constructive criticism on my coding/style? Please? Thanks!
- 1
-
Hey Jim,
[...]
- How about using a listbox (or tree) instead of a 1D array of strings?
I've updated it to use a tree control. It indents states based on the presence of "-------" in the state name (ala JKI State Machine) assuming that these are section headers. Everything between them will be indented from the previous header and structures without this format will be presented without indenting anything. I also made it require a double-click to select a state so it would still be possible to expand/contract sections. The position of the scroll bar is persistent between calls (for the same Case Structure), but all sections are always presented expanded.
- 2
-
I had this problem, too, but THOUGHT I had it licked.
I checked the llb and it looks Ok. There's obviously something wrong, but I haven't figured it out yet. I found another problem to fix - it won't select the first item in the list. I'll keep trying...
-
I can think of a couple additional features and usability improvements. For example:
- How about using a listbox (or tree) instead of a 1D array of strings?
- The window should be resizable and the list should auto-grow with the window (this might not be possible with 1D array)
- I used a Table with only one column visible (because it scrolls with the mouse wheel and the Array indicator didn't). A colleague suggested using a Tree but I didn't know how it would apply to a non-JKI State Machine Case Structure. I'll probably add the functionality to handle both, at least until the rest of the world is converted. This was my first plug-in and I wanted to understand the process before trying to get fancy.
- The window is resizable w/auto-grow (unless I botched that part of the llb, too).
PS - JKI has considered creating some "helper tools" for the JKI State Machine. You might even see some demos at/around NIWeek that will BLOW YOUR MIND (I just had my mind blown this morning by some prototype stuff I saw).Alas, but I won't be at NIWeek. Is one of the helper tools, perhaps, the ability to right-click on the queue wire and insert an Add States To Queue? I'm going to do that if nobody else beats me to it. It'd probably be a good exercise for me.
Also, I've added this to the List of Community RCF Plugins.Cool, thanks. Will I be able to update that when I fix the problem François had? (I had to copy/paste from his signature to get that "c" with the "5" underneath...)
- 1
-
I installed it and got problems. The RCF couldn't be used anymore without restarting it once I used your plugin. I think it doesn't like the continuous monitoring.
How do you use it? Do you have the same problem I've seen?
I had this problem, too, but THOUGHT I had it licked. There's a sub VI that presents the list and waits for a user input it never gets because the Front Panel never shows. I resolved the issue by setting the VI Properties to open & close the front panel as appropriate. It may be that an old copy made it into the zip file; I'll know more tomorrow when I get to the office in the morning (I'm currently restoring my laptop from a series of unfortunate events).
I changed my approach and am not polling as I mentioned in the other thread. This one pulls the first element from the array of selected objects and tests to see if it's a Case Structure. If it is, it sends an array of frame names to the sub VI mentioned above. This has an event structure that waits until you select a state then returns the index to the RCF VI (which sets the VisibleFrame property).
Thanks for trying this. I'll fix it tomorrow, but I think all it needs is the VI Property change.
-
- Popular Post
- Popular Post
[...] My next step is to make this into a RCF plug-in.
Here it is. Unzip the contents into [LabVIEW]\resource\JKI\RCF\Plugins\CaseSelector
Use: select a Case Structure, apply the RCF Menu Activation Keys, right-click and select CaseSelector. A resizable list will be presented with the selected structure's cases. Select one of the cases, the list will disappear and the selected case will be brought to the front.
I'll certainly use this functionality, but I may prefer to put a VI in the LabVIEW project folder (so I can have the list persist as a floating dialog).
So. Is this anything that you'd use or do I have a unique situation?
- 3
-
Would the Mouse Up event be a good time to check if a Case Structure has been selected instead of constant polling? I can think of no ways to select a case structure other than with a left-click or a "mouse down-drag-mouse up" combination. (unless selected programmatically of course).
Doh! Duh... Thanks.
I think I slapped my head too soon. I'm trying to detect that a Case Structure was selected in another VI so I need to detect an event at the Application level, no?
-
Would the Mouse Up event be a good time to check if a Case Structure has been selected instead of constant polling? I can think of no ways to select a case structure other than with a left-click or a "mouse down-drag-mouse up" combination. (unless selected programmatically of course).
Doh! Duh... Thanks.
-
Polling...bummer. I really wish they would give us a mouse scroll event!
I'm doing this as part of the work associated with this post. I wonder if I can detect that a Case Structure has been selected by some method other than polling. I'd still have to poll to handle scrolling through the long lists.
This sounds like a topic for another post on the VI Scripting forum... I'll try to figure it out myself first.
-
I started my LabVIEW life hating Auto Grow; I don't know why or when, but I started using it again a while ago. Anyway, now I only hate it when I'm pasting or typing into a string control near the edge of a structure. I think the only thing I like it for is when I'm trying to clean up my BD - it keeps me honest when resizing.
-
What event are you using to trigger this code?
None, it's in the timeout case (which is also polling to see if a case structure is selected).
-
-
Isn't this how computer viruses began?
-
I've updated this with Jim's input, changed the way it closes and set the array indicator to resize with the panel.
- 2
-
Thank you. My next step is to make this into a RCF plug-in. I'd like to take it on this weekend, but I'm getting a PHD today and might not have free time. (In my case, a PHD is a Post Hole Digger - I'm building a fence to keep my chickens from wandering the neighborhood.)
- 1
-
hi bro i need help how to save graph and text to word?
tanx b4
Do you have the Report Generation Toolkit? You already asked this question here.
-
Hi, I don't understand if something going wrong here:
(120+1)*1100=2028
Can't be true...
It's not a joke.
Don't use a U16 to hold that a number that large (or it'll wrap around as you're seeing).
- 1
-
I've developed software for two ATEs with the JKI State Machine and have found myself with very many states to cover all of my requirements. I wasn't comfortable with this at first so I posted a question on the JKI forum. Anyway, I wrote a tool that builds an array of the states (in the last Case Structure selected - it polls and acts if the only selection is a CS). There's a vertical scroll bar to speed up the process of scrolling through the list and double-clicking on any item will bring the corresponding state to the front.
I'm almost satisfied, but there are two things I don't like about it. First, it uses ObjHighlite to bring the case to the front and I don't like having it flash. How else can I do this? Second, the case structure is selected at the end of the process. How can I deselect it?
Thanks,
Jim
Note: don't download/use this file - better stuff is further along this thread.
- 2
-
... The problem with using "-aristos" is that AQ has posted some great info about queues, and I don't want to filter that out.
You can use the Advanced search and specify "Search titles only". This'll miss anything that pertains to queues but isn't titled as such, but it's pretty good.
state machines with very many states
in VI Scripting
Posted
In that case, here's another iteration.
CaseSelector.zip