DocScrutinizer05 changed the topic of #qi-hardware to: Copyleft hardware - http://qi-hardware.com | hardware hackers join here to discuss Ben NanoNote, atben / atusb 802.15.4 wireless, and other community driven hw projects | public logging at http://en.qi-hardware.com/irclogs and http://irclog.whitequark.org/qi-hardware
wej has quit [Ping timeout: 245 seconds]
fengling has joined #qi-hardware
rejon has quit [Ping timeout: 252 seconds]
archang has joined #qi-hardware
wej has joined #qi-hardware
atommann has joined #qi-hardware
fengling has quit [Quit: WeeChat 1.0]
<wpwrak> DocScrutinizer05: (same issues) that would suck :(
rejon has joined #qi-hardware
<DocScrutinizer05> well, same issues regarding timing and ignored commands when sent too fast. I wonder how that VISA stuff is handling that
<DocScrutinizer05> I also wonder what's with *OPC and *OPC?
<DocScrutinizer05> >> The *OPC command is used to set the Operation Complete bit (bit 0) in the standard event status register to 1 after the current operation is finished. The *OPC? command is used to query whether the current operation is finished. The query returns 1 if the current operation is finished; otherwise, returns 0.<<
<DocScrutinizer05> sounds like *OPC was the only command allowed during another command still finalizes
<DocScrutinizer05> my current problem though is mainly the lacking value for ':ACQuire:MDEPth?' when set to auto. Combined with the idiocy that I cannpt download more than ~200k of waveform data in one chunk, and cannot even set wave:end to some value that would mean "end of available data"
infobot has quit [Read error: Connection reset by peer]
<DocScrutinizer05> IOW no dang hint on ceiling of buffer. Except for a nasty beep on device when I try to set wave:end to a value that's >wave:start + 200000 or > buffer-size
infobot_ has joined #qi-hardware
<DocScrutinizer05> and yes, I could read back wav:end? and check if it accepted the new value or still has the old one. I also can read back syst:err? and check for error ' -220,"Parameter error" '
<DocScrutinizer05> but it seems I have to wait/sleep significant fraction of a second before even reading back error (or doing any other command, on that behalf, maybe except *OPC?), so no reasonable procedure for downloading all bytes of wave buffer comes to mind
<DocScrutinizer05> there's http://www.eevblog.com/forum/blog/eevblog-683-rigol-ds1000z-ds2000-oscilloscope-jitter-problems/msg576271/#msg576271 and that guy seems to not even vare about timing at all - but then he's using that nasty VISA lib
<DocScrutinizer05> s/vare/care/
<qi-bot> DocScrutinizer05 meant: "there's http://www.eevblog.com/forum/blog/eevblog-683-rigol-ds1000z-ds2000-oscilloscope-jitter-problems/msg576271/#msg576271 and that guy seems to not even care about timing at all - but then he's using that nasty VISA lib"
<DocScrutinizer05> otherwise he's doing basically exactly what I do, and he ignores the send_cmd(vi, ":ACQUIRE:MDEPTH?"); --> "AUTO" problem
<DocScrutinizer05> there's also
<DocScrutinizer05> jr@saturn:~> send_cmd ' :WAVeform:PREamble?'
<DocScrutinizer05> 0,2,400000,1,1.000000e-09,4.747600e-02,0,1.000000e-09,0,125
<DocScrutinizer05> but 3rd parameter "points" (400000) is a simple silly wav:end? - wav:start?
<DocScrutinizer05> and wav:end seems to come up with a default of 6000 (SIC!), no matter of real buffer depth
<DocScrutinizer05> (kirchner) I rather wonder who's going to get assassinated next, suicide style
<DocScrutinizer05> did you say Kirchner is socialist/left-wing? the methods rather feel like worst communism or random arbitrary totalitarian government
<DocScrutinizer05> if it's unclear: I'm referring to ???man
<DocScrutinizer05> the colorable suicide shot in the head
<DocScrutinizer05> wpwrak: maybe you already should think twice before starting public rants about Kirchner. Or get decent bodyguards ;-)
<DocScrutinizer05> hah, nice quote of Wim Wenders: "Do what only you can do! When you think 'somebody else could do this, maybe even better than me' then don't do it, no use in it"
atommann has quit [Ping timeout: 246 seconds]
<DocScrutinizer05> I doubt anybody except the super-rich could survive on strictly following this rule, but it's a good guideline nevertheless
jekhor has joined #qi-hardware
atommann has joined #qi-hardware
archang has quit [Remote host closed the connection]
archang has joined #qi-hardware
<DocScrutinizer05> s/6000/1200/
<DocScrutinizer05> jr@saturn:~> send_cmd '*OPC'; send_cmd ':WAVeform:STOP 1200'; send_cmd '*OPC?'
<DocScrutinizer05> command error
<DocScrutinizer05> jr@saturn:~> send_cmd ':SYST:ERR:next?'
<DocScrutinizer05> -410,"Query INTERRUPTED"
<DocScrutinizer05> NB a ` send_cmd ':WAVeform:STOP 1200'; send_cmd '*OPC' ` works without throwing error
<DocScrutinizer05> jr@saturn:~> send_cmd '*OPC'; send_cmd '*OPC?'
<DocScrutinizer05> 1
<DocScrutinizer05> jr@saturn:~> send_cmd ':WAVeform:STOP 1200'; send_cmd '*OPC'; send_cmd '*OPC?'
<DocScrutinizer05> command errorjr@saturn:~>
archang has quit [Ping timeout: 265 seconds]
<DocScrutinizer05> wpwrak: I need your magic intuition to make sense out of *OPC[?]
jekhor_ has joined #qi-hardware
jekhor has quit [Ping timeout: 252 seconds]
rejon has quit [Ping timeout: 245 seconds]
<wpwrak> DocScrutinizer05: (left/socialist) well, even the nazis were nominally socialist, right ? :) (nisman) a very ugly story indeed. what's a little odd is that the government seems to do its best to make this as damaging to itself as possible.
<DocScrutinizer05> WTF??? works??
<wpwrak> (scope) the *.. commands may be at a different level than the other commands. so yes, maybe *OPC? could do the trick. if it's implemented. did you ever see it return 0 ?
<DocScrutinizer05> (o) no
<wpwrak> ah, it works ? maybe it realized that you had asked me for help and thus it decided that further resistance is futile. it has happened before :)
<DocScrutinizer05> well, at least wav:stop 24000000 succeeded, without even spitting out any beeps and weird notes like "invalid param!"
archang has joined #qi-hardware
<DocScrutinizer05> note that this still doesn't mean the wav:data? command will work as supposed to, it still may fail to provide uncrippled data
arossdotme has quit [Ping timeout: 252 seconds]
<wpwrak> yeah, there's a lot of trial and error in such things
<wpwrak> i think it took a week or so before i had a set of empirical data that would let me use my scope properly, and avoid things like commands partially overwriting each other
jekhor_ has quit [Ping timeout: 252 seconds]
atommann has quit [Ping timeout: 246 seconds]
<DocScrutinizer05> how dull can a simple read() implementation get?
Luke-Jr has quit [Excess Flood]
Luke-Jr has joined #qi-hardware
viric has quit [Ping timeout: 245 seconds]
viric has joined #qi-hardware
jwhitmore has joined #qi-hardware
archang has quit [Remote host closed the connection]
<DocScrutinizer05> man 2 read; size_t count = (:wav:stop - :wav:start); return value = TMC header bytecount; :wav:start = man 2 lseek SEEK_SET
tumdedum has quit [Ping timeout: 255 seconds]
<DocScrutinizer05> and yes, this would mean the header this shite delivers for start=1 end=24M (#9000000000) indicates "EOF"
tumdedum has joined #qi-hardware
archang has joined #qi-hardware
Haswell has joined #qi-hardware
Luke-Jr has quit [Read error: Connection reset by peer]
Luke-Jr has joined #qi-hardware
pcercuei has joined #qi-hardware
atommann has joined #qi-hardware
jwhitmore has quit [Ping timeout: 256 seconds]
Haswell has quit [Quit: Saliendo]
Textmode has quit [Quit: "It was one dev, naked in a room with a carton of cigarettes, a thermos full of coffee and bourbon, and all his summoned angels."]
jwhitmore has joined #qi-hardware
<DocScrutinizer05> hmm http://privatepaste.com/224b7b1854
<wpwrak> so .. that's success ?
xiangfu has joined #qi-hardware
xiangfu has quit [Remote host closed the connection]
jekhor has joined #qi-hardware
arossdotme has joined #qi-hardware
<DocScrutinizer05> ohmy, kinda: http://privatepaste.com/27e6fc60bf
<DocScrutinizer05> data verification pending
<DocScrutinizer05> watch the 2jitter", it's solely caused by Rigol "firmware" slow and random like geotectonics
* DocScrutinizer05 wonders if wireshark would be worth a try on that one
<DocScrutinizer05> anyway here's the dirty stuff I got so far: http://privatepaste.com/163c81b0ae
<DocScrutinizer05> comments welcome, also regarding style
<DocScrutinizer05> also how would I verify that the waveform downloaded is actually what the scope sampled, without gaps or glitches and no bogus values in it?
<DocScrutinizer05> sidenote re speed: seems the bottleneck also applies to ethernet data download, not only to USB file storage
<DocScrutinizer05> I guess it's actually the prolly 5.5bit MCU that is a) slow like molasses and b) has a pretty low priotity low bandwidth bus to access the ASIC's RAM
<DocScrutinizer05> I2C? ;-)
jekhor_ has joined #qi-hardware
wolfspraul has joined #qi-hardware
jekhor has quit [Ping timeout: 244 seconds]
<DocScrutinizer05> anyway that idiotic thing thinks it needs to comment commands like 'wav:stop NNNN' with a tiny notifier on screen "Stop point changed!" and with a BEEP(!!)
<DocScrutinizer05> while it comments end of download of a chunk with "Can Operate Now" (SIC!) and another beep
<DocScrutinizer05> sure like hell that script needs a "send:cmd ':SYST:BEEP 0' "
<DocScrutinizer05> download of 24MB takes 10:33 now
<DocScrutinizer05> taking into account all the sleep $w after each command, I'd guess the bottleneck bandwidth is identical to that one seen on a fast contemporary USB memstick (80MB/21min)
<DocScrutinizer05> ~24000000 / 200000
<infobot_> 120
<DocScrutinizer05> ~633 / 120
<infobot_> 5.275
<DocScrutinizer05> half of those average 5.3 seconds seems eaten by the 4 commands (:wav:start nnnn; :syst:err?; :wav:end nnnn; :syst:err?)
<DocScrutinizer05> :syst:err seems cruft, aka debug-print
<DocScrutinizer05> but seems to add to stability, prolly due to commands with output (:wav:start nnnn doesn't echo _anything_) serializing operation inside that lame MCU
<DocScrutinizer05> (:wav:start nnnn doesn't echo _anything_) which is prolly part of the problem
<DocScrutinizer05> echo "$1" | netcat -w 2 $RIGOL_IP 5555 --> echo "$1" | netcat -w 1 $RIGOL_IP 5555 ==> 10:33 --> 6:30
<DocScrutinizer05> :-D \o/ :-S
<DocScrutinizer05> *my* netcat doesn't know sub-second -w values
<DocScrutinizer05> wait wait, doesn't netcat start timer resp tear down listening port as soon as input on stdin is EOF?
<DocScrutinizer05> (echo "$1"; sleep 0.1) | netcat -w 0 $RIGOL_IP 5555 # ????
atommann has quit [Ping timeout: 240 seconds]
<DocScrutinizer05> this starts giving me ideas
<DocScrutinizer05> I wonder if LXI protocil actually neesd a new TCP connection for each new command
<DocScrutinizer05> well, I guess I know how to test that ;-P
jwhitmore has quit [Ping timeout: 252 seconds]
pcercuei has quit [Ping timeout: 255 seconds]
<DocScrutinizer05> HMMMMMM
<DocScrutinizer05> jr@saturn:~> (echo "*IDN?"; sleep 0.5; echo ":SYST:ERR?"; sleep 0.5) | netcat 192.168.4.52 5555
<DocScrutinizer05> RIGOL TECHNOLOGIES,DS1104Z,DS1ZA164357442,00.04.02.SP3
<DocScrutinizer05> 0,"No error"
pcercuei has joined #qi-hardware
jwhitmore has joined #qi-hardware
<DocScrutinizer05> wow, weird stuff! http://privatepaste.com/8b132b4314
<DocScrutinizer05> note how :WAV:STOP? reply completely missing between line 2,3
<eintopf> what the hell is that? reverse engineering some oscilloscope protocol?
<wpwrak> eintopf: it's DocScrutinizer05 discovering that talking to lab instruments often isn't as nice and easy as one may think ;-)
<DocScrutinizer05> yeah, and no sophisticated perl or c++ or pythoon can really mitigate that, it's the lab instruments that are borked to the bone
<DocScrutinizer05> after 'WAV:START NNNN' no trick substituates the needed sleep 0.2, when next command is 'WAV:STOP NNNN'
<wpwrak> sounds very familiar :) if course you can never quite tell where the problem will be, but you can be confident that there are problems :)
<wpwrak> once your findings begin to stabilize, you may want to report them on eevblog. maybe you can start a discussion there where other people can help you as well.
jekhor__ has joined #qi-hardware
<kyak> eintopf: don't tell me you are reading :)
<DocScrutinizer05> ^^^ looks already more decent than what the script is doing
<wpwrak> you should wait for those *OPC? responses
<DocScrutinizer05> real 0m0.745s
jwhitmore has quit [Ping timeout: 250 seconds]
<DocScrutinizer05> maybe I should, maybe it's worthless
<DocScrutinizer05> I still think OPC is cruft
<wpwrak> there's only one way to find out :)
jekhor_ has quit [Ping timeout: 255 seconds]
<wpwrak> but yes, could be just a dummy
<DocScrutinizer05> there's just a certain speed you can run this Rigol interface with. Doesn't matter if you fill the time with cruft commands like *OPC *OPC? and many tiny sleeps, or you just add 2 sleep 0.2
<DocScrutinizer05> time (echo ":WAV:STAR 1"; sleep 0.2; echo ":WAV:STOP 24000000"; sleep 0.2; echo ":WAV:STAR?";sleep 0.1; echo ":WAV:STOP?"; sleep 0.1; echo ":SYST:ERR?"; sleep 0.1) | netcat 192.168.4.52 5555
<DocScrutinizer05> real 0m0.708s
<DocScrutinizer05> NB *OPC? always returns 1
<DocScrutinizer05> but I dunno how to use *OPC and *OPC? at all
<DocScrutinizer05> the programming manual isn't enlightening: http://wstaw.org/m/2015/02/05/plasma-desktopsm1891.png
<DocScrutinizer05> maybe this only applies for commands that per definition take minutes to complete, like calibration, selftest etc
<wpwrak> yeah, with a scope it's difficult since most commands are "quick"
<wpwrak> can you command storage operations ? those should take long
<DocScrutinizer05> nope
<DocScrutinizer05> a pity
<DocScrutinizer05> a forced trigger with a time base of 20s/div? ;-)
<wpwrak> probbaly not
<DocScrutinizer05> ooh, even 50s/div available
<wpwrak> if you send two beeps back to back, does it beep twice or just make a very very slightly longer beep ?
jwhitmore has joined #qi-hardware
<wpwrak> trigger is likely to be asynchronous
<DocScrutinizer05> it makes one beep and throws error ;-)
<DocScrutinizer05> actually I wonder how to send a beep
<DocScrutinizer05> there's just SYST:BEEPer <bool>
<DocScrutinizer05> to enable or switch off
<wpwrak> (beep) ah yes, thought you could generate one directly
<DocScrutinizer05> I can, e.g. by ':WAV:STOP NNN' ;-P
<DocScrutinizer05> (keysight) now THAT is some manual, not that rigol shite pathetic
<DocScrutinizer05> then, Rigol seems to lack any input queue
<DocScrutinizer05> otherwise I wouldn't know why "-410,"Query INTERRUPTED""
<wpwrak> almost a 404 ;-)
<wpwrak> (manual) rule of thumb: there's always a good manual out there, but it's not for the product you have :)
<DocScrutinizer05> indeed
<DocScrutinizer05> keysight U1233a manual is ... non-existent
<DocScrutinizer05> for that purpose
<DocScrutinizer05> but then, there's an android app for that now X-P
<DocScrutinizer05> why would you want to talk LXI SCPI to that critter when you got a nice android app, right?
<wpwrak> whee ! :-)
<DocScrutinizer05> anyway, during the last years when I heard about Rigol and the stories I always thought it must be sth like Heathkit, or russian surplus. When I unpacked it I thought "no, this is a highly professional tool, yay". Now I start to learn it actually is like heathkit stuff ;-)
<wpwrak> SCPI seems to be a mess everywhere. i don't think i've spoken to a single instrument yet that didn't need some weird quirks, be it rigol, tek, fluke, picotest, ...
<DocScrutinizer05> yes, SCPI is a pathetic spec, from beginning, it seems
<DocScrutinizer05> worse than Hayes
<DocScrutinizer05> aka AT
<DocScrutinizer05> anyway, how would I check the downloaded waveform file for 'correct' data?
<wpwrak> maybe by saving the same waveform on a USB stick and comparing the two ?
<wpwrak> if that doesn't work, you'll have to record test patterns and see whether what you get looks about right
jekhor_ has joined #qi-hardware
jekhor__ has quit [Ping timeout: 245 seconds]
pcercuei has quit [Ping timeout: 245 seconds]
pcercuei has joined #qi-hardware
wej has quit [Ping timeout: 245 seconds]
jekhor_ has quit [Ping timeout: 264 seconds]
wej has joined #qi-hardware
jluis has quit [Quit: Me'n vaig]
Nik05 has quit [Remote host closed the connection]
Nik05 has joined #qi-hardware
Nik05 has quit [Changing host]
Nik05 has joined #qi-hardware
jwhitmore has quit [Ping timeout: 245 seconds]
atommann has joined #qi-hardware
atommann has quit [Quit: Leaving]
pcercuei has quit [Ping timeout: 264 seconds]
jwhitmore has joined #qi-hardware
pcercuei has joined #qi-hardware
rejon has joined #qi-hardware
lrockhq has joined #qi-hardware
lrockhq has joined #qi-hardware
porchao has quit [Quit: Leaving...]
Luke-Jr has quit [Remote host closed the connection]
Luke-Jr has joined #qi-hardware
valhalla has quit [Read error: Connection reset by peer]
valhalla has joined #qi-hardware
lrockhq has quit [Quit: Leaving]
rejon has quit [Ping timeout: 252 seconds]
jekhor_ has joined #qi-hardware
Textmode has joined #qi-hardware
wej has quit [Ping timeout: 250 seconds]
wej has joined #qi-hardware
jekhor_ has quit [Ping timeout: 245 seconds]
wolfspraul has quit [Quit: leaving]
pcercuei has quit [Ping timeout: 252 seconds]
jwhitmore has quit [Ping timeout: 245 seconds]