LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with checkbox and run the get button event continuously

Hi all,

I have a checkbox list of 3 sensors. I have used the X-Control (for checkbox) found in the following link for my application https://decibel.ni.com/content/docs/DOC-30558. I have problems to achieve the following.

  • Suppose i check Vibration and Strain, I should be able to display both Vibration and Strain data. (I should compare each element of 1d array with the string constant and run the case structure).
  • I have to run the GET event continuously to display the data. 

I have attached the code to the post.

Please can anyone suggest how to go about this.

 

thanks in advance

Regards,
KM
0 Kudos
Message 1 of 8
(3,054 Views)

i figured out the first issue. Its working fine. 

How do i run the GET event continuously?

Regards,
KM
0 Kudos
Message 2 of 8
(3,034 Views)

That's something a TimeOut Event can be used to accomplish.  Set the TimeOut to the period you want to have the values update (say, 100 for 10 times/second).  Within the Get case, take the three booleans that currently go to the Case Statements and bring them out and put them into Shift Registers.  Put the three Case Statements in the TimeOut loop and wire the appropriate Shift Register to their input.  Done.

 

Bob Schor

Message 3 of 8
(3,019 Views)

@KevinKM wrote:

I have used the X-Control (for checkbox)


There's your first problem.  Okay I'm partially joking.  XControls have huge limitations and making them scalable, and modular is very difficult, usually taking way more time to make them and work with them then it is worth.

 

I'm sure you've gotten used to using the XControl but take a look at this post I did showing how to have similar functionality in a listbox, multicolumn listbox, and tree.

 

https://decibel.ni.com/content/docs/DOC-42155

Message 4 of 8
(2,999 Views)

Hi 

I tried using the approach you mentioned. I cant run continuously. I am not able to figure out where i am going wrong. I have attached the updated vi. 

 

Hi 

 

 

 

Regards,
KM
0 Kudos
Message 5 of 8
(2,974 Views)

For my method to work, you need to maintain the integrity of the data on the Shift Register -- it is serving as a "memory", and if the exit tunnel from the Event structure is "Use Default if Unwired" (which it is in most cases, including the Timeout case), this is equivalent to "Forget what I said".  The only time the line should "break" is in the Get Event, when you (re)-set it.

 

BS

0 Kudos
Message 6 of 8
(2,945 Views)

Hi BS,

I dont quiet understand what you mean. Can you be more clear about what i am supposed to do to get over this. I dont understand your last sentence.

Regards,
KM
0 Kudos
Message 7 of 8
(2,934 Views)

Updated my link to include a 2011 version. 

 


@KevinKM wrote:

Is OpenG necessary for this? 


Not if you want to reinvent the wheel.

Message 8 of 8
(2,921 Views)