<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="generator" content="Adobe RoboHelp 2019" />
<title>File sample</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.3.2.0_2";
</script>
 <meta name="brsprev" value="sdk/windows_api/sample/python/multi_channel_wave.htm">
 <meta name="brsnext" value="sdk/windows_api/faq/startup_for_visual_studio.htm">
 <meta name="topic-breadcrumbs" content="C-WaveformGenerator SDK > Windows API > Sample > List of CUI sample programs" />
</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; ", "Home", "../../../../welcome/c_waveformgenerator.htm");
document.write("<a class=\"breadcrumbs\" href=\"../../../welcome/CWaveformGeneratorSDK.htm\">C-WaveformGenerator SDK<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"../../windows_api.htm\">Windows API<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"../sample_programs.htm\">Sample<\/a>  &gt;  <a class=\"breadcrumbs\" href=\"../sample_programs_list_cui.htm\">List of CUI sample programs<\/a>  &gt;  File sample<\/p>");
//]]></script>
</div>

<h1>File sample&#160;[FileOperation]</h1>
<hr align="center" />
<h2>Appearance</h2>
<p style="margin-left: 40px;"><img src="file_operation.png" alt="" style=" border:none; width:100%; max-width:374px;" border="0" /></p>
<p style="margin-left: 40px;">&#160;</p>
<h2>Overview</h2>
<p style="margin-left: 40px;">This is the client sample which can launch 
 C-WaveformGenerator.</p>
<p style="margin-left: 40px;">Please prepare the following steps before 
 you use C-Waveformgenerator.</p>
<p style="margin-left: 40px;">(1) Make sure you can output the signal from 
 your device with your settings. (Device settings/Channel settings)<br />
(2) Please save your setting files to your local storage drive after you 
 confirm to work C-WaveformGenerator properly.</p>
<p style="margin-left: 40px;">Please refer &quot;<a href="multi_channel_wave.htm">Waveform 
 setting sample for Multiple Channel</a>&quot; sample if you don't have 
 any <a href="../../../../basic_operation/save_configuration.htm">configuration 
 file (ini)</a> for C-WaveformGenerator.</p>
<table class="AlternateBlueWithBlankHeader" style="margin-left: 40px;" cellspacing="0px" width="95%">
	<tr class="t1st">
		<td><p>Specification of sample program</p></td>
		<td><p>&#160;</p></td>
	</tr>
	<tr class="t2Row">
		<td><p>Name of sample program</p></td>
		<td><p>FileOperation.py</p></td>
	</tr>
	<tr class="t1Row">
		<td><p>Related files</p></td>
		<td><p>CommonFunction.py<br />
		cgen_api.py</p></td>
	</tr>
</table>
<p style="margin-left: 40px;">&#160;</p>
<h2>Step to Use</h2>
<p style="margin-left: 40px;">1. When you enter the sample program name 
 and execute the program, the CUI (Character User Interface) menu appears 
 as shown above.<br />
&#160;&#160;The appearance may differ depending on the software version.</p>
<p style="margin-left: 80px;">Example of program execution: py FileOperation.py</p>
<p style="margin-left: 40px;">2. Initialization</p>
<p style="margin-left: 40px;">&#160;- You can specify the device name by 
 selecting the [1: GenOpenApplication] command from the CUI menu.<br />
&#160;&#160;After you specify the device name, the Parameters (Screen Size) 
 CUI menu appears.</p>
<p style="margin-left: 40px;">&#160;&#160;&#160;You can indicate the size 
 of window at launching C-WaveformGenerator. (Minimize, Normal, Maximize)<br />
&#160;&#160;<img src="file_operation01.png" alt="" style=" border:none; width:100%; max-width:400px;" border="0" /></p>
<p style="margin-left: 40px;">&#160;- C-WaveformGenerator may launch when 
 [GenOpenApplication] command completes successfully.<br />
&#160;&#160;&#160;You may not install C-WaveformGenerator properly if C-WaveformGenerator 
 doesn't launch.<br />
&#160;&#160;&#160;Please <a href="../../../../software_uninstallation/application_uninstall.htm">Un-install</a> 
 C-WaveformGenerator and then <a href="../../../../software_installation/application_install.htm">install</a> 
 it, again.</p>
<p style="margin-left: 40px;">&#160;- You can modify &quot;Device name&quot; 
 by selecting the [2: GenSetDeviceName] command from CUI menu.</p>
<p style="margin-left: 40px;">3. Indicate the Setting file</p>
<p style="margin-left: 40px;">&#160;- You can indicate the Setting file 
 which saved on C-WaveformGenerator when select [4: GenImportSettingFile] 
 command from the CUI menu.</p>
