?? c1f7921e-a17b-2cea-8fd7-5650ed2bbe9b.htm
字號:
?<html xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><head><title>Position Property </title><link rel="stylesheet" type="text/css" href="../styles/presentation.css" /><link rel="stylesheet" type="text/css" href="ms-help://Hx/HxRuntime/HxLink.css" /><script type="text/javascript" src="../scripts/EventUtilities.js"> </script><script type="text/javascript" src="../scripts/StyleUtilities.js"> </script><script type="text/javascript" src="../scripts/SplitScreen.js"> </script><script type="text/javascript" src="../scripts/ElementCollection.js"> </script><script type="text/javascript" src="../scripts/MemberFilter.js"> </script><script type="text/javascript" src="../scripts/CollapsibleSection.js"> </script><script type="text/javascript" src="../scripts/LanguageFilter.js"> </script><script type="text/javascript" src="../scripts/CookieDataStore.js"> </script><meta name="file" content="c1f7921e-a17b-2cea-8fd7-5650ed2bbe9b" /><xml xmlns:msxsl="urn:schemas-microsoft-com:xslt"><MSHelp:Attr Name="AssetID" Value="P:Phidgets.ServoServo.Position" /><MSHelp:Keyword Index="A" Term="P:Phidgets.ServoServo.Position" /><MSHelp:Keyword Index="A" Term="frlrfPhidgetsServoServoClassPositionTopic" /><MSHelp:Keyword Index="K" Term="Position property" /><MSHelp:Keyword Index="K" Term="ServoServo.Position property" /><MSHelp:Keyword Index="F" Term="Position" /><MSHelp:Keyword Index="F" Term="ServoServo.Position" /><MSHelp:Keyword Index="F" Term="Phidgets.ServoServo.Position" /><MSHelp:Attr Name="TopicType" Value="apiref" /><MSHelp:Attr Name="TopicType" Value="kbSyntax" /><MSHelp:Attr Name="APIType" Value="Managed" /><MSHelp:Attr Name="APILocation" Value="Phidget21.NET.dll" /><MSHelp:Attr Name="APIName" Value="..Position" /><MSHelp:Attr Name="Locale" Value="en-us" /><MSHelp:Attr Name="Abstract" Value="Gets or sets the position property of the servo motor." /></xml></head><body><script type="text/javascript">var store = new CookieDataStore('docs');registerEventHandler(window, 'load', function() { var ss = new SplitScreen('control', 'main'); selectLanguage(store.get('lang')); });</script><div id="control"><span class="productTitle">A Sandcastle Documented Class Library</span><br /><span class="topicTitle">Position Property </span><br /><div id="toolbar"><span id="chickenFeet"><a href="d4648875-d41a-783b-d5f4-638df39ee413.htm">Namespaces</a> ? <a href="9332f00d-a9eb-15d0-fa45-c524653f1513.htm">Phidgets</a> ? <a href="f944b485-10f3-06ba-63b8-2824a0249cbe.htm">ServoServo</a> ? <span class="selflink">Position</span></span><span id="languageFilter"><select id="languageSelector" onchange="var names = this.value.split(' '); toggleVisibleLanguage(names[1]); lfc.switchLanguage(names[0]); store.set('lang',this.value); store.save();"><option value="CSharp cs">C#</option><option value="VisualBasic vb">Visual Basic</option><option value="ManagedCPlusPlus cpp">Visual C++</option></select></span><script>var sd = getStyleDictionary(); var lfc = new LanguageFilterController();</script></div></div><div id="main"><span style="color: DarkGray"> </span><div class="summary">
Gets or sets the position property of the servo motor.
</div><div class="section"><div class="sectionTitle" onclick="toggleSection(this.parentNode)"><img src="../icons/collapse_all.gif" /> Declaration Syntax</div><div class="sectionContent"><table class="filter"><tr class="tabs" id="syntaxTabs"><td class="tab" x-lang="CSharp" onclick="st.toggleClass('x-lang','CSharp','activeTab','tab'); sb.toggleStyle('x-lang','CSharp','display','block','none');">C#</td><td class="tab" x-lang="VisualBasic" onclick="st.toggleClass('x-lang','VisualBasic','activeTab','tab'); sb.toggleStyle('x-lang','VisualBasic','display','block','none');">Visual Basic</td><td class="tab" x-lang="ManagedCPlusPlus" onclick="st.toggleClass('x-lang','ManagedCPlusPlus','activeTab','tab'); sb.toggleStyle('x-lang','ManagedCPlusPlus','display','block','none');">Visual C++</td></tr></table><div id="syntaxBlocks"><div class="code" x-lang="CSharp"><pre><span class="keyword">public</span> <a href="http://msdn2.microsoft.com/en-us/643eft0t" target="_blank">double</a> <span class="identifier">Position</span> { <span class="keyword">get</span>; <span class="keyword">set</span>; }</pre></div><div class="code" x-lang="VisualBasic"><pre><span class="keyword">Public</span> <span class="keyword">Property</span> <span class="identifier">Position</span> <span class="keyword">As</span> <a href="http://msdn2.microsoft.com/en-us/643eft0t" target="_blank">Double</a></pre></div><div class="code" x-lang="ManagedCPlusPlus"><pre><span class="keyword">public</span>:
<span class="keyword">property</span> <a href="http://msdn2.microsoft.com/en-us/643eft0t" target="_blank">double</a> <span class="identifier">Position</span> {
<a href="http://msdn2.microsoft.com/en-us/643eft0t" target="_blank">double</a> <span class="keyword">get</span> ();
<span class="keyword">void</span> <span class="keyword">set</span> (<a href="http://msdn2.microsoft.com/en-us/643eft0t" target="_blank">double</a> <span class="parameter">value</span>);
}</pre></div></div><script type="text/javascript">
var st = new ElementCollection('syntaxTabs');
var sb = new ElementCollection('syntaxBlocks');
lfc.registerTabbedArea(st, sb);
st.toggleClass('x-lang','CSharp','activeTab','tab');
sb.toggleStyle('x-lang','CSharp','display','block','none');
</script></div></div><div class="section"><div class="sectionTitle" onclick="toggleSection(this.parentNode)"><img src="../icons/collapse_all.gif" /> Value</div><div class="sectionContent">The current position of the selected motor.</div></div><div class="section"><div class="sectionTitle" onclick="toggleSection(this.parentNode)"><img src="../icons/collapse_all.gif" /> Return Value</div><div class="sectionContent">The current position of the selected motor.</div></div><div class="section"><div class="sectionTitle" onclick="toggleSection(this.parentNode)"><img src="../icons/collapse_all.gif" /> Remarks</div><div class="sectionContent"><p>Note that since servo motors do not offer any feedback in their interface, this value is simply whatever the servo was last set to. There is no way of determining the position of a servo that has been plugged in, until it's position has been set. Therefore, if an initial position is important, it should be set as part of initialization.</p><p>The range here is -23 - 232, each corsponding aproximately to an angle in degrees. -23 corresponds to a PWM of 0, which means that the motor is not being driven at all, and so can be freely rotated. Note that most servos will not be able to operate accross this entire range. Typically, the range might be 25 - 180 degrees, but this depends on the servo.</p></div></div><div class="section"><div class="sectionTitle" onclick="toggleSection(this.parentNode)"><img src="../icons/collapse_all.gif" /> Exceptions</div><div class="sectionContent"><table class="exceptions"><tr><th class="exceptionNameColumn">Exception</th><th class="exceptionConditionColumn">Condition</th></tr><tr><td><a href="8edb365f-379f-1439-651c-18f12eafc13e.htm">PhidgetException</a></td><td>If this Phidget is not opened and attached, or if the index is out of range.<br /></td></tr></table></div></div><p><div id="footer"> </div>Assembly: Phidget21.NET (Module: Phidget21.NET) Version: 2.1.3.23</p></div></body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -