03-18-2018 06:08 PM
Hi friends, i want to know if it is possible to avoid wires in labview, what i mean is to place a label where the wire starts and another label where the wire finishes, like in the pcb's schematic software , this is to be more neat and to avoid the wires going all over the block diagram.
Image as example attached.
Thanks in advance for your time.
03-18-2018 06:27 PM
Yes you can, but in general you shouldn't.
In LabVIEW the wire is the variable. Controls set the value. Indicators show the value.
If you are having trouble with wire issues, you are not using the language correctly.
steve
03-18-2018 07:11 PM
I've used other "semi-graphical" languages that work exactly as you diagram. Give me Wires any time! You don't have to "search for" or "guess" where the data are going, whether there is one destination or several. But if this design seems right to you, please feel free to define a new "wireless" language (I predict it will have no more than 5 users world-wide ...).
Bob Schor
03-18-2018 07:21 PM
I forgot to add:
Show us some code where this is a problem for you.
We can probably give you some alternatives.
steve
03-18-2018 08:42 PM
Thank you very much all of you for the answers, i just asked this in order to have a more neat diagram, but if it is not a built in LabView feature to separate wires with labels, i think i will leave it as i already organized it.
Image attached to show exactly what i asked to do.
Thanks again for your time.
03-18-2018 09:12 PM - edited 03-18-2018 09:14 PM
You need to learn LabVIEW. You need to learn to not use Local Variables, but to use Shift Registers. You need to learn to use For Loops and Case Statements.
Have you spent any time with the LabVIEW Tutorial material mentioned on the first page of this Forum? Have you "paid attention", and tried to use the principles it illustrates?
Bob Schor
P.S. -- if you had attached the VI (instead of a picture of part of the Block Diagram), we might have been able to show you a better way ...
03-18-2018 09:46 PM
Could you give some reasons not to use local variables ? i don't understand why you say that, if they exist i think is to use them, i do know how to use shift registers, but in this case i consider easier to use local variables. thanks for your time.
03-18-2018 10:03 PM
Attach the VI (instead of a picture of part of the Block Diagram) so that we can edit it and show you (since you haven't learned the problems involved with overuse of Local Variables, among other things).
Bob Schor
03-18-2018 10:15 PM
@MaxiBarac wrote:
Could you give some reasons not to use local variables ?
1. Race conditions - you get weird answers because the read and write process can happen in a random order.
2. Forces values to be on the front panel, adding to memory and CPU resources to redraw the control/indicator.
3. Prevents the compiler from being able to make optimizations.
4. Makes the code harder to read.
03-18-2018 10:25 PM
This feels like a Tag Team, where Bob and I take turns beating up on you, but we're just trying to help.
Two things to learn: LabVIEW basics (like data flow) and use of arrays.
This is more what your diagram should look like (minus proper Icons).
This is based on guessing that what you are doing with the Boolean references makes sense.