04-16-2010 03:05 AM
I have been searching a way to create a strict property note for a whole day, and yet still can not get the answer.
I have download a Vi from the Ni website, but my lab computer can not open it, So i open it with my lab-top, and trying to duplicate it in the lab computer.
After i have done it, when i try to run the VI, an error come out say that
"Boolean ''stop": Boolean latch action is incompatible with local variables."
Then i check for the difference with the original one, the only difference is that the property node of the original one is a strict property type, and the one. when i am trying to do the same thing for the duplicated one, i can not find the way.
So, i try to search for the answer, something like this come out
"Conversely, a strictly typed refnum does contain the data type for the object that it points to. You can change between weak and strict refnums by right clicking on the refnum (or its terminal in the block diagram) and selecting "Include Data Type" for strict and deselecting it for a weak typed refnum. "
but when i right click all the icons show in the block diagram, i didn't see any "include data type come out".
attached is the picture of the diagram.
Why is that when i try to create the same property: value as in the picture using the lab computer, and the color of the "value" will appears to be purple when what i expected should be green for the boolean value.
Solved! Go to Solution.
04-16-2010 03:16 AM
The error you are getting is telling you that the boolean control is set to Latch Action. You need to change it to a Switch Action.
To do this, go to the boolean control on your Front Panel, right click it with the mouse and select a one of the top three Switching Action from the Mechanical Action list of six action types.
The reason for this is that a Latching switch is cleared when read by the terminal on a block diagram, but having used Local Variables in your code you are now reading the control from more than one place. Therefore the boolean needs to be set to Switch, whereby it will retain it's setting after being read to ensure that all Local Variables will see the correct value.