home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / a / adclogger / !ADCLogger / ReadMe < prev    next >
Encoding:
Text File  |  1994-10-21  |  13.4 KB  |  345 lines

  1. ###########################################################################
  2.  
  3.                           !ADCLogger
  4.                       By Julyan Bristow
  5.                         Version 1.20
  6.  
  7. ###########################################################################
  8.  
  9. 1.0 Introduction and Overview
  10.  
  11. This is an application to allow data to be displayed on the screen and
  12. logged to a file using an Archimdes fitted with an analogue to digital
  13. conversion input port.  The program operates on the desktop and is fully
  14. multi tasking.
  15.  
  16. For this particular application's development, the Acorn I/O Podule (Part
  17. No AKA 10) was used.  However, it uses legal os_byte calls, and should
  18. therefore support any other devices that use the same calls.
  19.  
  20. ###########################################################################
  21.  
  22. 2.0 Starting the Program
  23.  
  24. Load the program in the normal way by double-clicking on the icon in the
  25. filer window.  The application will install itself on the iconbar.
  26.  
  27. The application loads a default configuration file on start up.  If this
  28. file is not present, or fails to load, warning messages are given and a
  29. bare minimum configuration is created.  This file is called 'config' and is
  30. placed in the !ADCLogger directory.  Should you wish to alter the location
  31. of the default configuration file, alter the following:  Edit the Messages
  32. file.  Alter the text after 'defcon:' from <ADCLogger$Dir>.Config to the
  33. full path of your config file.  If you are using !Edit, you can SHIFT-DRAG
  34. the file and the path will be automatically inserted.
  35.  
  36. Clicking 'menu' over the icon will give a menu with three options as
  37. follows:
  38.  
  39.         Info            Program version, author etc
  40.  
  41.         Config          Clicking on this will allow for configuration of
  42.                         the displayed and logged channels
  43.  
  44.         Quit            Clicking on this will Quit the program.  If logging
  45.                         is in progress, a confirmation to quit will be
  46.                         required.
  47.  
  48. Clicking with 'select' will display the analogue port display dialogue box.
  49.  
  50. I use !NewLook as supplied by Acorn for RISC OS 3.1.  I have checked the
  51. program without the !NewLook icons and some of it looks a bit naff.  Sorry,
  52. I am not going to alter it for those without RISC OS 3.1.
  53.  
  54. ###########################################################################
  55.  
  56. 3.0  Configuration
  57.  
  58. This dialogue box is obtained by selecting the 'config' option from the
  59. iconbar menu.
  60.  
  61. This opens a large dialogue box which allows for two main operations: (i)
  62. giving names and units for the analogue channels, and allowing for
  63. conversion of read voltage to 'real' units and (ii) setting up of the
  64. logging parameters eg the frequency and duration of the log.
  65.  
  66. For the fields where a user input is required, use the TAB key, or the up
  67. and down cursor keys or the mouse th move to the desired field.
  68.  
  69. 3.1  Channel Configuration
  70.  
  71. 3.1.1  Analogue Channels
  72.  
  73. There are 4 of these available on the Acorn I/O podule.  The program allows
  74. any of the 4 to be used as desired by the user.
  75.  
  76. In order to activate a chosen channel, click on the radio icon next to the
  77. channel to be used.  This enables the channel to be toggled on or off.  If
  78. the channel is active, the name and unit of the channel can be entered in
  79. the appropriate box.
  80.  
  81. Two further inputs are possible for each channel -  Units/Volt and Zero
  82. value.  These allow for converting voltages from sensors to real units. 
  83.  
  84. This applies a linear conversion, so any linear response sensor (ie one
  85. which uses a conversion of the form y=mx+c (where y = real units, x =
  86. measured voltage, m = constant gradient and c = zero offset) can be
  87. applied.  For example, if using an LM35 temperature sensor, its output is 0
  88. volts at 0 Deg C and 1 volt at 100 Deg C.  Thus Units/Volt = 100.0 and Zero
  89. value = 0.0.
  90.  
  91. If the dialogue box is to display voltages, the Units/Volt should be 1.0
  92. and Zero value 0.0.
  93.  
  94. 3.1.2  Button Channels
  95.  
  96. There are two button channels available on the Acorn I/O podule.  As with
  97. the analogue channels, either of them may be selected for display with the
  98. radio icon.  If selected, a name for the button channel may be entered. 
  99. The buttons are displayed as either 1 or 0 for on or off.
  100.  
  101. The button channels are not saved to the file.
  102.  
  103. 3.2  Display and Logging of Channels
  104.  
  105. If any of the ADC channels or buttons are selected or deslected, they are
  106. seen immediately in the analogue port display dialogue box (see below). 
  107. However, if a channel is to be logged to disc, only those channels selected
  108. at the time of starting the logging are recorded.  Ie if a log has already
  109. been started, selecting or removing channels from the display window will
  110. have no effect on the channels being recorded.
  111.  
  112. 3.3  Reference Voltage
  113.  
  114. There is a field available for setting of the reference voltage as used on
  115. the Acorn I/O podule.  This is not very stable on the board and can drift
  116. with time.  This field allows the user to set the value of the reference
  117. voltage to that of their particular board.  It is also possible for the ADC
  118. chip used on the I/O podule to have a reference voltage applied to it of
  119. upto 2.5 Volts (ref - RS cataloge), and so some users may have applied
  120. thier own reference voltage different to that on the podule.  This allows
  121. for this eventuality.
  122.  
  123. The application converts the input to a voltage as follows:
  124.  
  125.   voltage = (read ADC steps / 65536) * reference voltage
  126.  
  127. 3.4  Setting Logging and Display Timings
  128.  
  129. 3.4.1  Timing of Updates
  130.  
  131. This application is fully multi tasking.  Ie it polls the WIMP and claims
  132. NULL events. On each NULL event it compares the time at that instant with
  133. the time of the previous event.  If that is equal to or greater than the
  134. required interval, then a measurement is logged to disk or the screen
  135. updated.  For most of the time therefore, the data will be logged/displayed
  136. at the correct frequency.  However, at times there can be great demand on
  137. processor time (eg formatting disks, complex rendering operations etc) and
  138. so the data could be recorded at a greater interval than that required.  As
  139. the logging is controlled by software, then there is nothing that can be
  140. done about this I'm afraid.
  141.  
  142. 3.4.2  Display Update Interval
  143.  
  144. The values read from the active channels are updated on the screen at an
  145. interval defined by the user.  This may be from 1 second upwards.  Use the
  146. up arrow to increase the time and the down arrow to decrease.
  147.  
  148. 3.4.2.1  Logging Interval
  149.  
  150. The logging interval may be selected in seconds, minutes or hours by
  151. clicking on the appropriate radio icon.  When selecting a different unit of
  152. interval, the time interval is converted to the appropriate unit.  For
  153. example if the logging interval is set to 60 seconds, and then the minute
  154. interval selected, the displayed interval will be 1 minute, similarly if an
  155. interval of 1 hour has been selected, and then the seconds interval chosen,
  156. 3600 seconds will be displayed.
  157.  
  158. Each individual time interval may be set independantly and there is no
  159. maximum limit ie 120 seconds can be set as can 2 minutes.
  160.  
  161. Once logging has started, these times cannot be altered.
  162.  
  163. 3.4.2.2  Logging Duration
  164.  
  165. The duration may be defined in 4 ways: (i) as the number of values to be
  166. collected, or (ii) the time for which logging is to take place over, for
  167. example there may be 600 values recorded at a frequency of 15 seconds, or
  168. readings every 15 seconds can be taken over a time of 10 minutes (giving
  169. 10*60/15=40 readings) etc.
  170.  
  171. Once logging has started, the duration cannot be altered.
  172.  
  173. 3.5  Update of of Data
  174.  
  175. Clicking on this icon will update the application with the names, units and
  176. conversions for each ADC channel and the button information.  Timing
  177. information is always up to date.
  178.  
  179. 3.6  Canceling Changes to Channel Descriptions
  180.  
  181. Clicking on this icon will close the dialogue box and not update the ADC
  182. channel and button information.  Timing information is always up to date.
  183.  
  184. 3.7  Saving of Configuration File
  185.  
  186. Clicking on this icon will open a small save dialogue box.  Drag the file
  187. icon to the desired destination, or type in the full pathname required. 
  188. The default path is the !ADCLogger directory (via the system variable
  189. <ADCLogger$Dir>, so if desired only RETURN need be pressed.  The default
  190. filename of <ADCLogger$Dir>.config is that of the configuration file needed
  191. for the main application on start up.
  192.  
  193. 3.8  Loading Alternative Configuration Files
  194.  
  195. Alternative configuration files may be loaded by dragging the config files
  196. icon onto the config dialogue box.  Confirmation is required from the user
  197. prior to the actual loading of the new config file.  Note - the current
  198. version does not test the loaded file for being a config file - so don't
  199. load any old file.  This is to be corrected at a later version.
  200.  
  201. ############################################################################
  202.  
  203. 4  ADC Dialogue Box
  204.  
  205. This dialogue box is obtained by clicking 'select' over the iconbar icon.
  206.  
  207. 4.1  Display
  208.  
  209. This dialogue box displays values from all active channels and updates the
  210. values at the time interval defined in the config dialogue box.  Displayed
  211. for each analogue channel is its name, the voltage input, the conversion to
  212. real units and its units.  For the button channels, only the status (ie 1
  213. or 0) is shown.
  214.  
  215. Should the user add or delete the channels to be displayed from the config
  216. dialogue box whilst the ADC dialogue box is open, then this will be
  217. reflected in the ADC dialogue box the next time it is to be updated.
  218.  
  219. 4.2  Logging Data
  220.  
  221. 4.2.1  Preparation
  222.  
  223. Before logging can commence, it is necessary to create the file for the
  224. data to be written to.  Clicking on the 'Prepare Logging' icon will open a
  225. small save dialogue box.  Drag the file icon to the desired destination, or
  226. type in the full pathname required.
  227.  
  228. The file created is of type CSV (Comma Seperated Variable) and can be
  229. directly imported into a number of packages for further analysis or
  230. plotting.  It would appear that CSV filetypes are not given an icon as
  231. standard under RISC OS 3.1, so a standard CSV file icon is included in the
  232. !Sprites file for RISC OS 2 users.  I have tested it with !Eureka and
  233. !GraphPro.
  234.  
  235. 4.2.2  Starting Logging
  236.                        
  237. To start logging data click on the 'Start Logging' icon.  From this moment
  238. onwards, it is not possible to alter the logging frequency or duration, or
  239. the channels to be logged, so these must be previously set.
  240.  
  241. Whilst logging is in progress, a field is available to show the percentage
  242. completed.  
  243.  
  244. 4.2.3  Canceling Logging
  245.  
  246. At any time the logging may be terminated by clicking on the 'Cancel
  247. Logging' icon.  There is no Confirmation of this action.
  248.  
  249. ###########################################################################     
  250.  
  251. Known Problems
  252.  
  253. 1       At high logging speeds (eg 1/sec) or with a lot of processor
  254.         activity there can be timing errors.
  255. 2       Have encountered problems with timing of the logging.
  256.  
  257. ###########################################################################
  258.  
  259. Future Enhancements
  260.  
  261. 1       Other suppliers analogue devices supported
  262. 2       Graphical display of input data
  263. 3       Averaging of ADC data to reduce noise
  264. 4       Add interactive help routines - important to reduce the size of
  265.         this help file!
  266.  
  267. Please send reports of any bugs/errors/suggestions for future versions. 
  268. Information on other io devices gratefully received.
  269.  
  270. ###########################################################################
  271.  
  272. Version History
  273.  
  274. Version 1.00 First release.
  275.  
  276. Version 1.10 Configuration dialogue box added
  277.  
  278. Version 1.11 Used JOBLib functions, tidied up code a bit
  279.  
  280. Version 1.20 Added logging to file
  281.  
  282. Version 1.22 Current Version - minor tweeks etc here and there
  283.  
  284. ###########################################################################
  285.  
  286. Bugs
  287.  
  288. Please report any bugs/omissions for correction in any
  289. subsequent versions to the author at the address below.
  290.  
  291. This program was written an an A440/1 with RISC OS 3.10 and
  292. an ARM 3. It should work on RISC OS 2 (eg no RO3 only calls
  293. have been used) but if not please let me know.
  294.  
  295. #################################################################
  296.  
  297. Warranty / Liability
  298.  
  299. The author makes no guarantee of the operation of this
  300. program.  It has been written and tested to the best of the
  301. authors ability, but it has not been possible to test it in
  302. every possible manner that any end user may put it to.
  303.  
  304. In addition, it is the users responsibility to ensure that
  305. any interfacing to the computer does not or cannot cause any
  306. damage to the computer.
  307.  
  308. ************************************************************
  309. ** IE THIS PROGRAM WILL ONLY READ FROM, OR WRITE TO, YOUR **
  310. **               INTERFACING HARDWARE                     **
  311. ************************************************************
  312.  
  313. #################################################################
  314.  
  315. Author
  316.         Julyan Bristow
  317.         40, Dunard Road
  318.         Shirley
  319.         SOLIHULL
  320.         B90 2HR
  321.  
  322. #################################################################
  323.  
  324. Copyright
  325.  
  326. This program was written by the above author, and has been
  327. released into the Public Domain.  This means that anyone can copy
  328. the program freely and distribute as wished.  However, you must
  329. include all the files listed below and not alter any of the files
  330. in any way.
  331.  
  332.              IE CREDIT WHERE CREDIT IS DUE
  333.  
  334. The files in this application are as follows:
  335.  
  336.         !Boot
  337.         !Run
  338.         !RunImage        The application executable file.
  339.         !Sprites         The application sprites.
  340.         Messages         Application messages.
  341.         ReadMe           This file.
  342.         Sprites          The resource sprite file.
  343.         Templates        The window templates.
  344.         Config           The default configuration file.
  345.