Hi Michael,
Thanks a lot for the feedback!
The csv import logs a few debug messages that might be helpful here.
On Linux, specifying -l 5 when calling sigrok-cli makes these visible.
I’m not sure how to do it on Windows. Maybe sigrok-cli works in the command
line there, too?
Sure it does - here are the results on my machine, of a sigrok-cli command resembling the
"(automatic samplerate)" example in the wiki; hopefully they'll reveal
something to get PulseView working (note, I'm running this in a MSYS2 bash shell on
Windows 10):
```
$ "C:\Program Files (x86)\sigrok\sigrok-cli\sigrok-cli.exe" --version
sigrok-cli 0.8.0-git-0e2f95c
Libraries and features:
- libsigrok 0.6.0-git-d7df9dc/4:0:0 (rt: 0.6.0-git-d7df9dc/4:0:0).
- Libs:
- glib 2.44.1 (rt: 2.44.1/4401:1)
- libzip 1.5.2
- libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1)
- libusb-1.0 1.0.20.11003-rc3 API 0x01000104
- hidapi 0.8.0-rc1
- libftdi 1.4
- Host: x86_64-w64-mingw32.static.posix, little-endian.
- SCPI backends: TCP, serial, USBTMC.
- libsigrokdecode 0.6.0-git-115f19c/4:0:0 (rt: 0.6.0-git-115f19c/4:0:0).
- Libs:
- glib 2.44.1 (rt: 2.44.1/4401:1)
- Python 3.4.4 / 0x30404f0 (API 1013, ABI 3)
- Host: x86_64-w64-mingw32.static.posix, little-endian.
$ "C:\Program Files (x86)\sigrok\sigrok-cli\sigrok-cli.exe" -l 5 -I
csv:header=yes:column_formats=t,l,l,l,l,l,l -i test.csv
sr: [00:00.000000] log: libsigrok loglevel set to 5.
sr: [00:00.000000] backend: libsigrok 0.6.0-git-d7df9dc/4:0:0.
sr: [00:00.000000] backend: Libs: glib 2.44.1 (rt: 2.44.1/4401:1), libzip
1.5.2, libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1), libusb-1.0 1.0.20.11003-rc3
API 0x01000104, hidapi 0.8.0-rc1, libftdi 1.4.
sr: [00:00.000000] backend: Host: x86_64-w64-mingw32.static.posix,
little-endian.
sr: [00:00.000000] backend: SCPI backends: TCP, serial, USBTMC.
sr: [00:00.000000] backend: Firmware search paths:
sr: [00:00.019000] backend: - C:\Users\user\AppData\Local\sigrok-firmware
sr: [00:00.019000] backend: - C:\ProgramData\sigrok-firmware
sr: [00:00.019000] backend: - C:\Users\Public\Documents\sigrok-firmware
sr: [00:00.019000] backend: - C:\Program Files
(x86)\sigrok\sigrok-cli\share\sigrok-firmware
sr: [00:00.019000] backend: - C:\Program Files
(x86)\sigrok\sigrok-cli\share\sigrok-firmware
sr: [00:00.019000] backend: Sanity-checking all drivers.
sr: [00:00.019000] backend: Sanity-checking all input modules.
sr: [00:00.019000] backend: Sanity-checking all output modules.
sr: [00:00.019000] backend: Sanity-checking all transform modules.
srd: libsigrokdecode loglevel set to 5.
sr: [00:00.027000] input/csv: User specified column_formats: t,l,l,l,l,l,l.
sr: [00:00.028000] input: Sending 362 bytes to csv module.
sr: [00:00.028000] input/csv: Got 7 columns in text line: Time[s], Ch2, Ch3,
Ch4, Ch5, Ch6, Ch7.
sr: [00:00.028000] input/csv: fmt t -> 1 cols, timestamp fmt, 1 bits, rc 0
sr: [00:00.028000] input/csv: fmt l -> 1 cols, binary fmt, 1 bits, rc 0
sr: [00:00.028000] input/csv: fmt l -> 1 cols, binary fmt, 1 bits, rc 0
sr: [00:00.028000] input/csv: fmt l -> 1 cols, binary fmt, 1 bits, rc 0
sr: [00:00.028000] input/csv: fmt l -> 1 cols, binary fmt, 1 bits, rc 0
sr: [00:00.028000] input/csv: fmt l -> 1 cols, binary fmt, 1 bits, rc 0
sr: [00:00.028000] input/csv: fmt l -> 1 cols, binary fmt, 1 bits, rc 0
sr: [00:00.028000] input/csv: Column format t,l,l,l,l,l,l -> 7 columns, 6
logic, 0 analog channels.
sr: [00:00.029000] input: Calling end() on csv module.
sr: [00:00.029000] session: bus: Received SR_DF_HEADER packet.
cli: Received SR_DF_HEADER.
sr: [00:00.030000] input/csv: Header line 1 skipped.
sr: [00:00.030000] input/csv: Cannot convert timestamp text 0.000000000000000
in line 2 (or zero value).
sr: [00:00.030000] input/csv: First timestamp value 1.61611 in line 3.
sr: [00:00.030000] input/csv: Second timestamp value 1.61611 in line 4.
sr: [00:00.030000] input/csv: Timestamp difference 4.8e-007 in line 4.
sr: [00:00.030000] input/csv: Rate from timestamp 2.08333e+006 in line 4.
sr: [00:00.030000] input/csv: Blank line 11 skipped.
sr: [00:00.030000] session: bus: Received SR_DF_META packet.
cli: Received SR_DF_META.
cli: Got samplerate 2083333 Hz.
META samplerate: 2083333
sr: [00:00.030000] session: bus: Received SR_DF_LOGIC packet (9 bytes, unitsize
= 1).
cli: Received SR_DF_LOGIC (9 bytes, unitsize = 1).
libsigrok 0.6.0-git-d7df9dc
Acquisition with 6/6 channels at 2.083333 MHz
sr: [00:00.030000] session: bus: Received SR_DF_END packet.
Ch2:00100010 0
Ch3:00001000 1
Ch4:00000000 0
Ch5:00000000 0
Ch6:01111111 1
Ch7:00000000 0
cli: Received SR_DF_END.
sr: [00:00.031000] hwdriver: Cleaning up all drivers.
```
On Fri, Oct 16, 2020 at 12:46 PM sdbbs <s...@brothers-sons.dk> wrote:
Hi all,
Apologies in advance if I'm in the wrong forum for asking this - if so,
please let me know where I can ask this instead.
I have seen https://sigrok.org/wiki/File_format:Csv - and from the
example called:
Mixed signal data in arbitrary order. Timestamps and automatic
samplerate.
... it is implied, that it can accept time in floating point format - but
it is unclear what the units are.
So, I have this test.csv file, which is attached - and here is a snippet:
```
Time[s], Ch2, Ch3, Ch4, Ch5, Ch6, Ch7
0.000000000000000, 0, 0, 0, 0, 0, 0
1.616108640000000, 0, 0, 0, 0, 1, 0
1.616109120000000, 1, 0, 0, 0, 1, 0
...
```
Here, time column has floating point values, with the meaning/unit of
seconds.
So, using Pulseview 0.5.0-git-9d307c6 on Windows 10, I click "Import
Comma-separated values...", choose test.csv, and then enter `t,l,l,l,l,l,l`
for the "Column format specs" argument, and leave everything else as is
(see attached pv_test_csv_import.png)
Once the import is done, I get the visualization shown on the attached
pv_test_csv_shown.png - as you can see, the entire range of the capture
shown is about 4500 ns, that is 4.6 us - which has nothing to do with the
timestamps as given in the .csv file (first timestamp is 0, next one is at
1.61 seconds!).
So - is it possible to "persuade" Pulseview, to somehow interpred the
timestamp column as floating-point seconds?
Thanks in advance for any answers!
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel