|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Using Tables in LabView.
Quote:
When you say time, what time are you referring to? Using the Get Tick Count VI on the Timing palette, you can get a sort of system time that you can use for relative timing applications, but the actual number may not mean anything in particular (I'm not sure where it would be getting accurate real world time from). You could expand off of this, for example storing the time you entered into autonomous mode, teleop mode, etc, you could get a sense of how long the match had been running for. If you're talking about reading in multiple sets of these values, i.e. in your array control, you can use a cluster for that. Just drag out a cluster control, put in some number controls or boolean controls (what ever you need), then drag the cluster into the array control. This will give you an array of these clusters. When you're reading them, index into your array, then use Unbundle to get at the individual values. Sorry if I've missed the point of your post. --Ryan |
|
#2
|
||||
|
||||
|
Re: Using Tables in LabView.
the way we wanted it to be was a table of values that could be displayed and edited in the front panel such as:
___|Start Time|__|X Value|___|Y Value|___|Lift pos|__|Door Pos|__ ------------------------------------------------------------------ 1__| 2500[ms] |__|__-1__|___|__+1__|___|up[true]|__|open[F]|__ ------------------------------------------------------------------ 2__| 7500_____|__|__0__|___|_-1____|___|up[true]|__|open[F]|__ ------------------------------------------------------------------ etc. but it would have to be dynamic in such a way that we can add several lines, up to at most 10, but also have as little as 1 line. as i said, this would be displayed on the front panel so we can say here is exactly what it will do at this point. we'd only be reading from these values and not from the DS or computer. the time i was talking about is the autonomous mode time which is kept track of by a get tick count in the DS vi's and fed through to the match info. thanks [edit] the switches i was referring to are a set of 5 switches on the driverstation which have already been coded to work but we're still stuck on getting the values into the function. Last edited by Burmeister #279 : 17-03-2009 at 22:38. |
|
#3
|
||||
|
||||
|
Re: Using Tables in LabView.
Sounds like what you want is in fact an array of clusters. Start by making a Cluster Control, then drag in three Numeric Controls and two boolean controls (switches of some sort). Give these appropriate labels, like the ones you described ("Start Time," "X Position," etc.). It may be helpful to physically arrange the controls in a horizontal line like you show, but this is not necessary.
Once you have made your cluster control, make an Array Control, then drag your Cluster Control into it. You can then show multiple elements in the Array Control by dragging on the corner to expand the control. Note that even though you have displayed multiple elements of the array, not all of them will necessarily be used; when they're grayed out, they are "empty" elements. You can then go in and fill in the data. If you need more elements than the array control shows, you can increment the index counter (the little box in the upper left corner of the control), which will change the range of elements of the array that are displayed. If ever you want to remove an element from the array (make it grayed out again), right click on it, and choose Data Operations>>Delete Element. You can also clear the entire array by using Data Operation>>Empty Array. To figure out how many elements have been inputted, just use the Array Size function in your code. For more info on arrays and clusters, see this page on NI.com --Ryan |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using Limit Switches in LabVIEW | VeedotJaydot | NI LabVIEW | 2 | 14-02-2009 16:01 |
| FOLLOWING the target using labview | psychomonkey | NI LabVIEW | 8 | 12-02-2009 07:42 |
| Using Run in Labview | cabbagekid2 | FRC Control System | 5 | 07-01-2009 13:05 |
| Using LabView to Teach Students.. | Sykan | NI LabVIEW | 1 | 22-09-2008 12:14 |
| Using the CMU cam in LabView | VeedotJaydot | Technical Discussion | 1 | 10-09-2008 16:39 |