Jump to content

Really big Connector Pane on your Front Panel


Recommended Posts

  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

QUOTE(tcplomp @ Oct 17 2007, 02:18 PM)

The uhm, event structure (most likely you need to dynamically register for the user's application.

It's a private event (so you need the scripting keys)

Ton

Can you post a simple example vi with this in it.

The detection of the active vi or the one the user last operated on is the big sticking point with stability. Stability got worse when I moved it to 8.5

When you say scripting keys do you mean the 7.1 INI keys or

the 8.0 and beyond version?

Link to comment

My Fixer would handle your points in the following Ways

QUOTE(PJM_labview @ Oct 17 2007, 06:46 PM)

On the Fixer there is a "Select All Controls" button that will select all controls on the front panel.

QUOTE(PJM_labview @ Oct 17 2007, 06:46 PM)

2) Best attempt at connection will do the following (in order of priority):
  • Connect error clusters
    (if present) to lower left and lower right respectively (regardless of the connector pane pattern).

  • If
    references
    are present (like ref in, ref out),
    connect
    them on the
    upper left and upper right
    respectively.

  • Connect
    any
    control/indicator pair
    having the same name pattern (ex: data in; data out or data in; data dup)
    at the same level
    on the connector pane respectively on the left and right side.

  • Connect
    the
    remaining controls like they are mimicking
    the connector pane (see example below).

The fixer doesn't differentiate types of controls from each other but this could be added. You would have to add the following modules to get this to work.

Identify controls and pairs of controls by type (Error clusters, Refs) and by Label names.

Define pair wiring and rules (Top corners, bottom corners, across edges) This get tricky if the pattern is not a constant.

Apply these rules instead of doing a wire by position. It get really complicated if you try to do both.

Create a way for the user to select rules and pairs.

Not trivial but doable

QUOTE(PJM_labview @ Oct 17 2007, 06:46 PM)

Since the Fixer depends on the user selecting the controls that are to be wired if it is not selected it is not wired.

QUOTE(robijn @ Oct 18 2007, 02:46 AM)

Wow this looks fantastic !

Thanks, this tool has saved me a lot of time what usually takes 3 minutes I can do in 20 seconds. I think the biggest benefit is that I create more subvis in my code. The fear of making a SubVI and then spending non value added time cleaning it up is greatly reduced.

QUOTE(martin@aerodynamics @ Oct 18 2007, 07:07 AM)

What I miss is someting like an Abort button to keep the old connetor pane...

Can you explain in more detail what you mean? What is it you want to Abort?

The "Use Current Wiring" button doesn't change the wiring or the pattern. Then if you use the "Arange & Cleanup" button only the FP will change. An example would be when you make a cluster bigger and it overlaps with other controls on the FP. This method also works when it is eaiser to manually wire instead of moveing controls around.

Mark

Link to comment

QUOTE(PJM_labview @ Oct 17 2007, 04:46 PM)

1) That makes things easier. Moving unconnected controls offscreen seems like an unfriendly step to have to take, but I don't like the extra step of needing to select only the controls I want either.

2) Combining these rules with also mimicking the connector pane is quite difficult. Like Mark said, you would want to use one or the other. Besides, would you really place the error clusters at the top of the FP if you were connecting them to the bottom terminals? Unless you can define ALL of your connections via naming/class rules, I think the FP needs to at least roughly mimic the connector pane layout.

QUOTE(martin@aerodynamics @ Oct 18 2007, 05:07 AM)

What I miss is someting like an Abort button to keep the old connetor pane...

If you were referring to my tool, you can Undo it. After hitting done, just hit Ctrl-Z. Keeping the original connector pane if controls are wired is a different option that I haven't explored.

QUOTE(mballa @ Oct 18 2007, 11:19 AM)

Mark,

This tool seems more like an entire toolbar. :thumbup: I was already thinking about toolbars, and Ton's link to his http://forums.lavag.org/VI-activation-event-t3534.html' target="_blank">toolbar ideas reminded me that where it would be best to combine efforts is to work on a Development Time toolbar. Plugin tools and all. I mean this would be a perfect starting point of a Coding Challenge. Provide a toolbar framework and challenge people to come up with really neat tools to put in there. There was some brief mention of an OpenG toolbar, but nothing came of that. Anyway, I will make another thread to continue this discussion.

