<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="generator" content="Adobe RoboHelp 2019" />
<title>LoggerGetChannelSetting</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 = "6.1.3.2.0_2";
</script>
 <meta name="brsprev" value="sdk/windows_api/function_reference/acquisition_settings/logger_set_channel_setting.htm">
 <meta name="brsnext" value="sdk/windows_api/function_reference/acquisition_settings/logger_set_scale_conversion.htm">
 <meta name="topic-breadcrumbs" content="C-LOGGER SDK > Windows API > Function Reference > Acquisition Setting" />
</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_logger.htm", "breadcrumbs", " &gt; ", "Home", "../../../../welcome/c_logger.htm");
document.write("<a class=\"breadcrumbs\" href=\"../../../welcome/c_logger_sdk.htm\">C-LOGGER SDK<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"../../windows_api.htm\">Windows API<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"../function_list.htm\">Function Reference<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"logger_set_channel_setting.htm\">Acquisition Setting<\/a>  &gt;  LoggerGetChannelSetting<\/p>");
//]]></script>
</div>

<h1>LoggerGetChannelSetting</h1>
<hr align="center" />
<h2>Function</h2>
<p style="margin-left: 24px;">Get the channel information.</p>
<h2>Format</h2>
<p class="code" style="margin-left: 24px;">Ret = <span style="font-weight: bold;">LoggerGetChannelSetting</span> 
 ( AppId , InputType , SequenceNum , ChannelNo , ChannelName , Range )</p>
<h2>Parameters</h2>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;"><span><span 
	 style="font-weight: bold;">A</span></span>ppId</span> [ VB.NET: Short 
 ] [ C++: short ] [ C#: short ]&#160;</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">Specify 
 Application ID retrieved by LoggerOpenApplication.</p>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;">InputType</span> 
 <span style="font-size: 13.3333px; font-variant-ligatures: normal; font-variant-caps: normal; 
		 orphans: 2; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; 
		 text-decoration-style: initial; text-decoration-color: initial; 
		 background-color: #ffffff;">[ VB.NET: UShort ]&#160;[ C++: unsigned 
 short ]&#160;[ C#: ushort ]</span></p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">Specify 
 the input method.</p>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;">SequenceNum</span> 
 <span style="font-size: 13.3333px; font-variant-ligatures: normal; font-variant-caps: normal; 
		 orphans: 2; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; 
		 text-decoration-style: initial; text-decoration-color: initial; 
		 background-color: #ffffff;">[</span>[ VB.NET: UShort ]&#160;[ 
 C++: unsigned short * ]&#160;[ C#: ref ushort ]</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">Specify 
 the address where the sequence number is stored.</p>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;">ChannelNo</span> 
 [ VB.NET: UShort() ]&#160;[ C++: unsigned short * ]&#160;[ C#: out ushort[] 
 ]</p>
<p style="margin-left: 24px; margin-top: 0pt;">Specify the address where 
 the channel number is stored.</p>
<p style="margin-left: 24px; margin-bottom: 0pt;"><span style="font-weight: bold;">ChannelName</span> 
 <span style="font-size: 13.3333px; font-variant-ligatures: normal; font-variant-caps: normal; 
		 orphans: 2; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; 
		 text-decoration-style: initial; text-decoration-color: initial; 
		 background-color: #ffffff;">[ VB.NET: Byte() ]&#160;[ C++: char 
 *]&#160;[ C#: out byte[] ]</span></p>
<p style="margin-left: 24px; margin-top: 0pt;">Specify the address where 
 the channel name is stored.<br />
Please refer &quot;<a href="../../tutorial/common/notes/note_visual_basic.htm">Note 
 of Using Visual Basic .NET</a>&quot; to know the way to convert a Byte 
 array to a string variable on Visual Basic .NET.<br />
Please refer &quot;<a href="../../tutorial/common/notes/note_visual_cs.htm">Note 
 of Using Visual C#</a>&quot;&#160;to know the way to convert a Byte array 
 to a string variable on Visual C#.</p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;"><span 
	 style="font-weight: bold;">Range</span> <span style="font-size: 13.3333px; 
													 font-variant-ligatures: normal; 
													 font-variant-caps: normal; 
													 orphans: 2; widows: 2; 
													 -webkit-text-stroke-width: 0px; 
													 text-decoration-thickness: initial; 
													 text-decoration-style: initial; 
													 text-decoration-color: initial; 
													 background-color: #ffffff;">[ 
 VB.NET: UShort ]&#160;[ C++: unsigned short *]&#160;[ C#: out ushort ]</span></p>
<p style="margin-left: 24px; margin-top: 0pt; margin-bottom: 0pt;">Specify 
 the address where the analog input range is stored.</p>
