<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Adobe RoboHelp 2019" />
<title>GenGetWaveType</title>
<link rel="StyleSheet" href="../../../../ms_help.css" type="text/css" />
 <script type="text/javascript" language="JavaScript">
//<![CDATA[
function reDo() {
  if (innerWidth != origWidth || innerHeight != origHeight)
     location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
	origWidth = innerWidth;
	origHeight = innerHeight;
	onresize = reDo;
}
onerror = null; 
//]]>
</script>
<style type="text/css">
<!--
div.WebHelpPopupMenu { position:absolute;
left:0px;
top:0px;
z-index:4;
visibility:hidden; }
p.WebHelpNavBar { text-align:right; }
-->
</style>

<script type="text/javascript" src="../../../../template/scripts/rh.min.js"></script>
<script type="text/javascript" src="../../../../template/scripts/common.min.js"></script>
<script type="text/javascript" src="../../../../template/scripts/topic.min.js"></script>
<script type="text/javascript" src="../../../../template/scripts/constants.js"></script>
<script type="text/javascript" src="../../../../template/scripts/utils.js"></script>
<script type="text/javascript" src="../../../../template/scripts/mhutils.js"></script>
<script type="text/javascript" src="../../../../template/scripts/mhlang.js"></script>
<script type="text/javascript" src="../../../../template/scripts/mhver.js"></script>
<script type="text/javascript" src="../../../../template/scripts/settings.js"></script>
<script type="text/javascript" src="../../../../template/scripts/XmlJsReader.js"></script>
<script type="text/javascript" src="../../../../template/scripts/loadparentdata.js"></script>
<script type="text/javascript" src="../../../../template/scripts/loadscreen.js"></script>
<script type="text/javascript" src="../../../../template/scripts/loadprojdata.js"></script>
<script type="text/javascript" src="../../../../template/scripts/mhtopic.js"></script>
 <link rel="stylesheet" type="text/css" href="../../../../template/styles/widgets.min.css">
 <link rel="stylesheet" type="text/css" href="../../../../template/styles/topic.min.css">
<script type="text/javascript" >
gRootRelPath = "../../../..";
gCommonRootRelPath = "../../../..";
gTopicId = "5.1.2.3.0_4";
</script>
 <meta name="brsprev" value="sdk/windows_api/function_reference/channel_settings/gen_set_wave_type.htm">
 <meta name="brsnext" value="sdk/windows_api/function_reference/channel_settings/gen_set_arbitrary_data_file.htm">
 <meta name="topic-breadcrumbs" content="C-WaveformGenerator SDKについて > Windows API > 関数リファレンス > チャネル設定" />
</head>

<body>
<script type="text/javascript" src="../../../../ehlpdhtm.js"></script>

<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-P45RPFN" style="width: 0px; 
		 height: 0px; display: none; visibility: hidden;">
 <p>&#160;</p>
</iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->
<div><script type="text/javascript" language="javascript">//<![CDATA[
document.write("<p  style=\"text-align:left;\" class=\"breadcrumbs\">");
AddMasterBreadcrumbs("../../../../c_waveformgenerator.htm", "breadcrumbs", " &gt; ", "ホーム", "../../../../welcome/c_waveformgenerator.htm");
document.write("<a class=\"breadcrumbs\" href=\"../../../welcome/c_waveformgenerator_sdk.htm\">C-WaveformGenerator SDKについて<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"../../windows_api.htm\">Windows API<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"../function_list.htm\">関数リファレンス<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"gen_set_channel_setting.htm\">チャネル設定<\/a>  &gt;  GenGetWaveType<\/p>");
//]]></script>
</div>

<h1 style="font-size: 18pt;">GenGetWaveType</h1>
<hr align="center" />
<h2>機能</h2>
<p style="margin-left: 24px;">指定したチャネル番号に対し、波形タイプを取得します。</p>
<h2>書式</h2>
<p class="code" style="margin-left: 24px;">Ret = <span style="font-weight: bold;">GenGetWaveType</span> 
 ( AppId , AoChanne , WaveType ）</p>
<h2>引数</h2>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;">AppId</span> 
 [ VB.NET: Short ] [ C++: short ] [ C#: short ]&#160;[ Python: ctypes.c_short 
 ]</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">GenOpenApplicationで取得したアプリケーションIDを指定します。</p>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;">AoChannel</span> 
 [ VB.NET: UShort ]&#160;[ C++: unsigned short ]&#160;[ C#: ushort ] [ 
 Python: ctypes.c_ushort ]</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">チャネル番号を指定します。</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">&#160;</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;"><span 
	 style="font-weight: bold;">WaveType</span> [ VB.NET: UShort ]&#160;[ 
 C++: unsigned short * ]&#160;[ C#: out ushort ] [ Python: ctypes.POINTER(ctypes.c_ushort) 
 ]</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">波形タイプを返します。</p>
<table style=" margin-top:14px; margin-left:24px; width:100%; max-width:600px;">
	<col style="width: 10%;" />
	<col style="width: 20%;" />
	<col />
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#808080"><p 
			 style="margin-top: 0px; margin-bottom: 0px; color: #ffffff;">値</p>
		<p style="margin-top: 0px; margin-bottom: 0px; color: #ffffff;">[Dec]</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#808080"><p 
			 style="margin-top: 0px; margin-bottom: 0px;"><font color="#FFFFFF">マクロ</font></p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#808080"><p 
			 style="margin-top: 0px; margin-bottom: 0px;"><font color="#FFFFFF">内容</font></p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">0</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>GEN_PARAM_WAVE_SINE</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">正弦</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">1</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>GEN_PARAM_WAVE_CONSTANT</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">固定</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">2</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>GEN_PARAM_WAVE_TRIANGLAR</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">三角</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">3</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>RGEN_PARAM_WAVE_RAMP</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">のこぎり</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">4</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>GEN_PARAM_WAVE_SQUARE</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">矩形</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">5</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>GEN_PARAM_WAVE_NOISE</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">ノイズ</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">6</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>GEN_PARAM_WAVE_ARBITRARY</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p 
			 style="margin-top: 0px; margin-bottom: 0px;">任意</p></td>
	</tr>
