home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 September / CHIP_CD_1997_09_PL.iso / software / testsoft / labwind / demo.3 / main / samples.doc < prev    next >
Encoding:
Text File  |  1996-08-02  |  35.5 KB  |  795 lines

  1.  
  2.                   LabWindows/CVI, Version 4.0.1
  3.                         Sample Programs
  4.                        Documentation File
  5.       (c) Copyright 1994-1996 National Instruments Corporation.
  6.                       All rights reserved.
  7.  
  8.          Product and company names listed are trademarks
  9.           or trade names of their respective companies.
  10.  
  11.  
  12. LabWindows/CVI comes with many sample programs to help you learn and
  13. understand key concepts of LabWindows/CVI. You can use these programs 
  14. as starting points for your applications.  The following brief description
  15. of the sample programs matches the directory structure of the samples
  16. sub-directory in the main CVI directory.  If you are viewing this file
  17. with the Windows Notepad application, you can use the Search option to 
  18. search for specific keywords or functions you want to learn about.
  19.  
  20.  
  21. ANALYSIS (Advanced Analysis Only)
  22. ---------------------------------
  23.  
  24. convolve.prj - demonstrates the Convolve and Deconvolve functions in the 
  25. Advanced Analysis library.  Two sets of controls specify the number of 
  26. points, cycles, wave type, and amount of noise of of each of the two 
  27. input signals. The program displays the two signals on the upper two 
  28. graphs and the convolve and deconvolve of the signals on the lower 
  29. graphs.
  30.  
  31. correlat.prj - demonstrates the Correlation function in the Advanced 
  32. Analysis library. Two sets of controls specify the number of points, 
  33. cycles, wave type, and amount of noise of of each of the two input 
  34. signals. The program displays the two signals on the upper two graphs 
  35. and the correlation on the lower graph.
  36.  
  37. interp.prj - demonstrates the use of the PolyInterp, RatInterp and 
  38. SpInterp functions in the Advanced Analysis Library.  The user generates 
  39. a series of points to use as the known values in the array.  The points 
  40. can be generated randomly or entered graphically with the graph cursor.  
  41. The interpolated points and error range is graphically displayed over 
  42. the series of points.
  43.  
  44. mode.prj - illustrates using of the Histogram and Mode functions in the 
  45. Analysis libraries.  The mode value is defined as the value that most 
  46. often occurs in a given set of samples.
  47.  
  48. nonlnfit.prj - illustrates how to use the Nonlinear Fit function in the 
  49. Advanced Analysis Library.  The user specifies a particular data 
  50. function to generate data from and a function to fit the data to.  
  51. Gaussian noise can be added to the generated data to simulate actual 
  52. acquired data.  A nonlinear fit is then generated and plotted and the 
  53. parameters of the best fit are also displayed.
  54.  
  55. peak_est.prj - use the AutoPowerSpectrum and PowerFrequencyEstimate 
  56. functions in the Advanced Analysis library. The top graph displays an 
  57. input signal in the time domain and the bottom graph displays the power 
  58. spectrum of the filtered input signal. Using the graph cursor the peak 
  59. frequency and its power can be calculated at different displayed 
  60. frequency peaks.
  61.  
  62. phasedif.prj - demonstrate the calculatation of the phase difference 
  63. between two sine waves.  The number of points, cycles, and phase of two 
  64. input sine waves are configurable.
  65.  
  66. pulse.prj - demonstrates the PulseParam function in the Advanced 
  67. Analysis library.  The pulse waveform can be generated randomly or 
  68. manually. Data returned from the Pulse function is displayed on the main 
  69. panel.
  70.  
  71. windowng.prj - illustrates the different windowing functions available 
  72. in the Advanced Analysis library. Two combined sinusoidal waveforms, one 
  73. of which has an amplitude greater by a factor of 1000, are displayed in 
  74. the frequency domain on either a linear or log scale.  Two different 
  75. windowing functions can be applied in parallel to compare the different 
  76. effects in the frequency domain.
  77.  
  78. APPS
  79. ----
  80.  
  81. atedemo.prj - illustrates how an automated test sequence can be 
  82. implemented with LabWindows/CVI.  This program will ask the user to 
  83. input some test characteristics and then will run a test sequence while 
  84. displaying a test log on the screen.
  85.  
  86. freqresp.prj - generates a frequency response for a Butterworth bandpass 
  87. digital filter and performs curve fitting on the plotted points.  This 
  88. example illustrates the use of basic CVI User Interface controls such as 
  89. knobs, graphs and numeric displays.  This program assumes that the CVI 
  90. Advanced Analysis library is installed.
  91.  
  92. iconedit.prj - illustrates how CVI can be used to create other 
  93. applications not related to test and measurement.  This particular 
  94. program implements a simple bitmap editor which can be used to
  95. create Windows icons.
  96.  
  97. life.prj - A simulation of life. Place cells on the canvas and see
  98. what evolves. Based on a simple set of rules, new cells will grow and
  99. old ones will die out. This program illustrates the use of batch drawing
  100. on the canvas control.
  101.  
  102. lissa.prj - is an interesting and fun application program that shows how 
  103. to use some basic controls in a Graphical User Interface built with 
  104. LabWindows/CVI.  This application displays various Lissajous
  105. figures obtained by plotting two different periodic functions opposite 
  106. to each other on a graph.  Important features presented here are the 
  107. usage of signal generation functions and the ability to
  108. save and load the current control settings. 
  109.  
  110. lockout.prj - illustrates how a CVI panel window can be configured so it 
  111. cannot be switched from or closed by a user.  This application disables 
  112. the Windows task switching feature (accessed with the Alt-Tab keys) by 
  113. using the DisableTaskSwitching function, maximizes the panel and removes 
  114. the minimize/maximize icons of the CVI window.
  115.  
  116. mandel.prj - interactively displays Mandelbrot images (fractals) with 
  117. the intensity plot function.  New and interesting fractal regions can be 
  118. explored by changing the plotting coordinates with the graph cursors.  
  119. It allows users to experiment with the different interpolation options 
  120. and save favorite plot settings.
  121.  
  122. marquee.prj - is a sample program that prints a moving banner on the 
  123. screen.  The GUI for this application is built programmatically with 
  124. functions such as NewCtrl and NewMenu.  The speed of the
  125. moving banner is modified by changing the rate at which the periodic 
  126. idle events occur.
  127.  
  128. scopedem.prj - is a sample program that simulates an oscilloscope with two 
  129. channels and variable settings for gain and timebase.  A waveform can be 
  130. saved to disk and then viewed with the notepad application.  An instrument 
  131. driver provides additional functions needed by this program.  The instrument 
  132. driver is located in the instr directory and is named scope.fp.
  133.  
  134. sigproc.prj - is an application program that generates a signal and then 
  135. conditions it with various filters.  This program uses the CVI Advanced 
  136. Analysis library.
  137.  
  138. spectrum.prj - is a frequency analysis program designed to perform 
  139. fourier analysis on either a simulated analog signal or an analog signal 
  140. acquired through a DAQ board.   The sampled signal is continuously 
  141. displayed in an upper graph while the simulation or data acquisition is 
  142. enabled.  The user may view either the power spectrum of the signal or 
  143. the windowed and filtered time waveform on a lower graph.  The signal 
  144. may be filtered with either FIR or IIR lowpass, highpass, bandpass, or 
  145. bandstop filters.  The filter and data aquisition features can also be 
  146. customized. This program assumes that the CVI Advanced Analysis library 
  147. is installed.
  148.  
  149. tempsys.prj - is a simple temperature monitor program.  This application 
  150. generates random temperature readings and displays them on a strip chart 
  151. in continuous mode.  Statistical processing is
  152. done on the random samples and a histogram is then displayed in a graph 
  153. control with vertical bar display.
  154.  
  155. update.prj - is an application program that simulates an oscilloscope 
  156. display  to illustrate how the update rate of a plot function is related 
  157. to the length of the buffer being displayed and the type of chart used.  
  158. The waveforms can be displayed on a graph control with or without smooth 
  159. update and on a strip chart control with sweep, continuous or block 
  160. updating.
  161.  
  162. workshop.prj - is an application that allows the user to modify an image 
  163. in PCX format with the Windows Paintbrush application and then re-
  164. display it on a CVI panel.  The program makes use of the 
  165. LaunchExecutable function to run the Paintbrush application.  The 
  166. program also demonstrates the usage of SystemHelp function to display 
  167. Windows-type help for a CVI application.
  168.  
  169. uirview\uirview.prj - is an application that allows the user to display 
  170. and snapshot UIR file panels.  The user can change some panel attributes
  171. dynamically, copy an image of the panel to the clipboard or save the 
  172. bitmap image to a BMP file.  UIR callbacks are not necessary to load a 
  173. user UIR file.
  174.  
  175.  
  176. CUSTCTRL
  177. --------
  178.  
  179. A set of sample programs is provided to demonstrate the use of the ECHO 
  180. control instrument drivers in the toolslib directory, such as the 
  181. password control and the DAQ controls.  See toolslib.doc for the 
  182. location of these sample programs and for a description of each 
  183. instrument driver.
  184.  
  185.  
  186. DAQ
  187. ---
  188.  
  189. Note:  The following programs are not part of the LabWindows/CVI 
  190. software distribution.  These programs will be installed with the latest 
  191. NI-DAQ software for PC compatibles.  If you do not have a daq sub-
  192. directory in the samples directory then you must install the NI-DAQ 
  193. software first to access these
  194. programs.  The NI-DAQ software is available free of charge from National 
  195. Instruments.
  196.  
  197. aiaoxmpl.prj - shows how single channel analog input/output is done. It 
  198. uses the AI_Read and AI_Write functions.
  199.  
  200. daq_op.prj - illustrates a single channel synchronous data acquisition.  
  201. It uses the DAQ_Op function to acquire the binary data and the 
  202. DAQ_VScale function to scale the binary data to voltage units.
  203.  
  204. daqstart.prj - shows how a single channel asynchronous data acquisition 
  205. is done. It uses the DAQ_Start function to start the acquisition and 
  206. then monitors the acquisition progress from a main callback routine with 
  207. the DAQ_Check function.
  208.  
  209. dblbuffer.prj - demonstrates a double buffered data acquisition.  A pop-
  210. up panel is used to configure settings for the DAQ board.
  211.  
  212. digital.prj - is a simple digital I/O example.  It uses the DIG_In_Line, 
  213. DIG_Out_Line and also the port write & read functions to turn on or off 
  214. LED controls on the user interface.   The ports are configured as output 
  215. or input with the DIG_Prt_Config function.
  216.  
  217. dqdbxmpl.prj - shows a double buffered data acquisition to disk.
  218. This project does not have a user interface file and it builds the GUI 
  219. programmatically.
  220.  
  221. eventcnt.prj - is a counter and timer example.  This example uses the 
  222. counters on a data acquisition board to count signal edges.  A main 
  223. callback routine is used to read the accumulated events periodically 
  224. with the CTR_EvRead function.
  225.  
  226. freqmeas.prj - demonstrates how the frequency of  an input analog signal 
  227. can be measured with the CTR_ functions.  This example makes use of most 
  228. of the CTR_ functions available in the Data Acquisition library.
  229.  
  230. ictr.prj - shows how to use the interval counter functions (ICTR_ 
  231. calls).
  232.  
  233. scan_op.prj - is an example of a  two channel synchronous data 
  234. acquisition.  It uses the Scan_Op function to read data from two 
  235. channels and then the Scan_Demux function to re-order the data for 
  236. graphical presentation.
  237.  
  238. scxiread.prj - performs a single SCXI channel analog input.  This 
  239. example shows the usage of basic SCXI functions.
  240.  
  241. scxiscan.prj - illustrates SCXI channel scanning in multiplexed or 
  242. parallel mode.  This can be used with multiple modules and multiple 
  243. channel gains.
  244.  
  245. scxitemp.prj - reads an analog input signal from a thermocouple, 
  246. converts the voltage to temperature using an instrument driver and 
  247. displays the running temperature on a strip chart.
  248.  
  249. wfmout.prj - is an example of how to use the WFM_Op function to generate 
  250. a waveform asynchronously.
  251.  
  252. Note: The following data acquisition programs will be available in the 
  253. NI-DAQ version 4.6.1 and later releases.  To find out what version of 
  254. NI-DAQ you have you can run the Get_NI_DAQ_Version function in the Data 
  255. Acquisition library.
  256.  
  257. bufgpctr.c -  illustrates the use of dual dma channels to acquire data 
  258. using buffered GPCTR functions on E Series boards.
  259.  
  260. eqvtimsm.c - illustrates the Equivalent Time Sampling technique, which 
  261. allows you to sample a repetitive input signal at an effective rate of 
  262. 20MHz.
  263.  
  264. rtchgfly.c - illustrates a method for acquiring an array of voltage data 
  265. asynchronously, using general purpose counters for timing.
  266.  
  267. scxi_vrd.prj - uses the SCXI Analog Input Instrument driver to acquire a 
  268. single analog input voltage from an SCXI module.  It also uses the 
  269. channel string input to define the chassis, module, and
  270. channels used.
  271.  
  272. scxichrt.prj - uses the SCXI Analog Input Instrument driver to acquire a 
  273. voltage from multiple SCXI channels.  It uses the channel string input 
  274. to define the chassis, module, and channels used.
  275.  
  276. scxicont.prj - uses the SCXI Analog Input Instrument driver to acquire a 
  277. continuous voltage from multiple SCXI channels.  It uses the channel 
  278. string input to define the chassis, module, and channels used.  This 
  279. example illustrates double buffering in conjunction with SCXI functions.
  280.  
  281. scxi_op.prj - uses the SCXI Analog Input Instrument driver to acquire a 
  282. voltage waveform from multiple SCXI channels.  It uses the channel 
  283. string input to define the chassis, module, and channels used.
  284.  
  285. scxi_tc.prj- uses the SCXI Analog Input Instrument driver to acquire a 
  286. temperature reading from multiple SCXI channels.  It uses the channel 
  287. string input to define the chassis, module, and channels and a 
  288. temperature conversion instrument driver to convert voltages to the 
  289. correct temperature values.
  290.  
  291. scxitrig.prj - is identical to scxi_op.prj with the option of digital 
  292. triggering enabled.
  293.  
  294. use3dma.prj - illustrates the use of the DAQ double buffered analog 
  295. input functions for acquiring voltage data continuously.
  296.  
  297.  
  298. DDE
  299. ---
  300.  
  301. EXCEL
  302.  
  303. ddedemo.prj - is an example of how to use the Dynamic Data Exchange 
  304. (DDE) library functions to communicate with another Windows application.  
  305. The program passes data between Microsoft Excel and LabWindows/CVI via a 
  306. warm DDE link.  If you have Excel, launch it before you run this example 
  307. and load in the LWCVI.XLS file found in the same directory as the 
  308. project.
  309.  
  310. ddeexcel.prj - uses the DDE functions to execute commands in a Microsoft 
  311. Excel application.  The commands illustrated are: OPEN sheet, CLOSE 
  312. sheet, RUN macro, and QUIT Excel.  These commands are executed from 
  313. LabWindows/CVI with the ClientDDEExecute function.
  314.  
  315.  
  316. MISC
  317.  
  318. prgmndde.prj - is an example of a DDE connection with the Windows 
  319. Program Manager application.  The program acts as a DDE client and, once 
  320. connected to the Program Manager which acts as a server, it allows the 
  321. user to create a new program group and items directly from 
  322. LabWindows/CVI. This program uses the ClientDDEExecute function to send 
  323. commands to the Windows Program Manager.
  324.  
  325. srvclt.prj - illustrates client/server communication with the DDE 
  326. functions.  The program spawns two other programs, a server and a 
  327. client, that communicate via a hot DDE link.  The server, in this case, 
  328. generates some waveform data which is then passed to the client to be 
  329. plotted on a graph.  The client can read data and execute various 
  330. commands from the server.  An important note about the Windows DDE 
  331. limitation is included as a comment at the top of the server.c file.
  332.  
  333. VBASIC
  334.  
  335. cvidde.prj -  demonstrates the use of DDE functions to communicate with 
  336. a program written in Visual Basic.  This CVI program implements both a 
  337. client and a server which communicate with a Visual Basic server and  
  338. client, respectively.  This program requires that a Visual Basic 
  339. application is running in the background.  The necessary Visual Basic 
  340. files are included in the same directory with the CVI program.
  341.  
  342.  
  343. DLL (Windows 95 and Windows NT Only)
  344. ------------------------------------
  345.  
  346. CVITEXT
  347.  
  348. cvitext.prj - creates a simple dll that draws text on a CVI panel using 
  349. SDK functions.
  350.  
  351. useit.prj - demonstrates the calling of the cvitext.dll by using an 
  352. import library.  You must create the dll and import library first by 
  353. opening cvitext.prj and selecting "Create Dynamic Link Library" in 
  354. the Build menu. 
  355.  
  356. SIMPLE
  357.  
  358. In each of five subdirectories are the files necessary to build a dll
  359. in cvi or one of the four external compilers (msvc, borland, watcom, and
  360. symantec), and a cvi project (simple.prj) which uses the dll as described
  361. below.
  362.  
  363. mydll.prj - creates a dll and import library which has three different 
  364. exported functions.  One function illustrates how a dll can be called to 
  365. display and operate a UIR file independent of the calling program.  Two 
  366. other functions illustrate the ability to export a function as either 
  367. stdcall or cdecl. 
  368.  
  369. simple.prj - demonstrates the calling of mydllÆs exported functions.  
  370. You must create the dll and import library first by opening mydll.prj 
  371. and selecting "Create Dynamic Link Library" in the Build menu. 
  372.  
  373.  
  374. DLL (Windows 3.1 Only)
  375. ----------------------
  376.  
  377. 32BITDLL 
  378.  
  379. tstdll32.prj - shows how a 32-bit DLL can be imported in LabWindows/CVI.  
  380. The glue code necessary for this DLL differs from the glue code for a 
  381. 16-bit DLL and the differences are pointed out in the glue code file 
  382. (dll32glu.c).  The DLL was created with the Watcom C 32-bit compiler.  
  383. At this time, the only 32-bit DLLs supported in LabWindows/CVI are the 
  384. ones created with the Watcom compiler.
  385.  
  386.  
  387. CALLBACK
  388.  
  389. useit.prj - This sample illustrates:
  390. 1. Calling CVI functions from a DLL (callbacks)
  391. 2. Converting pointers received from the DLL
  392.     - pointers that point to CVI data
  393.     - pointers that point to DLL data
  394. 3. Use of a pth file because the DLL filename is not the same as the 
  395. glue code filename.
  396.  
  397.  
  398. CVITEXT
  399.  
  400. useit.prj - This dll is an example of how to draw text onto a CVI panel 
  401. from a DLL.
  402.  
  403.  
  404. DPMILOCK
  405.  
  406. dpmilock.prj - illustrates the use of DPMI to lock a buffer in memory.  
  407. One of the     restrictions for a 16-bit DLL to work with LabWindows/CVI 
  408. is that a buffer should not be locked in memory with the GlobalPageLock 
  409. function available in the Windows SDK library.  The function will fail 
  410. on buffers already allocated with the malloc function in LW/CVI.  Any 
  411. DLL using GlobalPageLock function should be modified to use DPMI calls.  
  412. The usage of DPMILock and DPMIUnlock functions is shown in this sample 
  413. program.  The source code for these functions is included in the DLL 
  414. (dpmilock.dll) which is not shown in the project list, but is loaded 
  415. through its associated glue code (dpmiglue.obj) and the dpmiglue.pth 
  416. file.  You can use these functions and the glue code to replace the 
  417. GlobalPageLock function in your own DLL.
  418.  
  419.  
  420. FLOATDLL
  421.  
  422. fltstapp.prj - shows the modifications needed to be made to a DLL that 
  423. performs floating-point operations.  If a DLL is compiled with the /Fpi 
  424. or /Fpc switches, then the DLL uses the WIN87EM.DLL floating-point 
  425. emulator.  LabWindows/CVI does not use this emulator so the status of 
  426. the co-processor registers are lost when the DLL performs floating-point 
  427. operations.  This example shows how the DLL should perform the floating-
  428. point operations in order to be able to work in CVI.  The DLL is loaded 
  429. directly by being listed in the project list.  The source code for the 
  430. DLL is located in the same directory as the other project files.
  431.  
  432. INTRPTR
  433.  
  434. intrptr.prj is an example of how to modify a 32 bit memory buffer 
  435. allocated by a CVI program from an interrupt routine in a 16 bit dll. 
  436. The program uses the Alloc16BitAlias() function to allocate a selector 
  437. which can access CVI's 32 bit memory area during an interrupt service 
  438. routine.
  439.  
  440.  
  441. SIMPLE
  442.  
  443. simple.prj - This dll is an example of how to create a simple DLL which 
  444. will popup a Windows Message Box.
  445.  
  446.  
  447. WINMSG
  448.  
  449. winmsg.prj - is an example of communication between LabWindows/CVI and 
  450. an interrupt routine  in a 16-bit DLL.  The program installs a callback 
  451. routine, with the RegisterWinMsgCallback function, which will be entered 
  452. when a Windows message is passed back to CVI from the DLL.  The DLL will 
  453. trap a keyboard interrupt and then post the message to LabWindows/CVI.
  454.  
  455.  
  456. EASYIO
  457. ------
  458.  
  459. This directory contains sample programs that use the Easy I/O for DAQ 
  460. Library.  
  461.  
  462. ai_acq.prj - performs a timed analog acquisition using 
  463. AIAcquireWaveforms() and plot the results to a graph. 
  464.  
  465. ai_async.prj - performs an asynchronous timed analog acquisition using 
  466. AIStartAcquisition(), AICheckAcquisition(), AIReadAcquisition(), and 
  467. AIClearAcquisition().  If you configure a trigger mode using the 
  468. "Triggering" button on the user interface, AIAcquireTriggeredWaveforms() 
  469. is called 
  470. repetitively.
  471.  
  472. ai_cmd.prj - allows you to embed commands into the channel string to set 
  473. the upper and lower limits on individual channels as well as the inter-
  474. channel sample rate.  See the function panel help for the Channel String 
  475. parameter of AISampleChannels() for details.                                             
  476.  
  477. ai_ets.prj -  demonstrates an acquisition using the Equivalent Time 
  478. Sampling technique.  ETS can be used on an E-Series DAQ device to 
  479. achieve an effective acquisition rate of up to 20 MHz.  See the 
  480. functiona panel help for the Trigger Type parameter of 
  481. AIAcquireTriggeredWaveforms() for details.  The graph shows both the ETS 
  482. waveform and the "internal" waveform that was sampled using internal 
  483. timing so that you can compare them.                      
  484.  
  485. ai_samp.prj - reads analog input channels using AISampleChannels() and 
  486. plots the results to a strip chart.
  487.  
  488. ao_wave.prj - performs an asynchronous timed analog waveform generation 
  489. using OGenerateWaveforms() and AOClearWaveforms().  A waveform editor is 
  490. provided on the panel for customizing the waveform.  This program also 
  491. incorporates the functionality of ai_async.prj. You can tie the analog 
  492. output channel to the analog input channel in order to acquire and view 
  493. the waveform that is generated.
  494.  
  495. ctr_evt.prj - uses a DAQ-STC or Am9513 counter to count TTL edges of the 
  496. signal on the specified counter's SOURCE pin or the number of cycles of 
  497. a specified internal timebase signal.  When the internal timebase is 
  498. used, CounterEventOrTimeConfig() in conjunction with CounterStart() and 
  499. CounterRead() can be used to make more precise timing measurements than 
  500. with the Timer() function. If you select "Use Counter Source" from the 
  501. Source/Timebase control, you must supply a TTL signal to the SOURCE pin 
  502. of this counter.                                                           
  503.  
  504. ai_log.prj -  logs data to disk while asynchronously acquiring data.  
  505. Data can be stored in ASCII format for importing into a spreadsheet or 
  506. stored as binary to optimize for speed.
  507.  
  508. ctr_freq.prj - uses a DAQ-STC or Am9513 counter to measure the frequency 
  509. of a TTL signal on the specified counter's SOURCE pin by counting rising 
  510. edges of the signal during a specified period of time. 
  511.  
  512. ctr_perd.prj - configures a DAQ-STC or Am9513 counter to measure the 
  513. pulse width or period of a TTL signal connected to its GATE pin. The 
  514. measurement is done by counting the number of cycles of the specified 
  515. timebase between the appropriate starting and ending events.  The higher 
  516. the timebase frequency, the greater the measurement accuracy will be.  
  517. This example incorporates the functionality of ctr_puls.c as a pulse 
  518. generator so you can tie the OUT pin of the counter that is generating 
  519. pulses to the GATE of the counter performing pulse measurement.
  520.  
  521. ctr_puls.prj - configures a DAQ-STC or Am9513 counter to generate a 
  522. continuous TTL pulse train or a delayed TTL pulse on its OUT pin. This 
  523. project also incorporates ai_async.c and ai_async.uir so that you can 
  524. monitor the pulses on an analog input channel. 
  525.  
  526. ctri_pls.prj - This module shows you how to use an 8253 counter on the 
  527. Lab boards, SCXI-1200, DAQPad-1200, PC-LPM-16, or the DAQCard-700 to 
  528. generate square waves and single pulses.  There are some external 
  529. connections that need to be made on your DAQ device for proper operation 
  530. of this example.  The connections are detailed in the Instructions 
  531. section of ctri_pls.uir.         
  532.  
  533. SIMPLE
  534.  
  535. This directory contains simple sample programs that use the Easy I/O for 
  536. DAQ Library.  The goal of these projects is to introduce DAQ 
  537. concepts using a minimal amount of source code.  
  538.  
  539. ai^acq.prj - performs a timed analog acquisition using 
  540. AIAcquireWaveforms() and plot the results to a graph. 
  541.  
  542. ai^async.prj - performs an asynchronous timed analog acquisition using 
  543. AIStartAcquisition(), AICheckAcquisition(), AIReadAcquisition(), and 
  544. AIClearAcquisition().  
  545.  
  546. ai^log.prj - logs data to disk while asynchronously acquiring data. Data 
  547. can be stored in ASCII format for importing into a spreadsheet or stored 
  548. as binary to optimize for speed.
  549.  
  550. ai^samp.prj - reads analog input channels using AISampleChannels() and 
  551. plots the results to a strip chart.
  552.  
  553. ai^trig.prj - calls AIAcquireTriggeredWaveforms() repetitively and 
  554. displays triggered data on a graph.
  555.  
  556.  
  557. EXTCOMP (Windows 95 and Windows NT Only)
  558. --------------------------------------
  559.  
  560. UIRCBCKS
  561.  
  562. In each of four directories are the files necessary to build an
  563. executable in one of the supported external compilers which makes
  564. use of the cvi run-time dll and a .uir file.
  565.  
  566.  
  567. FILEIO
  568. ------
  569.  
  570. fileio.prj - demonstrates a basic  file I/O operation.  This sample 
  571. program generates a waveform and stores the data to a file in either 
  572. ASCII or binary format.  Another subroutine reads the file and re-
  573. displays the waveform.  The program makes use of the ArrayToFile and 
  574. FileToArray functions to write and read from the file.
  575.  
  576. Note:  The usage of the FmtFile and ScanFile functions along with other 
  577. format and scan functions is documented with numerous examples in the 
  578. "Formatting and I/O Library" section of the Standard Libraries Reference 
  579. Manual.
  580.  
  581.  
  582. GPIB
  583. ----
  584.  
  585. gpibrw.prj - implements a simple GPIB application.  This program will 
  586. send commands to a selected GPIB address and receive data from the 
  587. device at that address.  If no GPIB device is connected you can select 
  588. to send commands to the GPIB controller board to verify its operation.  
  589. This program makes use of GPIB device functions such as ibwrt and ibrd 
  590. and board functions such as ibic.
  591.  
  592.  
  593. PRINTING
  594. --------
  595.  
  596. hires.prj - is a sample program that makes use of the PrintGraphHiRes 
  597. function to print a strip chart in high resolution format.  The program 
  598. will print two graphs on the default printer showing how the printout 
  599. looks before and after using the PrintGraphHiRes function.  This program 
  600. uses the High Resolution Printing instrument driver which is provided in 
  601. the toolslib\printing directory.
  602.  
  603.  
  604. RS232
  605. -----
  606.  
  607. serial.prj - illustrates a typical communication with a RS-232 device.  
  608. This program will send commands to a serial device and receive data 
  609. through the serial port.  The port to be used in communication can be 
  610. configured for speed, handshake and other parameters.  Some of the 
  611. functions used are OpenComConfig, ComWrtByte and ComRdByte to open the 
  612. serial port, write and read from it, respectively.
  613.  
  614.  
  615. SOUND
  616. -----
  617.  
  618. sndplay.prj - a demonstration of how to play .WAV files in MS Windows.
  619. The program displays a listing of .WAV files in a directory and allows
  620. you to play them using your sound card or PC speaker (it is assumed that
  621. you have the proper drivers installed).  In Windows 3.1, this program
  622. uses the playsnd.fp instrument from the cvi\toolslib\sound directory.  In
  623. Windows 95 and Windows NT, this program uses the Windows SDK multimedia
  624. library directly to achieve the same result.
  625.  
  626.  
  627. TCP
  628. ---
  629.  
  630. tcpserv.prj - demonstrates how to use functions in the TCP library to 
  631. set up TCP server to which a client can connect via TCP protocol.  The 
  632. program implements a talk application which allows two users connected 
  633. via TCP to communicate back and forth.  The server program can both 
  634. receive and send data to the client.  The program makes use of the 
  635. RegisterTCPServer function to activate the TCP server and ServerTCPWrite 
  636. to write data to the client. 
  637.  
  638. tcpclnt.prj - demonstrates a TCP client implementation.  The client 
  639. connects to the server started by  the tcpserv.prj program, accepts 
  640. commands from the user interface and sends them to the server via TCP.   
  641. The client will also receive any data coming from the server. This 
  642. example makes use of  functions such as ConnectToTCPServer, 
  643. ClientTCPWrite and ClientTCPRead to communicate with the server.
  644.  
  645.  
  646. USERINT
  647. -------
  648.  
  649. 2yaxis.prj - shows how to use left and right Y axes on the same 
  650. graph and how graph cursors can be assigned to the two axes.
  651.  
  652. autostrp.prj - demonstrates how you can autoscale the Y-axis on a 
  653. strip chart.   The UI library supports autoscaling only on graphs, 
  654. not on strip charts.  This program simulates autoscaling by storing 
  655. the data before sending it to the chart, and then using SetAxisRange 
  656. to modify the Y-axis as needed.
  657.  
  658. build.prj - is a simple program that generates a random number and 
  659. displays it on a numeric indicator.  The GUI for this application is 
  660. created programmatically.
  661.  
  662. callback.prj - shows the use of the callback programming model in CVI as 
  663. opposed to the event-loop model.  This program generates a set of random 
  664. numbers and plots them on a graph control with the PlotY function.  The 
  665. user interface events are processed by callback functions associated 
  666. with a control.
  667.  
  668. canvas.prj - demonstrates drawing on a Canvas control, including objects
  669. such as arcs, rectangles, polygons, lines, ovals and bitmaps.
  670.  
  671. canvsbmk.prj - shows the increase in speed you can achieve by using
  672. a canvas control control instead of a graph control for drawing objects
  673. such as arcs, rectangles, polygons, lines, ovals and bitmaps.
  674.  
  675. chart.prj - demonstrates the use of a strip chart control.  The program 
  676. plots three randomly  generated traces on the same chart which is 
  677. continuously updated by the callback function of a timer control.
  678.  
  679. clipbord.prj - demonstrates how to use the clipboard functions to transfer
  680. images and text to and from the system clipboard.
  681.  
  682. cursors.prj - demonstrates the use of cursors on a graph.  This program 
  683. allows the user to move a set of different style cursors, obtain their 
  684. x-y coordinates and zoom in on a region delimited by the cursors.  
  685. Functions such as GetGraphCursor, SetGraphCursor and SetAxisRange are 
  686. used.
  687.  
  688. drawpad.prj - shows how to use a canvas control as a drawing port or 
  689. scratch pad for the mouse.
  690.  
  691. events.prj - shows how to recognize many of the low-level events and 
  692. event-related information that LabWindows/CVI passes from the user 
  693. interface to the user program. This program uses control and panel 
  694. functions to process the events as they pass through the hierarchy of 
  695. callback functions. Event specific information such as the x-y 
  696. coordinate of a mouse click is displayed in a text box control.
  697.  
  698. getusrev.prj - shows the event loop programming model. Although the 
  699. callback function model is much more flexible and easy to use, the event 
  700. loop model can be used to advantage in certain applications (such as 
  701. modal dialog boxes). LabWindows for DOS programs use the event loop 
  702. model exclusively. Thus, programs translated from LW/DOS use the event 
  703. loop model unless you restructure them to use the callback model. 
  704.  
  705. graphs.prj - is an application program that makes use of most of the 
  706. plot functions, such as PlotY, PlotLine and PlotWaveform, to display 
  707. various lines and shapes on a graph control.  Colors can be 
  708. interactively changed with the use of a color numeric control. 
  709.  
  710. imagedit.prj - this is a very simple program which modifies the colors 
  711. of an existing image.  It loads an image loading them into a picture ring 
  712. and then makes use of the GetImageBits and SetImageBits functions.
  713.  
  714. intgraph.prj - this shows the different ways in which intensity plots 
  715. can be used in a graph.  It allows you to experiment with the different 
  716. interpolation options as you plot a semi-random block of data.
  717.  
  718. io.prj - is a very simple program that makes use of the standard I/O 
  719. window through C calls such as printf and scanf.
  720.  
  721. keyfiltr.prj - demonstrates how to alter a control's behavior by 
  722. responding to keypress events.  The program displays a string control 
  723. and modifies how it handles keyboard input according to options selected 
  724. using checkboxes.
  725.  
  726. listbox.prj - demonstrates how to add and delete items from a list box 
  727. control with functions such as InsertListItem and DeleteListItem.
  728.  
  729. listdelx.prj - shows how to add items of different colors to a list box 
  730. control.  Appropriate escape characters in a string can control its 
  731. background and foreground colors as well as the positioning in the list 
  732. box.  A list of the available escape sequences can be found in the help 
  733. for the Item Label parameter in the InsertListItem function panel.
  734.  
  735. menus.prj - shows how menu bars can be created and used in a CVI 
  736. application.   The pull-down menus have cascade options and hot keys 
  737. associated with them.   Menu callback functions are used to process the 
  738. menu selections.  A text box control is used to display a help note.
  739.  
  740. moustate.prj - show how to use the GetGlobalMouseState and 
  741. GetRelativeMouseState functions.  These functions can be used to 
  742. determine the current position of the mouse or the current state of the 
  743. mouse buttons or SHIFT and CTRL keys on the keyboard. 
  744.  
  745. panels.prj - demonstrates how to load multiple panels and sub-panels. The 
  746. sub-panels are windows owned by another panel.
  747.  
  748. picture.prj - demonstrates how picture controls can be used to enhance a 
  749. user interface.  The user interface displays two PCX images imported 
  750. into two picture controls.  The two images are placed on top of each 
  751. other and, when a left click event occurs on the picture control, a 
  752. callback function is called to hide the current image and display the 
  753. other.
  754.  
  755. piedemo.prj - demonstrates the use of a canvas control to draw a pie 
  756. chart using an instrument driver.
  757.  
  758. popups.prj - shows most of the popup panels that can be used in 
  759. LabWindows/CVI.  Functions such as FileSelectPopup and MessagePopup are 
  760. used in a short user tutorial.
  761.  
  762. textbox.prj - demonstrates how a text box control can be used in CVI to 
  763. display help and status information.  Various actions that could be 
  764. performed on a text box are shown, such as how to add a new line of 
  765. text, how to insert and how to delete text.
  766.  
  767. timeaxis.prj - demonstrates the use of arbitrary axis labels for a graph.  
  768. Notice that X-axis labels are labeled as time increments instead of integer 
  769. values. For this example, each point on the graph represents 1 second.  
  770. Moving the graph cursor on the graph with the mouse will update the time 
  771. value displayed in the Graph Details area of the panel.
  772.  
  773. timerctl.prj - demonstrates how a timer control can be used to 
  774. continuously update a strip chart.  The strip chart is updated even when 
  775. other controls are operated or when the strip chart is obscured by a 
  776. popup panel.
  777.  
  778.  
  779. UTILITY
  780. -------
  781.  
  782. physdemo.prj - is a sample program which shows how to access physical 
  783. memory from LabWindows/CVI.  This program makes use of the 
  784. ReadFromPhysicalMemory and WriteToPhysicalMemory functions, found in the 
  785. Utility library, to read and write to an absolute address in memory (in 
  786. this case the monochrome display memory).
  787.  
  788.  
  789. WIN32 (Windows 95 and Windows NT Only)
  790. --------------------------------------
  791.  
  792. oneinst.prj - demonstrates how to use a new function available in
  793. the Windows 95 and NT versions of CVI to insure that only one instance
  794. of your application will be running on your computer at a time.
  795.