# We start off with reset to be certain to get control of the device no # matter what its present state. The abort command would often be # sufficient, but at the beginning it's best to play it safe since there # is no telling what state the device might be in. reset read_clock # just to see set_clock # make sure the Vector device is in sync with the PC read_clock # make sure it worked # Just for fun, let's see what's on the device: list_data # You wouldn't really do this in a script, and you certainly want to # temporarily set the bit rate to 115200 bps (use --set_bps 115200) before # downloading more than a few kilobytes of data, but in theory: # download_data 3 # download_data UWtest2 configure deptest1.pcf read_config deployment deptest1-check.pcf # should be the same as what we sent # the Explorer software seems to expect a Vector data file (*.vec) to begin # with a complete configuration dump, so start with that: read_config all test1_data.vec # overwrites the file # and then write the data to the same file (collect_data and friends append, # unlike read_config) data_file test1_data.vec collect_data 20 samples # without the following, the silly thing will just keep on collecting data # forever (even if you unplug it, since it has a battery). abort power_down # may as well conserve sleep 5m break # wake it up again # this will append to the same file collect_data 40 samples # without the following, the silly thing will just keep on collecting data # forever (even if you unplug it, since it has a battery). abort power_down # may as well conserve sleep 5m # Here we collect data based on an amount of time, and record the data onto # the device as well: break # wake it up again record_data 3m 25s abort power_down # may as well conserve # Here's an example of collecting data starting at an absolute time, until # an absolute time: sleep until 2008-03-19 10:00 am break # wake it up again record_data until 2008-03-19 1:00 pm abort power_down # may as well conserve