10-03-2006 04:22 AM
Joyeux Anniversaire Darren !
10-05-2006 08:05 AM
Adding to Darren's wish list...
I would like to see a new test added to the VIA that looked for multiple writers of Locals and Globals. More thatn one writer gives a warning.
In the distant future I'd like LV to help enforce the single writer idea by allowing only one writer of of a global by default. Attempts to change to write would give a similar warning and remind the developer where the other writing of the globla is happening.
Ben
10-05-2006 08:08 AM
... and LV offers to automatically replace all the instance of the global with a FGV
Ben a écrit:In the distant future I'd like LV to help enforce the single writer idea by allowing only one writer of of a global by default. Attempts to change to write would give a similar warning and remind the developer where the other writing of the globla is happening.
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
10-05-2006 12:27 PM
@TiTou wrote:
... and LV offers to automatically replace all the instance of the global with a FGV
But an FGV is not inherently any less prone to race conditions than a global. You have to add locking to it or place the functionality inside it to prevent race conditions. It does give better memory performance at the price of speed. I really wish that people would stop automatically thinking of FGVs as the automatic solution to all the world's problems.
And yes, I remember that I didn't finish with the globals thread in the BP. Shame on me...
10-05-2006 12:58 PM
Right tst, nothing is perfect and we should use the most appropriate technique. Yes, many people, including myself, automatically think of FGV which is not always appropriate. Who's perfect ?
tst a écrit:
But an FGV is not inherently any less prone to race conditions than a global. You have to add locking to it or place the functionality inside it to prevent race conditions. It does give better memory performance at the price of speed. I really wish that people would stop automatically thinking of FGVs as the automatic solution to all the world's problems.
And yes, I remember that I didn't finish with the globals thread in the BP. Shame on me...
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
10-05-2006 12:59 PM
But an FGV is not inherently any less prone to race conditions than a global. You have to add locking to it or place the functionality inside it to prevent race conditions. It does give better memory performance at the price of speed. I really wish that people would stop automatically thinking of FGVs as the automatic solution to all the world's problems.
Exactly the conclusion I came up with when I was trying to fix a pre-existing, large application of ours with a multitude of race conditions all over the place. That was definitely a buggy test station app when I started on it. It has 6 parallel loops in the main block diagram if that gives you any idea for the race condition potential. It would intermittently hang and do a handful of other weird things, so the operator of the station definitely wasn't happy. Talk about getting thrown into a major coding situation cold turkey (as a freshly certified CLAD). I finally got the majority of the race conditions taken care of by simply changing things around so there was only 1 writer for each global.
- Brad
10-06-2006 07:45 AM
Darren asked
"
"
Well this is ont exactly what you wished for but its close!
Aristos Queue posted in post #102 of this thred on the LV site
http://forums.lavag.org/index.php?showtopic=1576&pid=17521&st=90&#entry17521
The following
"
But... from LV7.0 forward...
After you drop the string control, type for a while. When the string reaches the max width that you want, hit shift+Enter. Keep typing. The string will now wordwrap at the current width, and grow vertically. When you reach the maximum desired height, hit shift+Enter again. The vertical scrollbar will appear and the string will now scroll instead of growing any further.
Sorry... the trick doesn't work on free labels. Perhaps someday...
"
I just verified this for a LV 7.1 string constant on the diagram.
So can we check-off one of your wish-list items?
Ben
10-06-2006 08:14 AM
I would say no. To use a comment when the auto tool is on, all you need to do is double click the diagram and start typing. To use a string you need to find the string constant on the palette. Therefore, this would only really be useful when it is available for comments as well.
@Ben wrote:
"...Sorry... the trick doesn't work on free labels. Perhaps someday..."
...
So can we check-off one of your wish-list items?
10-06-2006 08:39 AM
Hi tst,
You bring up an intersting point.
I went to the VI Checklist
http://zone.ni.com/reference/en-XX/help/371361A-01/lvdevconcepts/checklist/
to try to find the note that said that if you are entring a lot of comments, that it is recomended that you use a string constant with the scroll bar showing. Well it appears that note has been deleted. So what used to be good is now bad. I would not care about that kind of hair splitting if I didn't have to pass a test every couple of years.
Ben
10-06-2006 08:51 AM
@Ben wrote:
After you drop the string control, type for a while. When the string reaches the max width that you want, hit shift+Enter. Keep typing. The string will now wordwrap at the current width, and grow vertically. When you reach the maximum desired height, hit shift+Enter again. The vertical scrollbar will appear and the string will now scroll instead of growing any further.