</table>
<h2>戻り値</h2>
<p style="margin-bottom: 0; margin-left: 24px;"><span style="font-weight: bold;">Ret</span>&#160;[ 
 VB.NET: Integer ]&#160;[ C++: long ]&#160;[ C#: int ]<span style="color: 透明;">&#160;[ 
 Python: ctypes.c_long ]</span></p>
<table style="margin-top: 14px; margin-left: 24px;" width="95%">
	<col style="width: 30%;" />
	<col style="width: 10%;" />
	<col style="width: 60%;" />
	<tr>
		<td style="vertical-align: TOP; width: 15%;" bgcolor="#808080"><p 
			 style="font-weight: bold; color: #ffffff; text-align: center; 
			 margin-top: 0pt; margin-bottom: 0pt;">定義</p></td>
		<td style="vertical-align: TOP; width: 15%;" bgcolor="#808080"><p 
			 style="text-align: center; margin-top: 0px; margin-bottom: 0px; 
			 color: #ffffff;">戻り値</p>
		<p style="text-align: center; margin-top: 0px; margin-bottom: 0px; 
			 color: #ffffff;">[Dec]</p></td>
		<td style="vertical-align: TOP; width: 80%;" bgcolor="#808080"><p 
			 style="text-align: center; margin-top: 0px; margin-bottom: 0px; 
			 color: #ffffff;">内容</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; width: 15%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;" 
			 bgcolor="#E6E6E6"><p style="text-align: center;">GEN_ERR_SUCCESS</p></td>
		<td style="vertical-align: TOP; width: 15%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;" 
			 bgcolor="#E6E6E6"><p style="text-align: center;">0</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>正常終了</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; width: 15%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;" 
			 bgcolor="#E6E6E6"><p style="text-align: center;">GEN_ERR_CHANNEL_NO</p></td>
		<td style="vertical-align: TOP; width: 15%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;" 
			 bgcolor="#E6E6E6"><p style="text-align: center;">22000</p></td>
		<td style="vertical-align: TOP; padding-left: 0px; padding-top: 0px; 
			 padding-right: 0px; padding-bottom: 0px;" bgcolor="#E6E6E6"><p>チャネル番号が設定可能範囲外です</p></td>
	</tr>
</table>
<p style="margin-left: 24px;">その他のエラー（参照：<a href="../error_code.htm">エラーコード一覧</a>）</p>
<h2>説明</h2>
<p style="margin-left: 40px; margin-top: 0pt; margin-bottom: 0pt;">波形タイプを取得します。</p>
<p style="margin-left: 40px; margin-top: 0pt; margin-bottom: 0pt;">デバイス動作中での実行が可能です。</p>
<h2>使用例</h2>
<p style="margin-left: 40px;">チャネル0の波形タイプの取得します。</p>
<table style="margin-top: 14pt; margin-left: 24px;" cellspacing="0" width="90%">
	<tr>
		<td style="vertical-align: TOP; width: 10%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;"><p 
			 class="code">VB.NET</p></td>
		<td style="vertical-align: TOP; width: 89%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;"><p 
			 class="code">Dim Ret As Integer</p>
		<p class="code">Dim WaveType As UShort</p>
		<p class="code">Ret = GenGetWaveType(AppId, 0, WaveType)</p>
		<p class="code">&#160;</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; width: 10%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;"><p 
			 class="code">C++</p></td>
		<td style="vertical-align: TOP; width: 89%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;"><p 
			 class="code">long Ret;</p>
		<p class="code">short WaveType;</p>
		<p class="code">Ret = GenGetWaveType(AppId, 0, &amp;WaveType);</p>
		<p class="code">&#160;</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; width: 10%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;"><p 
			 class="code">C#</p></td>
		<td style="vertical-align: TOP; width: 89%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;"><p 
			 class="code">int Ret;</p>
		<p class="code">short WaveType = 0;</p>
		<p class="code">Ret = gen.GetWaveType(AppId, 0, out WaveType);</p>
		<p class="code">&#160;</p></td>
	</tr>
	<tr>
		<td style="vertical-align: TOP; width: 10%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;"><p 
			 class="code">Python</p></td>
		<td style="vertical-align: TOP; width: 89%; padding-left: 0px; 
			 padding-top: 0px; padding-right: 0px; padding-bottom: 0px;"><p 
			 class="code" style="color: 透明;">Ret = ctypes.c_long()<br />
		WaveType = ctypes.c_ushort</p>
		<p class="code" style="color: 透明;">Ret.value = cgen_api.GenGetWaveType(AppId, 
		 0, ctypes.byref(WaveType))</p>
		<p class="code" style="color: 透明;">&#160;</p></td>
	</tr>
</table>
<h2>関連項目</h2>
<p style="margin-left: 40px;"><a href="gen_set_wave_type.htm">GenSetWaveType</a></p>
<p>&#160;</p>
<p>&#160;</p>
<div style="width: 100%; position: relative;" id="footer">
	<hr align="center" />
	<p>当サイトでは、お客様の利便性向上のために、Cookieを使用しています。<a href="https://www.contec.com/jp/privacy#anc-01">詳細はこちら。</a></p>
</div>
</body>
</html>
