10-12-2017 12:32 PM
you understand i point.
when i change boolean array with button its not working. i did this because i have to put shared variable in place of these button.
Thanks,
10-12-2017 01:04 PM
Use a case structure (no event structure) and poll the variable. Execute the case (containing my above inner code) whenever the boolean array differs from the previous state.
10-12-2017 01:18 PM
You need to be very careful, for example your array diagram constant still has hidden elements (container size != array size), so you need to delete those. It is better to show the last unused element (see picture) to make sure).
Here's what I meant with the polling of the values.
10-13-2017 12:45 AM
Thanks dear
i changed little in code then its not working.
can you make it correct ?
as i am not expert in labview 😞
10-13-2017 03:19 AM
Asif138 wrote:i changed little in code then its not working.
Well, change it back 😄
10-13-2017 03:27 AM
Well, your blue array constant has too many elements. Since you are only looking at two switches, there should only be 3 element.
Your current array has an impossible transition where you need to turn one off and the other on in one step, which is not feasible. You should be able to figure out what the three values should be. *try 11,01, 00)
So you are trying to make so the order of the "20" switch does not matter? Why? Did the specifications change? Can you give it a more descriptive label?
(And please don't maximize the front panel to the screen. That's very annoying!)
10-14-2017 07:25 AM
Thank KNIGHT OF NI
You are genius!
now its working.
Thanks again
10-14-2017 09:43 AM - edited 10-14-2017 11:39 AM
Not, it is not working. I told you that you need to check the array size. Just resizing the container does NOT change the array size. If you make the container larger, you can see that it contains four elements. You need to delete the fourth! See image.
Currently, if you turn one of the LEDs on and off first, you can never get the desired result. (e.g. try dock on, dock off, dock on, unlock on, 20 on. Should be unlocked but is not! Two 00 in a row can never occur again, because the array only gets updated when one changes.)
10-14-2017 11:57 PM
Brilliant! it is now working as i want. but truly i dont understand its working step because i am expert of Labview. i just know very basic.
Thanks Bro
10-15-2017 10:44 AM - edited 10-15-2017 10:45 AM
@Asif138 wrote:
Brilliant! it is now working as i want. but truly i dont understand its working step because i am expert of Labview. i just know very basic.
Thanks Bro
Click on the light bulb to enable execution highlighting, then run the VI. Besides it being really fun to watch all the dots go 'round, it is pretty good education in what happens in your LabVIEW block diagram. Exceptions are when you need to see things happen in real time (including, but not limited to, instrument communications), or you have parallel processes going on.