home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 26 / CD_ASCQ_26_1295.iso / vrac / fluke13.zip / FLUKECOM.HLP < prev    next >
Text File  |  1995-07-05  |  18KB  |  434 lines

  1. * * * * * * * * * Help for flukecom Procomm Plus Macro, V1.2 * * * * * * * * * 
  2.  
  3. * * * * * * * * * * * * * * * Script control * * * * * * * * * * * * * * * * 
  4.  
  5. :                   COMMENT for any use you wish.
  6.  
  7.                     Please note that a space must be present between the
  8.                     colon and the comment
  9.  
  10. beep                BEEPS on local machine only, does nothing else.
  11.  
  12. cd <directory>      CHANGES DIRECTORY so you can put files somewhere else.
  13.  
  14. clock <hr> <min>    WAITS FOR TIME to occur, specified in 24hr format.  Can
  15.                     be terminated with <esc>.
  16.  
  17. clock+ <hr> <min>   like above only takes current time and adds an INCREMENT
  18.                     TO THE CURRENT TIME
  19.  
  20. del <filespec>      DELETES file
  21.  
  22. dir <filespec>      LISTS FILES in directory, use *.* for all
  23.  
  24. edit <filespec>     invokes the DOS EDITOR
  25.  
  26. ifgoto <min> <max> [<count>]    Will GOTO STATEMENT FOLLOWING LOOP command
  27.                                 (default first line in file if loop not used)
  28.                                 if value of last 'read' is between the
  29.                                 min and max (inclusive).  In other words,
  30.                                 the jump will occur if min<=read<=max is true.
  31.  
  32.                                 The optional count parameter will limit
  33.                                 the number of times the jump will be 
  34.                                 executed to that specified.
  35.  
  36.                                 The zero command may be used to clear the
  37.                                 internal loop counter (is cleared at the
  38.                                 begining of every macro). 
  39.  
  40.                                 This command only works for macros.
  41.  
  42.                                 If a count of -1 is given, the counter will
  43.                                 not be updated, this is useful as shown in
  44.                                 examples.
  45.  
  46.                                 A count of 0 will act as a placeholder
  47.                                 (see notes).
  48.  
  49. ifnotgoto <min> <max> [<count>] exactly like above only will JUMP ON THE
  50.                                 NOT of the condition above.  Therefore
  51.                                 read < min or read > max must be true.
  52.  
  53. init                            RESTARTS the script.
  54.  
  55.                                 WARNING! This is like quiting the script
  56.                                 and starting up again.  All settings are
  57.                                 lost including status of last read
  58.                                 variable, current loop setting, and log
  59.                                 file turned on.
  60.  
  61. logon <filename>    WRITES all transactions to specified file.
  62.  
  63. logoff              STOPS logging.
  64.  
  65. loop                LABEL for ifgoto, ifnotgoto (defaults to top of 
  66.                     macro if not present).
  67.  
  68. mkdir               CREATES DIRECTORY.
  69.  
  70. pause <secs>        STOPS MACRO EXECUTION for number of seconds, can
  71.                     be terminated with <esc>.
  72.  
  73.                     Please note that the clock time starts after the pause
  74.                     command is issue.  Therefore timing is critical, you
  75.                     must account for the time that it takes to execute
  76.                     other statements.  For example:
  77.  
  78.                     read 1
  79.                     pause 60
  80.                     read 1
  81.                     pause 60
  82.                     ...
  83.  
  84.                     will cause reads approximately every minute but 
  85.                     after a short time the clock will drift due to the time
  86.                     to execute the read.  See clock+ if this is an issue.
  87.  
  88. play <filename>     RUNS MACRO, can be terminated with <esc>.  By convention
  89.                     the supplied macro names end with .mac.  However, there
  90.                     is nothing that forces this.  You can use the 'dir *.mac'
  91.                     command from the flukecom prompt to display your macros.
  92.  
  93.                     If the macro named 'profile.mac' is located in the 
  94.                     current directory, it will automatically be played upon
  95.                     startup.
  96.  
  97. pwd                 Lists CURRENT DIRECTORY.
  98.  
  99. ren <old> <new>     RENAMES old filename to new filename.
  100.  
  101. rmdir <filename>    REMOVES a directory.
  102.  
  103. type <filename>     DISPLAYS a file.
  104.  
  105. quit                STOP.
  106.  
  107. shell               Drops to DOS SHELL.
  108.  
  109. timestamp [<filename>]  PRINTS TIME AND DATE for display, useful for logging.
  110.  
  111.                         If optional filename is present, the date and time
  112.                         will be written to file.
  113.  
  114. zero                sets the loop COUNTER TO ZERO, see ifgoto & ifnotgoto.
  115.  
  116. * * * * * * * * * * * * * * * Meter control * * * * * * * * * * * * * * * * 
  117.  
  118. arm                 REARMS trigger on meter. Does nothing if meter is
  119.                     currently ready for trigger.
  120.  
  121. autosetup           Same as AUTOSET key on meter.
  122.  
  123. default             Changes meter to POWER ON condition.
  124.  
  125. get <filename>      GETS the current configuration and creates a data file.
  126.  
  127. local               RESTORES front panel key operation.   Alternatively,
  128.                     power the meter off then on again.  WARNING with this
  129.                     procedure.  This script will not attempt to autobaud
  130.                     after the initial configuration.  Therefore, since the
  131.                     meter will be set back to 1200 baud, the script will
  132.                     no longer talk to the meter.  Restart the script to
  133.                     initialize the meter.
  134.  
  135. lockout             DISABLES AUTOSET operation during remote, only way
  136.                     to go local is to power off the meter or issue local.
  137.                     See notes in local.
  138.  
  139. put <filename>      PUTS the saved configuration back into the meter from
  140.                     the specified data file.
  141.  
  142. recall <num>        RECALLS a defined setup in the scopemeter.
  143.  
  144.                     There are two ways to save a setup.  First is to use the
  145.                     front panel keys on the scopemeter and save the current
  146.                     setup under a setup memory or to a waveform memory.  The
  147.                     second is to use the save command.
  148.  
  149.                     <num> is as follows:
  150.  
  151.                     1-10 specifies the setup memories 1-10
  152.                     101-111 is the waveform memories as specified below:
  153.  
  154.                        101         Channel A
  155.                        102         Channel B
  156.                        103         Channel A+/-B
  157.                        104         temporary 1
  158.                        105           and so on
  159.                        106
  160.                        107         memory 4
  161.                        108           and so on
  162.                        109
  163.                        110
  164.                        111
  165.  
  166.                     See the manual for further explanations.  If you find
  167.                     a use for this send me a script and I'll clean this up.
  168.  
  169. remote              DISABLES all front panel keys except autoset (autoset
  170.                     may be used to restore local operation).  Power may
  171.                     also be used to restore operation.  See local.
  172.  
  173. reset               CLEARS meter I/O buffers, does not destroy comm setup
  174.                     or any other waveforms or settings.
  175.  
  176. save <num>          SAVES setups to memory.  See recall for description.
  177.  
  178. trigger             FORCE TRIGGER of scope.
  179.  
  180. version             Displays IDENTIFICATION string from meter.
  181.  
  182. * * * * * * * * * * * * * * * Data Handling * * * * * * * * * * * * * * * * 
  183.  
  184. copy <src> <dest>   COPIES anything to anything.
  185.  
  186.                     src can be any of of the following
  187.                        a           Channel A
  188.                        b           Channel B
  189.                        ab          Channel A+/-B
  190.                        temp1       temporary 1
  191.                        temp2         and so on
  192.                        temp3
  193.                        memory4     memory 4
  194.                        memory5       and so on
  195.                        memory6
  196.                        memory7
  197.                        memory8
  198.                        <filename>  disk file which has the *.dat and *.hdr
  199.                                    files.  Do not specify an extension
  200.             
  201.                      dest can be any of the above plus
  202.                        datestamp   creates a file with DDHHMMSS.* stamp
  203.  
  204.                      See below for extension explanation
  205.  
  206. read <meas> [<filename>] GETS the respective defined value.
  207.  
  208.                      The value is left in an internal variable which may be 
  209.                      tested with the ifgoto and ifnotgoto statements.
  210.  
  211.                      If the optional filename is present, data will
  212.                      be written to it in a comma separated format with
  213.                      a date and timestamp.
  214.  
  215.                      meas is one of the following:
  216.                         -in scope mode-
  217.                          1        dV             voltage between cursors
  218.                          2        dt             time between cursors
  219.                          3        1/dt           as above
  220.                          4        TRIG to -1-    trigger to cursor 1
  221.                          5        RMS            RMS value measured
  222.                          6        MEAN           MEAN value measured
  223.                          7        P-P            peak peak voltage
  224.                          8        MAX-P          maximum peak
  225.                          9        MIN-P          minimum peak
  226.                          10       FREQ           signal frequency
  227.                          11       RISE           rise time (10%-90%)
  228.                          12       PHASE src>des1 with 2 or more signals
  229.                          13       PHASE src>des2 with 3 or more signals
  230.                          14       PHASE src>des3 with 4 signals
  231.                          15       VOLT AT -1-    voltage value at cursor 1
  232.  
  233.                         -in meter mode (read manual!)-
  234.                          1        first measurement result
  235.                          2        second measurement result
  236.                          3        first calculated result
  237.                          4        maximum (record) result
  238.                          5        average (record) result
  239.                          6        minimum (record) result
  240.                          7        maximum time
  241.                          8        average time
  242.                          9        minimum time
  243.                          10       duty cycle
  244.  
  245.                      If enough people ask, I'll consider putting in
  246.                      the mnemonics instead of just supporting the numeric
  247.                      values.  Maybe next rev.  In any event, the numerics
  248.                      will be supported in the future.
  249.  
  250. * * * * * * * * * * * * * * * Example Scripts * * * * * * * * * * * * * * * * 
  251.  
  252. These scripts are intended for use with the scope mode.  If in the
  253. meter mode, you need to switch to meter mode of operation.
  254.  
  255. This script is provided to just get you familiar with the scripting
  256. language.  To execute this script type 'play test.mac'.  Please note that
  257. you cannot use extensions on filenames.  If the file exists that you
  258. specify, IT WILL BE OVERWRITTEN!
  259.  
  260. : test.mac
  261. reset                    resets the meter, mostly to hear the beep
  262. copy a newfile           put the a waveform into newfile.*
  263. pause 5                  wait for 5 secs
  264. copy b newfilb           now grab b
  265.  
  266. This macro shows the use of the delay function.  In addition, it shows
  267. the use of the keyword datestamp which will create a filename of
  268. MMDDHHMM.*.  Please note that this macro will wait until 10:11am before
  269. it does anything.  The pause command can be used for fine control (in
  270. seconds).
  271.  
  272. : delay.mac
  273. pause 10                 wait for 10 seconds before doing anything
  274. beep                     speak to user
  275. clock 10 11              wait until 10:11am
  276. beep
  277. copy a datestamp         put channel a into a datestamped file
  278. clock 10 12              wait until 10:12am
  279. beep
  280. copy b datestamp         same to channel b
  281.  
  282. Lets say you want to grab the waveform every minute from channel a for
  283. the next hour.  Please note that the use of ifnotgoto here is actually
  284. just to force 60 jumps.  The condition specified will never be false
  285. since the min is greater than the max.  Also, no read operation is needed
  286. since the condition is always false regardless of what is stored in the
  287. last read variable.  The zero command is not needed since it defaults to
  288. cleared out upon starting the macro.
  289.  
  290. : minbymin.mac
  291. loop
  292. clock+ 0 1               wait for the next minute to come up
  293. copy a datestamp
  294. ifnotgoto 1 -1 60        do for 60x unconditionally
  295. quit                     leave script
  296.  
  297. Similarly, lets say you want to start logging voltages every minute
  298. after 1pm.  <esc> can be used to terminate the script
  299.  
  300. : waitgrab.mac
  301. clock 13 0               wait till 1pm
  302. loop
  303. read 1 logfile.dat       presence of filename causes info to be written
  304. clock+ 0 1
  305. ifnotgoto 1 -1
  306.  
  307. Lets say you want to wait for a single shot event to get captured and
  308. download this to the meter.  Set the meter up for single event, turn off
  309. free run, turn on the cursors and set them at the extreme left and 
  310. right hand portion of the screen, enable the Vpp measurement.  Set
  311. up the meter for proper triggering.
  312.  
  313. Fluke doesn't have a very nice way of doing this so check out this
  314. trick (from Fluke's BBS).
  315.  
  316. The peak to peak voltage is zero for the null waveform and when a
  317. real waveform is captured, it is downloaded since the voltage is nonzero.
  318.  
  319. : single.mac
  320. : script to automatically wait for a single shot event and download it
  321. : will then rearm meter and wait for next event.  Do this 10 times
  322. loop
  323. read 7                  read the peak to peak voltage
  324. ifgoto 0 0 -1           a -1 code will not update the counter          
  325. beep                    voltage was greater than zero
  326. copy a datestamp        get the waveform
  327. copy null a             TRICK: rewrite the waveform to all zeros
  328. arm                     rearm the meter
  329. ifnotgoto 1 -1 10       unconditionally do this 10 times
  330.  
  331. Put two different setups in recall memory 1 and 2.  The current setup will
  332. be put in 3.
  333.  
  334. : flksetup.mac
  335. save 3                current setup put in memory 3
  336. recall 1
  337. trigger               force trigger
  338. copy a wave1
  339. recall 2
  340. trigger               force trigger
  341. copy a wave2
  342. recall 3              restore meter
  343.  
  344. I spent several hours getting the copy command to be very general
  345. so I hope that someone uses it.  In particular you can copy a waveform
  346. or file to a waveform or file.  The datestamp keyword is only good for a
  347. destination.
  348.  
  349. : copywave
  350. mkdir waveform          create a subdirectory
  351. cd waveform
  352. copy a wavea            put channel a into file wavea.*
  353. copy b memory5          and channel b into memory5
  354. copy wavea b            put the wavea file into b
  355. : copy a b                is also possible
  356. copy wavea acopy        make a disk file copy called acopy
  357. cd ..                   return to where you were
  358.  
  359. If you wish to insure that someone doesn't mess with the meter buttons,
  360. you can use the commands for control.  However, remember that the power
  361. button always works so this is somewhat of a ridiculous point.
  362.  
  363. : remote.mac
  364. version                 display meter rev
  365. remote                  disable front panel except autoset
  366. lockout                 disable autoset
  367. clock 1 0               wait until 1 am
  368. read 1
  369. local                   restore front panel operation
  370.  
  371. The script can automatically execute a given sequence by naming the script
  372. 'profile.mac' and putting it in the current directory
  373.  
  374. : this is profile.mac, default macro for flukecom
  375. get default.set
  376.  
  377. Finally, lets assume you want to run down the batteries on the scopemeter
  378. and know how long it took.  You will have to terminate this with the 
  379. <esc> key.  As you know, the meter will shut itself off with no activity.
  380. This makes it busy to force it to run down.  This can be used to 
  381. recondition the batteries.  In theory, you should use a logoff to 
  382. close the log file after you use <esc> to get out of this script, however
  383. in practice, it doesn't seem necessary.
  384.  
  385. : killbat.mac
  386. logon bat.log                put all stuff in bat.log
  387. zero
  388. loop
  389. timestamp
  390. read 1
  391. ifnotgoto 1 -1
  392.  
  393.                            * File structure *
  394. A given capture to disk for the copy command will have three separate files.
  395.  
  396. .hdr contains an ascii version of the header and has the waveform
  397. .dat is always 512 bytes and contains the binary data for the waveform
  398. .csv is a comma separated value version of the waveform readable by Excel 5.0
  399. (as well as others).
  400.  
  401. The .csv file is provided as output to the user, the script does not use
  402. it once written.
  403.  
  404. * * * * * * * * * * * * * * * * Other Stuff * * * * * * * * * * * * * * * * * 
  405.  
  406. - Don't forget that Fluke has only used 1 A/D in the meter and if you wish
  407. to obtain timing between to simultaneous waveforms (A and B), there is a
  408. close to 17ms delay!
  409.  
  410. - As it turns out, the interpreter doesn't look on the command line past
  411. the required (or optional) parameters.  If you have filled out all of the
  412. parameters for a particular command, you can put anything else on the
  413. line as a comment.
  414.  
  415. For example
  416.  
  417. ifgoto -1 1 40   wait for voltage to exceed 1V for a max of 40x
  418.  
  419. is ok, but
  420.  
  421. ifgoto -1 1      wait for voltage to exceed 1V for a max of 40x
  422.  
  423. is not since 'wait' will cause an error.  However, in most cases a
  424. zero can be substitued for a null parameter so
  425.  
  426. ifgoto -1 1 0    wait for voltage to exceed 1V
  427.  
  428. is ok as well.  0 in this context is crazy setting anyway since why would
  429. you put the statement in to execute it zero times.
  430.  
  431. This could be a problem if and when I extend the language.  Additional 
  432. parameters for a given command would be pulled out of comment fields for
  433. existing macros.
  434.