Showing results for 
Search instead for 
Did you mean: 

problem to sort data in array

sorry im still new in Labview..can i know how do i change the mechanical action to switch?

0 Kudos
Message 31 of 50

To change the mechanical action of a boolean control context-click on the control and select Mechanical Action (near the bottom of the pop-up menu).  Switch when Pressed is probably the choice you want if you will be using locals.


Latch when Released is the default action for Stop and OK buttons because the switch setting returns to False when the switch is read by the program.  This makes it behave like a momentary switch.  Because of the way dataflow works, the Latch type actions cannot be used with local variables.



0 Kudos
Message 32 of 50


@icycool wrote:

i've tried it but didnt work..i make a local variable from loop 1 and connect it to stop at loop 2 and vise versa but still cannot


NO! No local variable needed here! Keep it simple!  Delete the stop button in the left loop and place the remaining stop button in its place. You don't need the terminal in the event loop.


The UI loop has an event structure and and event case for a value change on the stop button, thus there is no need to have any local variable there. You have one event case shared for "clear" and "stop", thus simply invert the "clear" and wire to the loop condition. Two possible cases:



  1. "Clear" was pressed. Inverting the "clear" causes a FALSE and the loop continues
  2. "Stop" was pressed. Thus clear is FALSE and inverting it give a TRUE to the loop condition and both loop stop. One directly, one via the event structure. Makes sense?
(Alternatively, you can make a unique case for "STOP: value changed" and use either a boolean TRUE constant or the "Newval" event terminal to stop the event loop)
In summary:
  • Ignore all misguided advice about adding local variables
  • Ignore all misguided advice about changing the mechanical action of the boolean.
Both simply complicate the code for no real benefit. Smiley Very Happy
Attached is a quick rewrite (LV 9.0).


LabVIEW Champion. It all comes together in GCentral GCentral
Message 33 of 50

oh i get it now..thanks a lot!

0 Kudos
Message 34 of 50


i need some help to change my vi (attached)

as u can see my current program looks like this - if 2byte receive is 1111 then the value after it will goes to 1111 column then if 2222 then it goes to 2222 column but i want to change it to be like this - i'll receive one frame containing 7bytes continuously, so then i want my program to make byte2 go to column 1111,byte4 to column 2222,byte6 to column 3333 and byte7 to column only need 4 data here..the received byte is in hex but i want it in decimal as it is put into the table

0 Kudos
Message 35 of 50

sorry for the trouble before

the problem is the received data i got is not like what i expecting i need to make some change to this vi

now i received continuous frame..each frame contain 7byte which is 7 different data..but im only want 4 data from this 7 which is byte2,byte4,byte6 and byte7..and i want it to be put into my table in decimal value

0 Kudos
Message 36 of 50

That seems like a trivial modification. What have you tried so far?

LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 37 of 50

yeah that maybe trivial for u but its hard for newbie like me..i try delete the ordered tags part and its connection but still cannot

0 Kudos
Message 38 of 50

attached is how the 7byte data received will looks like..and the manual for the data

so here i want my program to get the value of input voltage,input current,output voltage and temperature into the table each time i received it

really need ur help for this one

0 Kudos
Message 39 of 50

Renaming a bmp to jpg to get around the ban on posting bit maps is NOT appropriate.

0 Kudos
Message 40 of 50