📄 4.2.3 取样方式.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0058)http://www.ekany.com/wdg98/cg/contents/chapter4/les423.htm -->
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD><TITLE>4</TITLE>
<META http-equiv=Content-Type content="text/html; charset=GB2312">
<META content=FrontPage.Editor.Document name=ProgId>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<META content="Microsoft Word 9" name=Originator><LINK
href="les423.files/filelist.xml" rel=File-List><LINK
href="les423.files/editdata.mso" rel=Edit-Time-Data><!--[if !mso]>
<STYLE>v\:* {
BEHAVIOR: url(#default#VML)
}
o\:* {
BEHAVIOR: url(#default#VML)
}
w\:* {
BEHAVIOR: url(#default#VML)
}
.shape {
BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]--><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>zlj</o:Author> <o:Template>Normal</o:Template> <o:LastAuthor>zlj</o:LastAuthor> <o:Revision>1</o:Revision> <o:TotalTime>2</o:TotalTime> <o:Created>1999-04-16T02:56:00Z</o:Created> <o:LastSaved>1999-04-16T02:58:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Company>CSCIMS</o:Company> <o:Lines>1</o:Lines> <o:Paragraphs>1</o:Paragraphs> <o:Version>9.2812</o:Version> </o:DocumentProperties></xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:PunctuationKerning/> <w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery> <w:Compatibility> <w:SpaceForUL/> <w:BalanceSingleByteDoubleByteWidth/> <w:DoNotLeaveBackslashAlone/> <w:ULTrailSpace/> <w:DoNotExpandShiftReturn/> <w:AdjustLineHeightInTable/> <w:UseFELayout/> </w:Compatibility> </w:WordDocument></xml><![endif]-->
<STYLE>@font-face {
font-family: 宋体;
}
@font-face {
font-family: 楷体_GB2312;
}
@font-face {
font-family: @宋体;
}
@font-face {
font-family: @楷体_GB2312;
}
@page {mso-page-border-surround-header: no; mso-page-border-surround-footer: no; }
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin: 42.55pt; mso-footer-margin: 49.6pt; mso-paper-source: 0; layout-grid: 15.6pt; }
P.MsoNormal {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify; mso-style-parent: ""; mso-pagination: none; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt
}
LI.MsoNormal {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify; mso-style-parent: ""; mso-pagination: none; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt
}
DIV.MsoNormal {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify; mso-style-parent: ""; mso-pagination: none; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt
}
H3 {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 16pt; MARGIN: 13pt 0cm; TEXT-INDENT: 21.25pt; LINE-HEIGHT: 173%; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify; mso-fareast-language: EN-US; mso-pagination: lines-together; mso-fareast-font-family: 楷体_GB2312; mso-font-kerning: 1.0pt; mso-style-next: 正文; mso-outline-level: 3; mso-layout-grid-align: none
}
P.MsoBodyTextIndent {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; FONT-FAMILY: 宋体; TEXT-ALIGN: justify; mso-fareast-language: EN-US; mso-pagination: none; mso-font-kerning: 1.0pt; mso-layout-grid-align: none; mso-hansi-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"
}
LI.MsoBodyTextIndent {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; FONT-FAMILY: 宋体; TEXT-ALIGN: justify; mso-fareast-language: EN-US; mso-pagination: none; mso-font-kerning: 1.0pt; mso-layout-grid-align: none; mso-hansi-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"
}
DIV.MsoBodyTextIndent {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; FONT-FAMILY: 宋体; TEXT-ALIGN: justify; mso-fareast-language: EN-US; mso-pagination: none; mso-font-kerning: 1.0pt; mso-layout-grid-align: none; mso-hansi-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
P.MsoDocumentMap {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; BACKGROUND: navy; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify; mso-pagination: none; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt
}
LI.MsoDocumentMap {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; BACKGROUND: navy; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify; mso-pagination: none; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt
}
DIV.MsoDocumentMap {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; BACKGROUND: navy; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify; mso-pagination: none; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt
}
DIV.Section1 {
page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1029"/></xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=ZH-CN style="TEXT-JUSTIFY-TRIM: punctuation; tab-interval: 21.0pt"
vLink=purple link=blue>
<H3 style="TEXT-INDENT: 0cm"><FONT face=楷体_GB2312 size=4><SPAN
style="mso-fareast-language: ZH-CN"><SPAN lang=EN-US>4.2.3 </SPAN><SPAN
style="FONT-FAMILY: 楷体_GB2312; mso-fareast-language: ZH-CN; mso-ascii-font-family: 'Times New Roman'">取样方式</SPAN></SPAN><SPAN
lang=EN-US style="mso-fareast-language: ZH-CN"><o:p></o:p></SPAN></FONT></H3>
<P class=MsoBodyTextIndent><SPAN style="mso-fareast-language: ZH-CN"><FONT
face=楷体_GB2312
size=4>一旦对一台或多台设备设置了取样方式,立即就可以进行数据输入,而不必等待程序中的输入语句。如操纵杆已被置成在取样方式下的定位设备,则操纵杆的当前位置坐标立即就被存储起来,如操纵杆的位置在变化,就立即用当前的坐标来代替以前位置的坐标值,当应用程序一遇到取样命令,就把相应物理设备的值作为取样数值。设置定位设备为取样方式的命令是:<SPAN
lang=EN-US><o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoBodyTextIndent><SPAN lang=EN-US><FONT face=楷体_GB2312
size=4>sample_locator(ws,device_code,x,y)<o:p></o:p></FONT></SPAN></P>
<P class=MsoBodyTextIndent style="TEXT-INDENT: 0cm"><SPAN
style="mso-fareast-language: ZH-CN"><FONT face=楷体_GB2312
size=4>对其他逻辑设备设置为取样方式的命令都与此类似。<SPAN
lang=EN-US><o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoBodyTextIndent style="TEXT-INDENT: 0cm"><SPAN lang=EN-US
style="mso-fareast-language: ZH-CN"><FONT face=楷体_GB2312 size=4><![if !supportEmptyParas]><![endif]> <o:p></o:p></FONT></SPAN></P>
<P class=MsoBodyTextIndent style="TEXT-INDENT: 0cm"><SPAN lang=EN-US
style="mso-fareast-language: ZH-CN"><FONT face=楷体_GB2312 size=4><!--[if gte vml 1]><v:shapetype id=_x0000_t75 coordsize = "21600,21600"
o:preferrelative = "t" o:spt = "75" filled = "f" stroked = "f" path =
" m@4@5 l@4@11@9@11@9@5 xe"><v:stroke joinstyle =
"miter"></v:stroke><v:formulas><v:f eqn =
"if lineDrawn pixelLineWidth 0 "></v:f><v:f eqn = "sum @0 1 0 "></v:f><v:f eqn =
"sum 0 0 @1 "></v:f><v:f eqn = "prod @2 1 2 "></v:f><v:f eqn =
"prod @3 21600 pixelWidth "></v:f><v:f eqn =
"prod @3 21600 pixelHeight "></v:f><v:f eqn = "sum @0 0 1 "></v:f><v:f eqn =
"prod @6 1 2 "></v:f><v:f eqn = "prod @7 21600 pixelWidth "></v:f><v:f eqn =
"sum @8 21600 0 "></v:f><v:f eqn = "prod @7 21600 pixelHeight "></v:f><v:f eqn =
"sum @10 21600 0 "></v:f></v:formulas><v:path o:extrusionok = "f"
gradientshapeok = "t" o:connecttype = "rect"></v:path><o:lock aspectratio="t"
v:ext="edit"></o:lock></v:shapetype><v:shape id=_x0000_i1029
style="WIDTH: 326.25pt; HEIGHT: 133.5pt" type = "#_x0000_t75" coordsize =
"21600,21600"><v:imagedata o:title="4-2-2" src =
"./les423.files/image002.gif"></v:imagedata></v:shape><![endif]--><![if !vml]><img width=435 height=178src="les423.files/image002.gif" v:shapes="_x0000_i1029"><![endif]><o:p></o:p></FONT></SPAN></P>
<P class=MsoBodyTextIndent
style="TEXT-INDENT: 80pt; mso-char-indent-count: 8.0; mso-char-indent-size: 10.0pt"><FONT
face=楷体_GB2312 size=4><!--[if gte vml 1]><v:shapetype id=_x0000_t202 coordsize =
"21600,21600" o:spt = "202" path =
" m0,0 l0,21600,21600,21600,21600,0 xe"><v:stroke joinstyle =
"miter"></v:stroke><v:path gradientshapeok = "t" o:connecttype =
"rect"></v:path></v:shapetype><v:shape id=_x0000_s1028
style="MARGIN-TOP: 5.2pt; Z-INDEX: 1; LEFT: 0px; MARGIN-LEFT: 0px; WIDTH: 171pt; POSITION: absolute; HEIGHT: 23.4pt; TEXT-ALIGN: left; mso-position-horizontal: left; mso-position-vertical: absolute"
type = "#_x0000_t202" coordsize = "21600,21600" stroked = "f"><v:textbox
style="MARGIN-TOP: 4.281pt; LEFT: auto; MARGIN-LEFT: 7.937pt; WIDTH: 156.625pt; TOP: auto; HEIGHT: 16.187pt"><![if !mso]>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD><![endif]>
<DIV>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图</SPAN><SPAN
lang=EN-US style="FONT-SIZE: 9pt"> 4.2.2 </SPAN><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">采样方式的工作过程</SPAN></P></DIV><![if !mso]></TD></TR></TBODY></TABLE><![endif]></v:textbox><w:wrap
type = "square"></w:wrap></v:shape><![endif]--><![if !vml]><img width=230 height=33src="les423.files/image003.gif" align=left hspace=12alt="文本框: 图 4.2.2 采样方式的工作过程" v:shapes="_x0000_s1028"><![endif]><SPAN
lang=EN-US
style="FONT-SIZE: 10pt; mso-fareast-language: ZH-CN"><o:p></o:p></SPAN></FONT></P>
<P class=MsoBodyTextIndent style="TEXT-INDENT: 0cm"><SPAN lang=EN-US
style="mso-fareast-language: ZH-CN"><FONT face=楷体_GB2312 size=4><![if !supportEmptyParas]><![endif]> <o:p></o:p></FONT></SPAN></P>
<P class=MsoBodyTextIndent style="TEXT-INDENT: 0cm"><SPAN lang=EN-US
style="mso-fareast-language: ZH-CN"><FONT face=楷体_GB2312 size=4><![if !supportEmptyParas]> <o:p></o:p></FONT></SPAN></P>
<P class=MsoBodyTextIndent><SPAN style="mso-fareast-language: ZH-CN"><FONT
face=楷体_GB2312 size=4>采样方式的工作过程如图<SPAN
lang=EN-US>4.2.2所示。在采样模式输入过程中,程序和输入设备分别同时运行。输入设备不断地产生数据,并把数据输入数据缓存区,从而不断刷新数据缓存区的内容。程序在运行中当遇到采样语句,就到数据缓存存储区中去取数据,当然,所取的是最新刷新的输入数据。<o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoBodyTextIndent style="TEXT-INDENT: 0cm"><FONT face=楷体_GB2312
size=4><SPAN lang=EN-US style="mso-fareast-language: ZH-CN"><![if !supportEmptyParas]> </SPAN><SPAN
lang=EN-US
style="FONT-SIZE: 10pt; mso-fareast-language: ZH-CN"><![endif]><o:p></o:p></SPAN></FONT></P>
<P class=MsoBodyTextIndent style="TEXT-INDENT: 0cm"><SPAN lang=EN-US><A
href="http://www.ekany.com/wdg98/cg/contents/chapter4/les422.htm"><SPAN
style="mso-fareast-language: ZH-CN"><FONT face=楷体_GB2312
size=4><上一节></FONT></SPAN><FONT face=楷体_GB2312 size=4><SPAN
style="FONT-FAMILY: 'Times New Roman'; mso-fareast-language: ZH-CN; mso-ascii-font-family: 宋体"> </SPAN></FONT></A></SPAN><FONT
face=楷体_GB2312 size=4><SPAN lang=EN-US
style="FONT-FAMILY: 'Times New Roman'; mso-fareast-language: ZH-CN; mso-ascii-font-family: 宋体"> </SPAN><SPAN
lang=EN-US style="mso-fareast-language: ZH-CN"> </SPAN><SPAN lang=EN-US><A
href="http://www.ekany.com/wdg98/cg/contents/chapter4/les424.htm"><SPAN
style="mso-fareast-language: ZH-CN"><下一节> </SPAN></A></SPAN><SPAN
lang=EN-US
style="FONT-FAMILY: 'Times New Roman'; mso-fareast-language: ZH-CN; mso-ascii-font-family: 宋体"> </SPAN><SPAN
lang=EN-US style="mso-fareast-language: ZH-CN"> <A
href="http://www.ekany.com/wdg98/cg/tutorial/chapter4/lesson4-2.htm"><返回></A></SPAN><SPAN
lang=EN-US
style="FONT-SIZE: 10pt; mso-fareast-language: ZH-CN"><o:p></o:p></SPAN></FONT></P></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -