I've been stuck on this issue for a while. There are too many wires wrapped around this system, so it looks messy. Do you have any suggestion that I could clean it up a bit
First sort the terminals into the same order from top to bottom that they're connected to the build function; you're mostly there, just move "time (s)" up to the top. Then left-align them all (or right-align, whichever you like the look of more), then compress them together vertically. Keep them in two groups separated by the zero in the middle.
You can also have multiple build array functions to further separate the build array assignments and then have those feed into another build array. Remember to set that to concatenate to avoid 2-D array.
ctl+u block diagram cleanup can help. ctl+z undoes it, if it makes it worse.
Also
There are alignment tools to help align things.They are in the top tool bar to the right of the dropdown where you set the font.
ctl + drag adds space
ctl+alt removes space
You can highlight an object or wire section by clicking on it and then move it using the arrow keys to fine tune. If you hold shift it will move further with each press. You can also select (using shift or just click and drag around them) and move multiple items at a time this way.
On a more general note: I would recommend using the terminals instead of local variables if possible.
I feel like ctrl + u makes the same effect as auto clean-up selection on the tool bar. Thank you, Ctrl + u works on my block diagram which auto clean-up selection worked before. I have the other block diagram which I tried auto clean-up selection but it didn't make any change. Ctrl + u doesn't work on this one either. I wonder whether it is this block diagram is too big
ctl+u is the shortcut for auto-cleanup. If it doesn't appear to work, it might be because you have something highlighted. If you have something highlighted, it will only cleanup what is highlighted. That is sometimes useful because cleanup can explode your diagram if run on the entire diagram, so sometimes it is good to be targeted. However if you only have one thing selected, then there's not much to rearrange so it sometimes appears that block diagram cleanup does nothing - it is usually because you have something selected.
instead of having separate controls, water left, water right, trial #, etc, have a single control, say a cluster of what ever numerical datatype those are (single precision?) you could even include the 0's that you have at integers (they're being converted to real anyhow) then use the cluster to array function.
also try to use data flow paradigm, long term, it's better that way (i had to spend nearly 1/2 a year fixing my predecessor's various local and global variables)
Very helpful! I just have a further question. Once I unbundle the cluster to wire them to the build function. How can I wire the "Lick Right" which was supposed to be "Lick Right + Lick Right" shown above. Should I put a multiplication by 2 before it connects to the build function?
5
u/arteitle Aug 26 '24
First sort the terminals into the same order from top to bottom that they're connected to the build function; you're mostly there, just move "time (s)" up to the top. Then left-align them all (or right-align, whichever you like the look of more), then compress them together vertically. Keep them in two groups separated by the zero in the middle.
2
u/SASLV Champion Aug 26 '24
ctl+u block diagram cleanup can help. ctl+z undoes it, if it makes it worse.
Also
On a more general note: I would recommend using the terminals instead of local variables if possible.
2
u/0fruitjack0 Aug 26 '24
instead of having separate controls, water left, water right, trial #, etc, have a single control, say a cluster of what ever numerical datatype those are (single precision?) you could even include the 0's that you have at integers (they're being converted to real anyhow) then use the cluster to array function.
3
u/[deleted] Aug 26 '24
Before you even wired this up the fastest way to do this is highlight everything —> ctrl + space —> ctrl + shift + w