LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can you write a time interval into the User Interface Timer?

Solved!
Go to solution

Using a Timer on a control panel, which triggers a callback function to sample data.  I'd like to read a numeric input from the user interface panel, and then set that value as the Timer interval.  But how do you write to the Timer interval?  The obvious function does not seem to work,

  SetCtrlVal (panelHandle, PANEL_TIMER, SampleSeconds);

0 Kudos
Message 1 of 4
(3,228 Views)

Hello - 

 

You'll want to use SetCtrlAttribute:

 

SetCtrlAttribute (panelHandle, PANEL_TIMER, ATTR_INTERVAL, SampleSeconds);

 

NickB

National Instruments 

0 Kudos
Message 2 of 4
(3,224 Views)
Excellent!  Can you direct me to a reference that shows the various attributes associated with functions?  I see that I can scroll the drop-down box in the function panel, but it has every parameter for every function, not just those pertaining, for example, to a Timer.  Thanks again.
0 Kudos
Message 3 of 4
(3,222 Views)
Solution
Accepted by topic author Sandia_Mike

Probably the best place to start is with the top level help for the control you're interested in.   I usually just go to the index tab in the help, start typing the name of the control (timer in this case) and then pick the top level help topic.  From here, you can see the attributes you can use, the events you can capture, programming concepts, etc.

 

 NickB06-15, 13_47_32.png

 

NickB

National Instruments 

Message 4 of 4
(3,220 Views)