<p style="margin-left: 40px;">&#160;&#160;When you specify the setting 
 file name, GenImportSettingFile is executed, and the CUI menu is displayed 
 again.<br />
&#160;&#160;The contents of the setting file are read and applied to the 
 C-WaveformGenerator.<br />
&#160;&#160;<img src="file_operation02.png" alt="" style=" border:none; width:100%; max-width:539px;" border="0" /></p>
<p style="margin-left: 40px;">4. Operation</p>
<p style="margin-left: 40px;">&#160;- You can start to generate from the 
 specified device when you select [9: Gen StartOperation] command from 
 the CUI menu.<br />
&#160;&#160;<img src="file_operation03.png" alt="" style=" border:none; width:100%; max-width:394px;" border="0" /></p>
<p style="margin-left: 40px;">&#160;- You can stop to generate&#160;from 
 the specified device when you select [11: GenStopOperation] command from 
 CUI menu.<br />
&#160;&#160;&#160;The appearance of C-WaveformGenerator will follow your 
 operation in [GenStartOperation/GenStopOperation] on the sample program.<br />
&#160;&#160;&#160;Please refer &quot;<a href="../../../../screen_layout/advanced_mode/screen_layout_advanced.htm">Screen 
 configuration</a>&quot; to know more detail of C-WaveformGenerator.<br />
&#160;&#160;<img src="file_operation04.png" alt="" style=" border:none; width:100%; max-width:386px;" border="0" /></p>
<p style="margin-left: 40px;">&#160;- You can see the current status of 
 C-WaveformGenerator when you select [10: GenGetApplicationStatus] command 
 from CUI menu.<br />
&#160;&#160;You can confirm the current status even if the window size 
 of C-WaveformGenerator is &quot;Minimum&quot;.<br />
&#160;&#160;<img src="file_operation05.png" alt="" style=" border:none; width:100%; max-width:447px;" border="0" /></p>
<p style="margin-left: 40px;">5. Exit</p>
<p style="margin-left: 40px;">&#160;- You can terminate C-WaveformGenerator 
 when you select [12: GenCloseApplication] command from CUI menu.<br />
&#160;&#160;&#160;In this case, you can operate C-WaveformGenerator by 
 the other our client application with GenOpenApplication function.<br />
&#160;&#160;<img src="file_operation06.png" alt="" style=" border:none; width:100%; max-width:413px;" border="0" /></p>
<p style="margin-left: 40px;">&#160;- Please select [1: GenOpenApplication] 
 command if you want to operate C-WaveformGenerator, again.</p>
<p style="margin-left: 40px;">6. Close</p>
<p style="margin-left: 40px;">&#160;- You can close this sample program 
 when you select [q: Quit] command from CUI menu.<br />
&#160;&#160;&#160;C-WaveformGenerator may be also terminated.</p>
<p style="margin-left: 0px;">&#160;</p>
<h2>Notes:</h2>
<p style="margin-left: 0px;">&#160;&#160;&#160;In this sample program, 
 you can use [3: GenImportSettingFile] command to load the settings file 
 previously set on the C-WaveformGenerator.</p>
<p style="margin-left: 0px;">&#160;&#160;&#160;In addition to this function, 
 you can also make fine adjustments to channel settings and data file settings.<br />
&#160;&#160;In addition, you can save the settings to a specified settings 
 file name by selecting the [3: GenExport SettingFile] command after making 
 fine adjustments using this sample program.</p>
<p style="margin-left: 0px;">&#160;&#160;&#160;For details on channel settings, 
 refer to &quot;<a href="../../../../screen_layout/basic_mode/operation_chanel_basic.htm">Channel 
 Settings</a>&quot; in [<a href="../../../../screen_layout/basic_mode/operation_panel_basic.htm">Operation 
 panel</a>] of C-WaveformGenerator.</p>
<p style="margin-left: 0px;">&#160;&#160;&#160;To set the data file, select 
 the [5: GenSetWaveType] command, specify the channel number, and select 
 the [6: Arbitrary] command.<br />
&#160;&#160;For details on arbitrary waveforms, refer to &quot;Arbitrary&quot; 
 waveform in [<a href="../../../../screen_layout/waveform_panel.htm">Waveform 
 selection panel</a>] of C-WaveformGenerator control panel.<br />
&#160;&#160;<img src="file_operation07.png" alt="" style=" border:none; width:100%; max-width:391px;" border="0" /></p>
<p style="margin-left: 0px;">&#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>
