LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Questions on Xontrol--How to update the state and data

Hello, everyone. I am new to use the XControl. I don't understand how the program in the facade update the "state" and "Data" after we click the button. I cannot do that, please give me some help on the XControl.

 

My vi is in the attachment.

Message Edited by McArthur on 03-24-2010 02:19 AM
Working...
0 Kudos
Message 1 of 6
(3,118 Views)

Several things don't make a lot of sense. I would recommend you study the shipping example (look for dual mode thermometer in the example finder).

 

 

  • You seem to not even use the "data", but increment the "state". Wouldn't it be more reasonable to use the data?
  • There is a primitive for "+1", no need for the "1" diagram constant.
  • You seem to work with integers, so use an integer (blue) numeric instead of floating point (orange) representation for the data.
  • When you modify data or state, you need to update the action cluster to indicate that fact.
  • Your boolean button terminals should be inside their respective events so they properly get read and reset.
  • I would use "value changed" instead of "mouse up" events.
 
 
Can you explain in a few words what the xcontrol is supposed to do. What is the functionality?
Looking at the code gives no real obvious hints to me. 😉 

 

Message 2 of 6
(3,107 Views)

You should set the Action.State Changed? boolean:

 

Ton

 

Message Edited by TCPlomp on 24-03-2010 08:51 AM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 3 of 6
(3,100 Views)

Thank you both of you!

The example is just a dummy, not really make sense.

Now I understand the reason why the state can not update, because I didn't do as TCPlomp mentioned. It seems working now....Smiley Happy

Working...
0 Kudos
Message 4 of 6
(3,089 Views)

McArthur wrote: 

Now I understand the reason why the state can not update, because I didn't do as TCPlomp mentioned. It seems working now....Smiley Happy


 

 
 I mentioned this too, however without a pretty picture. 😉
 
quote: 
 
  • When you modify data or state, you need to update the action cluster to indicate that fact.
 

McArthur wrote: 

The example is just a dummy, not really make sense.


 

  
The example is really quite good and shows these things too as well as many other important points. Please try to fully understand it. 
 
I would strongly advise you to also look at my other suggestions. You still haven't explained the purpose of the xcontrol. I am still curious. 😉 
0 Kudos
Message 5 of 6
(3,066 Views)

Thank you both of you, ! I mentioned about you.Smiley Happy

Yes, the other points are very good. Thank you very much....

Message Edited by McArthur on 03-25-2010 07:29 AM
Working...
0 Kudos
Message 6 of 6
(3,055 Views)