Quote:
Originally Posted by Burmeister #279
as for the problem, could either of you show me an image or vi that i could use as a base for developing this system. i want to read time, x and y value [or right and left] and at most two boolean inputs. Thanks again for the help.
|
Apologies if I'm a bit dense, but where do you want to read these inputs from? If these are settings you're trying to read in from the DS, you can read x and y axes and buttons from the joystick the same way you normally would, but I'm not sure that would work the best for mode switches, usually I'd go for something more persistent, like toggle switches and pots connected to the digital and analog inputs on the side of the DS. I can give you instructions on how to hook these up if this is what you want.
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