To coalesce efforts on the arranging and wiring of controls to the connector pane, I have a thought. It is cumbersome to require controls to be placed in exact bins like my tool requires. It is also cumbersome to put in placeholder decorations like your tool requires. Are there any novel ideas on how to take some Front Panel with controls and make 'intelligent' terminal assignments? I think some arrangement is necessary as a building point. But what is an 'easy'? requirement for this arrangement to allow terminal assignments without requiring much extra work on the part of developers?

Link to comment

QUOTE(Michael_Aivaliotis @ Oct 18 2007, 03:57 PM)

I have an idea. Should we move this thread and other potential CR candidates to a special "CR in-development" area to better facilitate this? I think there is enough momentum here to justify this. After a bunch of thrashing, we can produce some decent CR code. Thoughts?

I like that. It means you can get feedback on an idea before spending all the time polishing it up -- that you then change when you get new ideas from others.

:thumbup: :thumbup:

Link to comment

QUOTE(JDave @ Oct 18 2007, 11:19 PM)

Well building the toolbar alone is a Coding Challenge, and a big one.

I did mine in LV8 but without XControls or SubPanels so their should be something to gain and LVOOP might definitely help. But still I'd only go for that if I got a free SSP for 5 years.

QUOTE(Michael_Aivaliotis @ Oct 19 2007, 12:57 AM)

I have an idea. Should we move this thread and other potential CR candidates to a special "CR in-development" area to better facilitate this? I think there is enough momentum here to justify this. After a bunch of thrashing, we can produce some decent CR code. Thoughts?

Nice, but I had the same ideas when I started working with Yen on the Code Capture Tool but you end up in mailing the same stuff around.

I couldn't keep it clean anymore so I moved it to Sourceforge.net That is where such stuff can sit nice and easily and you can do the development in a decent way.

So maybe Forum with Subversion/CVS support ;)

Ton

Link to comment

Ton, I took you vi and wraped it in a while loop. I ran it and opened and closed vis and could not get the event to fire.What am I missing.

post-584-1192768917.png?width=400

QUOTE(Michael_Aivaliotis @ Oct 18 2007, 05:57 PM)
I'm up for it also. I would like to see a few more people commit to it before we move foward.QUOTE(tcplomp @ Oct 18 2007, 11:21 PM)

So maybe Forum with Subversion/CVS support
;)
Ton

Now that would be very cool :thumbup:QUOTE(JDave @ Oct 18 2007, 04:19 PM)

ideas reminded me that where it would be best to combine efforts is to work on a Development Time toolbar. Plugin tools and all. I mean this would be a perfect starting point of a Coding Challenge. Provide a toolbar framework and challenge people to come up with really neat tools to put in there. There was some brief mention of an OpenG toolbar, but nothing came of that. Anyway, I will make another thread to continue this discussion.

I like the tool bar Idea.QUOTE(JDave @ Oct 18 2007, 04:19 PM)

To coalesce efforts on the arranging and wiring of controls to the connector pane, I have a thought. It is cumbersome to require controls to be placed in exact bins like my tool requires. It is also cumbersome to put in placeholder decorations like your tool requires.

Just to clarify it is not required that you place a decoration on the FP. You only need to use one as a place holder if the fixer doesn't wire the connector pane like you expected. Then all you have to do is double click on the FP and hit a key and you have your place holder I don't see what is cumbersome about that.

Link to comment

QUOTE(mballa @ Oct 19 2007, 07:09 AM)

Mark,

Here's the code I used and copied into the project folder:

post-2399-1192772485.png?width=400

Download File:post-2399-1192772496.vi

Be aware that the VI is Auto-run!

I get a changing VI title for every VI I click.

The App.MenuLaunch items (App and VI) are only valid once! per menu-click, so you might need a Functional global.

Ton

Link to comment

QUOTE(tcplomp @ Oct 19 2007, 12:43 AM)

Mark,

Here's the code I used and copied into the project folder:

post-2399-1192772485.png?width=400

Download File:post-2399-1192772496.vi

Be aware that the VI is Auto-run!

I get a changing VI title for every VI I click.

The App.MenuLaunch items (App and VI) are only valid once! per menu-click, so you might need a Functional global.

Ton

Thats interesting it still doesn't work for me. I don't have the scripting keys enabled and I see my property node it a different color than yours.

So is it true that I have to have the keys enabled to run the vi. That wasn't true for the 7.1 stuff.

If this is the case I will not be able to use this function. I bring this tool with me when I work on clients machines and I'm not going to put the scripting on it.

Link to comment

