LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
sth

Cleanup Diagram with option for symmetric terminals

Status: New

Diagram cleanup has become my friend lately.  It doesn't do a great job but it is adequate to make th code readable and moving each terminal to remove as many kinks as possible just gets too time consuming.

 

However, I do a diagram clenup, look at the results and then go around option-clicking to swap terminals on symmetric inputs and then cleanup again.  The diagram cleanup code should consider this option and optimize the terminal inputs.

 

By symmetric terminals I mean the whole host of primitives where the input order does not matter, addition, multiplication, Max/Min, Equals?, Not Equal?.  This would remove a whole bunch of wire crossings that are very annoying and make code hard to read.  Even "Bundle by name" would be amenable to this cleanup optimization.

 

If you really want a challenge, this could also be applied to the Compound arithmetic node but the "negate this input" would move as the input is reassigned.

 

(If this has been impelemented post LV 12, "never mind" as Emily Litella used to say)

LabVIEW ChampionLabVIEW Channel Wires

14 Comments
P@Anand
Trusted Enthusiast

I am not able to understand the idea clearly, can you please show an image about your idea?

-----

The best solution is the one you find it by yourself
sth
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast

Here is a simple diagram that shows the issue. This is “cleaned up” as best LV 12 can do it. 

 

 

However, now option click the terminals on the top addition icon to interchange them. Run cleanup again. This is a better diagram with less wire crossings.

 

 

The addition is a symmetric operator and the output does not change if you interchange the inputs. Here is the diagram “cleaned up” with the inputs swapped.  See, less wire crossings! So in the cleanup optimizer this would score a better value but the optimizer does not try this option.

LabVIEW ChampionLabVIEW Channel Wires

altenbach
Knight of NI

Your images don't show.

sth
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast

Thanks Christian. I am really fed up with freakin' lithium! I don't know what mutant monkeys coded this system but it is a piece of junk.

 

When I click the add comment at the bottom of the comments. I can't paste graphics into my text. I can in the rest of the forums. But here, nothing. When I went back to edit my message, suddenly I could paste graphics and when I edited my post then the graphics showed up just fine on my work computer when I was in my office this morning. Now at home (short days on weekends!) I don't see the graphics either.

 

Let me see if I can recreate them. It is a stupid trivial picture. Create a VI with crossed wires with 3 inputs to two addition primitives. Cleanup will not swap inputs to keep from crossing wires. It should. I will paste these if possible.

 

[EDIT|]   NOT ONLY THAT BUT WHEN POSITING ORIGINALLY LITHIUM REMOVES ALL THE LINE BREAKS MAKING THINGS UNREADABLE.  Line breaks re-instated with this edit.

LabVIEW ChampionLabVIEW Channel Wires

sth
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast

Posting a new comment...

 

Editing to add graphic, (now allowed in edit mode)

 

Weird, I can see the graphic just fine, but when I reload the page, it then gives the missing symbol.

 

LabVIEW ChampionLabVIEW Channel Wires

sth
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast

Here are the two images…. Not optimal

 

Screen Shot 2014-07-05 at 3.32.26 PM.png

 

And optimized, now with less wire crossings.  But I had to manually swap the wires on the top addition primitive.

Screen Shot 2014-07-05 at 3.32.48 PM.png

 

I sure hope these show up this time.

 

LabVIEW ChampionLabVIEW Channel Wires

RavensFan
Knight of NI

When you just paste a graphic into the editor, you can see them because they exist on your hard drive.  But we can't see them.  You can't see them at home.  You need to actually attach the images to your message, or use the Graphic button on the toolbar to actually get the images to upload to your gallery so they are in a publically available location for everyone to be able to see.

sth
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast

But when using the "add a comment" button at the bottom of a thread here, there is no editing tool bar to attach an image.  Only when I edit a previously made comment do I get the tool bar that allows attaching an image.

 

Further, pasting images should be disabled if it isn't working and uploading from the edit window.  It seems to be completely disabled in the comment window but the edit previous comment window allows it.

 

Why the process comment does not upload the files?  They don't really exist on my hard drive since they were only in temporary storage on my clipboard.  Pasting them into the window created a temporary file but then it did not upload?

 

If I can get the toolbar to display then I can upload the image after the annoying step of saving it to the desktop.  Anyway the important thing is a tweak to the cleanup diagram.

LabVIEW ChampionLabVIEW Channel Wires

RavensFan
Knight of NI

No.  That is one flaw with the Idea exchange that you can't attach a file to the message.

 

But you can still use the "Tree" button on the toolbar and use the first tab inside that which uploads the image you pick to your Image Gallery.

X.
Trusted Enthusiast
Trusted Enthusiast

You will have to get used to the fact that NI programmers are mischievious and nothing gives them more kicks that swapping inputs, crossing wires and blowing up diagrams. Once you'll understand this, you'll treat this as a built-in game and will only use it for recreational purposes.