<h2>Return Value</h2>
<p style="margin-bottom: 0; margin-left: 24px;"><span style="font-weight: bold;">Ret</span>&#160;[ 
 VB.NET: Integer ]&#160;[ C++: long ] [ C#: int ]</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="text-align: center;" bgcolor="#808080"><p style="color: #ffffff; 
															 font-weight: bold;">Definition</p></td>
		<td bgcolor="#808080"><p style="font-weight: bold; color: #ffffff; 
								 text-align: center; margin-top: 0pt; margin-bottom: 0pt;">Return 
		 code</p>
		<p style="font-weight: bold; color: #ffffff; text-align: center; 
			 margin-top: 0pt; margin-bottom: 0pt;">[Dec]</p></td>
		<td bgcolor="#808080"><p style="text-align: center; color: #ffffff; 
								 font-weight: bold;">Description</p></td>
	</tr>
	<tr>
		<td style="text-align: center;" bgcolor="#E6E6E6"><p style="text-align: left;">LOGGER_ERR_SUCCESS</p></td>
		<td style="text-align: center;" bgcolor="#E6E6E6"><p>0</p></td>
		<td bgcolor="#E6E6E6"><p>Normal completed</p></td>
	</tr>
	<tr>
		<td style="text-align: center;" bgcolor="#E6E6E6"><p style="text-align: left;">LOGGER_ERR_INVALID_ID</p></td>
		<td style="text-align: center;" bgcolor="#E6E6E6"><p>10010</p></td>
		<td bgcolor="#E6E6E6"><p>Invalid AppId was specified.</p></td>
	</tr>
</table>
<p style="margin-bottom: 0; margin-left: 24px;">The others (See also: <a 
	 href="../error_code.htm">Error Code List</a>)</p>
<h2>Remarks</h2>
<p style="margin-left: 40px;">Get channel information.<br />
You can acquire the input method, channel name, and input range of each 
 channel.<br />
ChannelNo, ChName, and Range are array variables, and you can also acquire 
 the processing sequence.</p>
<p style="margin-left: 40px;">Example:</p>
<p style="margin-left: 80px;">Sequence 1: hardware channel 2, channel 2, 
 range ±10 V.<br />
Sequence 2: hardware channel 0, test channel, range ±5v.<br />
Sequence 3: hardware channel 1, ch1, range ±10 V.</p>
<p style="margin-left: 80px;">The channel information is stored in order 
 of processing sequence, starting with the youngest array index.</p>
<p style="margin-left: 80px;">ChannelNo: [2, 0, 1]<br />
ChannelName: [Channel2, test channel, ch1]<br />
Range: [0, 1, 0]</p>
<h2>Example</h2>
<p style="margin-left: 40px;">Get channel information.</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 InputType As UShort</p>
		<p class="code">Dim SequenceNum As UShort</p>
		<p class="code" style="color: 透明;">Dim ChannelNo(255) As UShort</p>
		<p class="code" style="color: 透明;"><span style="color: 透明;">Dim 
		 ChannelName(255 * 255) As Byte</span></p>
		<p class="code" style="color: 透明;">Dim Range(255) As UShort</p>
		<p class="code" style="color: 透明;">&#160;</p>
		<p class="code" style="color: 透明;">SequenceNum = 256</p>
		<p class="code" style="color: 透明;">&#160;</p>
		<p class="code">Ret = LoggerGetChannelSetting(AppId, InputType, 
		 SequenceNum, ChannelNo, ChannelName, Range)</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">unsigned short InputType;</p>
		<p class="code">unsigned short SequenceNum;</p>
		<p class="code" style="color: 透明;">unsigned short ChannelNo[256];</p>
		<p class="code" style="color: 透明;">char ChannelName[256][256];</p>
		<p class="code" style="color: 透明;">unsigned short Range[256];</p>
		<p class="code" style="color: 透明;">&#160;</p>
		<p class="code" style="color: 透明;">SequenceNum = 256;</p>
		<p class="code" style="color: 透明;">&#160;</p>
		<p class="code">Ret = LoggerGetChannelSetting(AppId, &amp;InputType, 
		 &amp;SequenceNum, &amp;ChannelNo[0], &amp;ChannelName[0][0], &amp;Range[0]);</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">ushort InputTypet;</p>
		<p class="code">ushort SequenceNum;</p>
		<p class="code" style="color: 透明;">ushort[] ChannelNo = new ushort[256];</p>
		<p class="code" style="color: 透明;"><span style="color: 透明;">byte[] 
		 ChannelName = new byte[256];</span></p>
		<p class="code" style="color: 透明;">ushort[] Range = new ushort[256];</p>
		<p class="code" style="color: 透明;">&#160;</p>
		<p class="code" style="color: 透明;">SequenceNum =256;</p>
		<p class="code" style="color: 透明;">&#160;</p>
		<p class="code">Ret = logger.GetChannelSetting(AppId, out InputType, 
		 ref SequenceNum, out ChannelNo, out ChannelName, out Range);</p>
		<p class="code">&#160;</p></td>
	</tr>
</table>
<h2>See Also</h2>
<p style="margin-left: 40px;"><a href="logger_set_channel_setting.htm">LoggerSetChannelSetting</a></p>
<p style="margin-left: 40px;">&#160;</p>
<p>&#160;</p>
<div style="width: 100%; position: relative;" id="footer">
	<hr style="float: aligncenter; " />
	<p>This website uses cookies. By continuing to browse our site you 
	 agree to our <a href="https://www.contec.com/privacy#anc-01">use of 
	 cookies</a>.</p>
</div>
</body>
</html>
