I'm having trouble with the two VI:s I have attached. In the testorder VI I can add a number (1,2,3 or 4) to my order_array by pressinf the buttons on the front panel. The global variabel "delete_element_0" deletes the number that is located at index 0 in my order_array. The second VI, testshovel.vi, is a simple state machine with two states where the first state, "wait", includes a button "Delete element at index 0" that will execute the "empty" state which will set the global variabel "delete_element_0" to True. The button I have used in the default state "Delete element at index 0" is selected as "latch when pressed" and this wotks great. Now the problem I have is that not only the first element at index 0 in my order array is deleted, they all are... Now I know that this is beacuse when I set my global variable to True it stays True all the time. This will of course make delete the number at index 0 in my order array until there are no numbers left. How can I solve this ? I want to set my global variable to True and then when it is read by labview it should go back to False, this way only one nu number in my order array will be deleted. I have tried to use the same mechanical action that I used with my button called "Delete element at index 0" but it appears that it doesn't matter what kind of mechanicak action I choose. Can anyone help me ? Could it be possible to get it to work as the program is written today or do I have to change anything ?
regards
Daniel Holmqvist