02-24-2020 12:33 PM
Yes, there are multiply communication in the program.
There are top.vi and 8 async called vi's. Some vi's have 2 loops (parallel paths).
Again, I don't have an issue. I want to hide Com port information from top.vi. Also parallel paths increase complicity but not so much.
02-24-2020 12:44 PM
@Vasilich2004 wrote:
Yes, there are multiply communication in the program.
There are top.vi and 8 async called vi's. Some vi's have 2 loops (parallel paths).
Again, I don't have an issue. I want to hide Com port information from top.vi. Also parallel paths increase complicity but not so much.
I am not talking about parallel execution paths in general. This is a major strength of LabVIEW. Applications I work on have dozens, if not hundreds of parallel tasks all running together. (Very large, distributed, network messaged based system). What I am specifically saying can and generally will be very problematic is parallel tasks communicating with the same device. Your device is serial based and it should only have a single task communicating with it. You can easily run into race conditions and contention if you have multiple tasks all competing for a single serial port. This raises a red flag for me.
02-24-2020 01:11 PM
@Vasilich2004 wrote:
Again, I don't have an issue. I want to hide Com port information from top.vi.
Still am unclear what you want, but if you just don't want a wire, use a FGV, global, etc.
mcduff
02-24-2020 01:19 PM
Global isn't good idea to use.
FGV (functional global variable) is very-very bad idea.
02-24-2020 01:23 PM
I am going to quote Bob here,
@Bob_Schor wrote:
I give up. I don't understand what you are trying to do, but see that you really want to "do it your way". The problem is that I don't have a clear understanding of the whole Project, so don't know how the various piece fit together.
Bob Schor
You pptx doesn't help any. Good luck.
mcduff
02-24-2020 01:24 PM
@Vasilich2004 wrote:
Global isn't good idea to use.
FGV (functional global variable) is very-very bad idea.
While I generally don't use global variables or FGV often, they are not necessarily a "very-very bad idea". They are useful if you have some piece of information that gets initialized once and is needed in many places within your code. They can also be used effectively when there is only a single writer and multiple readers. They can be easily misused and abused. But they do have their uses at times.
02-24-2020 01:53 PM
They can also be used effectively when there is only a single writer and multiple readers.
Never say NEVER!
FGV brings headache like leak memory.
02-24-2020 01:56 PM
@Vasilich2004 wrote:
They can also be used effectively when there is only a single writer and multiple readers.
Never say NEVER!
FGV brings headache like leak memory.
Ok, you win. You're right and I'm wrong. I think like others I am done here. I feel like I am talking to a wall and that you really aren't looking for advice.
02-24-2020 02:23 PM
02-24-2020 02:46 PM
@Vasilich2004 wrote:
Sorry Mark. I really apologize. I didn't want to make YOU feel unhappy.Also I appreciate for You and other people about some news in this topic.
Apology accepted. I'm just trying to offer advice after decades of experience. I'm fortunate to work on a team very committed to employing the best software development practices available and keeping current with the latest state of the art SW engineering practices.