acq400_stream_multi
Usage
usage: acq400_stream_multi.py [-h] [--callback CALLBACK] [--burst_on_demand BURST_ON_DEMAND] [--trigger_from_here TRIGGER_FROM_HERE] [--subset SUBSET]
[--filesize FILESIZE] [--filesamples FILESAMPLES] [--files_per_cycle FILES_PER_CYCLE] [--force_delete FORCE_DELETE] [--nowrite NOWRITE]
[--totaldata TOTALDATA] [--root ROOT] [--runtime RUNTIME] [--verbose VERBOSE] [--display DISPLAY] [--combine COMBINE]
uuts [uuts ...]
Positional Arguments
- uuts
uuts
Named Arguments
- --callback
not for users, client programs can install a callback here
- --burst_on_demand
Burst Size in Samples[,./plotjob]
- --trigger_from_here
action soft trigger from this application
Default: 0
- --subset
subset command if present eg 1,5 :: strips first 5 channels
- --filesize
file size in bytes
Default: 1048576
- --filesamples
file size in samples (overrides filesize)
- --files_per_cycle
files per cycle (directory)
Default: 100
- --force_delete
silently delete any existing data files
Default: 0
- --nowrite
do not write file
Default: 0
- --totaldata
Default: 10000000000
- --root
Location to save files. Default dir is UUT name.
Default: “”
- --runtime
How long to stream data for
Default: 1000000
- --verbose
Prints status messages as the stream is running
Default: 0
- --display
Render display
Default: 1
- --combine
Combine all cycle files into one
Default: 0
Outline:
This is a script intended to connect to a UUT and stream data from port 4210.
The data that has been streamed is not demuxed and so if it is to be used then it has to be demuxed first. Something like:
>>> data = numpy.fromfile("0000", dtype="<datatype>")
>>> plt.plot(data[::<number of channels>])
>>> plt.show()
Some usage examples are included below:
1: Acquire files of size 1024kb up to a total of 4096kb:
>>> python acq400_stream.py --verbose=1 --filesize=1M --totaldata=4M <module ip or name>
2: Acquire a single file of size 4096kb:
>>> python acq400_stream.py --verbose=1 --filesize=4M --totaldata=4M <module ip or name>
3: Acquire files of size 1024 for 10 seconds:
>>> python acq400_stream.py --verbose=1 --filesize=1M --runtime=10 <module ip or name>
4: Acquire data for 5 seconds and write the data all to a single file:
>>> python acq400_stream.py --verbose=1 --filesize=9999M --runtime=5 <module ip or name>
acq400 stream
positional arguments: uuts uuts
optional arguments: -h, –help show this help message and exit –filesize FILESIZE Size of file to store in KB. If filesize > total data then no data will be stored. –totaldata TOTALDATA Total amount of data to store in KB –root ROOT Location to save files –runtime RUNTIME How long to stream data for –verbose VERBOSE Prints status messages as the stream is running