QUOTE(tcplomp @ Oct 19 2007, 12:43 AM)

Mark,

Here's the code I used and copied into the project folder:

post-2399-1192772485.png?width=400

Download File:post-2399-1192772496.vi

Be aware that the VI is Auto-run!

I get a changing VI title for every VI I click.

The App.MenuLaunch items (App and VI) are only valid once! per menu-click, so you might need a Functional global.

Ton

Thats interesting it still doesn't work for me. I don't have the scripting keys enabled and I see my property node it a different color than yours.

So is it true that I have to have the keys enabled to run the vi. That wasn't true for the 7.1 stuff.

If this is the case I will not be able to use this function. I bring this tool with me when I work on clients machines and I'm not going to put the scripting on it.

Link to comment

QUOTE(mballa @ Oct 18 2007, 10:09 PM)

Just to clarify it is not required that you place a decoration on the FP. You only need to use one as a place holder if the fixer doesn't wire the connector pane like you expected. Then all you have to do is double click on the FP and hit a key and you have your place holder I don't see what is cumbersome about that.

Not cumbersome as in difficult, but as in an extra step. But I suppose if the auto connecting isn't what you expected, you have to do some additional step regardless. Hmmm... I will think about it some more.

Link to comment

QUOTE(mballa @ Oct 18 2007, 10:09 PM)

Just to clarify it is not required that you place a decoration on the FP. You only need to use one as a place holder if the fixer doesn't wire the connector pane like you expected. Then all you have to do is double click on the FP and hit a key and you have your place holder I don't see what is cumbersome about that.

Not cumbersome as in difficult, but as in an extra step. But I suppose if the auto connecting isn't what you expected, you have to do some additional step regardless. Hmmm... I will think about it some more.

Link to comment

QUOTE(JDave @ Oct 17 2007, 09:23 PM)

I worked on mine for about three days, so I am not surprised. I will need to look at the updated version to get some more ideas :thumbup: . Maybe there is some good room to combine efforts.

It is under the <Application> option in the Event Sources box when you add an event to the event structure.

Ton - I have not needed to register for any app ref. In LV8+ there is a field for the App Ref of the activated VI.

It seems the event works Application wide and not Application instance as I would have thought...

Dave:

Your Auto-Connector Pan crashes LabVIEW on a clone.... :thumbdown:

Ton

Link to comment

QUOTE(tcplomp @ Oct 23 2007, 03:25 AM)

Dave:

Your Auto-Connector Pan crashes LabVIEW on a clone.... :thumbdown:

Why are you trying to change the connector pane on a clone? :rolleyes:

Honestly, I hadn't tried to filter out invalid file types. I am working on a new version and I will include that. Thanks.

David

Link to comment

I added my second version to the original post. The new version filters out invalid VIs, avoiding any crashing. There is also the option to scale the connector pane to the current window size.

The biggest change is I modified the algorithm for fitting the controls to terminals. Rather than checking if the control position is within the box, I check which terminal box the control is mostly in. So if a control covers more than one box, it is assigned to the terminal box that has the largest intersection with the control's bouding rectangle.

This is definitely a different paradigm than looking at the relative spacing of the controls. But it is intuitive and easy to follow. (Put the control in the box.) However, I find it is not as flexible as using relative spacing. If you have large clusters or arrays, or you are shrinking your front panel down for subVIs that have few controls, it becomes difficult to always put things in the box.

I had fun making this little tool, but I don't know whether it fits the needs of developers more than something like the relative spacing tool that Mark Balla has shown in this thread. If you think my tool fits your workflow, reply here and I will work towards getting it in the Code Repository.

Link to comment
  • 1 month later...
Link to comment
  • 11 months later...

QUOTE (PJM_labview @ Oct 19 2007, 05:27 PM)

Mark,

Try this VI (LV8.5). This does work with and without the ini keys (I just tested it). It is pretty much the same that Ton post, except it does not use event registration.

post-121-1192810879.png?width=400

Notes:

  • The VI Activation provide the app instance, so no need to launch it from any place special.
  • To be able to see this event (to create it in the event structure) you have to enable the ini keys.
  • Since (I believe) the Navigation Window is using this event to find out which VI has the focus, it has to work on every machine, regardless of the ini keys.

Download File:post-121-1192810815.vi

PJM

Hi, PJM, and how to enable the ini keys? add what? append to LabVIEW.ini file? help to tell, many thanks @!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...

Important Information

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