cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

mouse down help

Im trying to create a program so that when the next button is pressed, the gui then reads the next line on my excel sheet for the standard. Im having trouble with the mouse my down functioin for this.

0 kudos
Mensaje 1 de 19
4.977 Vistas

What trouble are you having?  Give us some details at to what it is doing and how it is different from what you want.

 

Looking at your code.  I see your Next button is set for Switch Until Released.  That is almost certainly the wrong action.  You probably want Latch When Released.

 

And since it is a Boolean button, you should set the Event to be Next:Value Changed  rather than Next:Mouse Down.

0 kudos
Mensaje 2 de 19
4.967 Vistas

What happening is that when i click next, it does not change the standard as written in excel, instead it keeps whichever standard it starts with. What I would like for it to do is each time next is clicked, the standard, as written in excel, is read and used by labview.

0 kudos
Mensaje 3 de 19
4.945 Vistas

Where does your VI evenget data from Excel?  Nothing in your VI shows this.

 

Perhaps it is buried in one of the subVI's you didn't include?

0 kudos
Mensaje 4 de 19
4.933 Vistas

Please show us where excel and file IO happens. I cannot find it.

 

Your VI is full of race conditions and very convoluted code.

  • To get one row of a 2D array, reshaping it to a 1D array with the lenght of one row seems pointless. All you need is "index array" with one index disconnected.
  • You have a case structure with the same property nodes in all case frames, thus they belong after the case, only on instance needed each.
  • There are plenty of potential race conditions. For example the boolean "standard" is read (via value property) and written in parallel elsewhere to the terminal.
  • How do you know what happens first?
  • Getting a scalar from an array does not need a detour via dynamic data ("Numeric", after the small FOR loop). try 
  • index array"
  • In the "next: mouse down" event, all you need in the second frame is the "menu" local variable. wire it to the output if the +1 from the previous frame.
  • ...
0 kudos
Mensaje 5 de 19
4.915 Vistas

My apologies for the confusion, I haven't put my comments in the code yet. The excel data is read from the first subvi on the outside of the while loop

0 kudos
Mensaje 6 de 19
4.885 Vistas

Since you didn't include the subVI's, we can't look into them.

0 kudos
Mensaje 7 de 19
4.881 Vistas
0 kudos
Mensaje 8 de 19
4.875 Vistas

The only part of the code that operates on the array coming from that subVI, isn't influenced by the menu number at all.  It is only affected by whether the "Standard" boolean is True or False, and will either give Row 1 or Row 2 of the array coming in.

0 kudos
Mensaje 9 de 19
4.867 Vistas

What do I need to do to make it read line by line?

0 kudos
Mensaje 10 de 19
4.852 Vistas