From: Martin L. <mar...@ea...> - 2013-11-01 11:45:16
|
Hi Mathias, I think that the correct way to drive these scopes from sigrok is going to be to stop the scope and use single triggering. Otherwise we will run into all sorts of issues as you've already seen with e.g. partial data, channels not from the same acquisition, etc. The protocol implemented by the Rigols simply doesn't make it possible to read data while they're running and know anything much about when it is from. The implementation I did in the DS1xx2 driver, which just lets the scope run freely and reads whatever it gets, was a quick and dirty hack just to get something working. Now that you've implemented waiting for a trigger, it's straightforward for us to get the driver to stop the scope, set the trigger condition, read out a frame once triggered and then repeat as many times as frames are requested. This is consistent with how every other supported device is used, as I understand things. I don't know what Rigol's own Windows UI software does; it would be interesting to capture this somehow just in case it knows some undocumented tricks. But I guess it just continuously reads data and splats it to the screen, and if channels are out of sync momentarily it doesn't really matter because they're being refreshed continually anyway. After the user stops the scope it can read the final waveforms out. It would be nice if sigrok could also support this sort of "live" operation, where the only thing we know about the timing of the data is that it's recent and should be displayed immediately. But I think this would need to be explicitly requested somehow, because it's not what any of the current tools expect. Martin On Sun, Oct 27, 2013 at 05:49:40PM +0100, Mathias Grimmberger wrote: > > > Hi everybody, > > Next thing I want to implement for the Rigol DS2xx2 driver is reading > the sample memory. > > For that the scope has to be stopped. > > I think I will detect whether it's running or stopped and depending on > that read the display memory or the sample memory. I think there is no > way to specify that the device should be stopped or what memory to read? > > If multiple frames have been requested there are two possibilities: > > 1. Return an error because only one frame is available. > > 2. Read the data, then set the trigger to "single", let the scope > acquire new data, read that and so on. Due to the large sample memory > this could result in quite large datasets though. > > What do you think makes sense? > > > Thank you, > > MGri > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk > _______________________________________________ > sigrok-devel mailing list > sig...@li... > https://lists.sourceforge.net/lists/listinfo/sigrok-devel > |