pon Posted June 20, 2018 Share Posted June 20, 2018 Hi. I sincerely apologize as i am still learning English therefore my English is very poor. I wrote python script to start logging mode automatically. However, the logging session is always stopped before complete. This is status message. { "log": { "analog": { "1": [ { "command": "getCurrentState", "statusCode": 0, "state": "stopped", "stopReason": "FORCED", "startIndex": 0, "actualCount": 25344, "maxSampleCount": -1, "actualGain": 1, "actualVOffset": 1, "actualSampleFreq": 5000000000, "actualStartDelay": 0, "storageLocation": "sd0", "uri": "log1.dlog", "wait": 0 } ] } } } Please tell me how to fix it. Link to comment Share on other sites More sharing options...
Kristoff Posted June 21, 2018 Share Posted June 21, 2018 Hey Pon, What command and parameters did you send to start logging? Thanks! -Kristoff Link to comment Share on other sites More sharing options...
pon Posted June 22, 2018 Author Share Posted June 22, 2018 Hi Kristoff, I posted these commands. { "awg":{ "1":[ { "command":"setRegularWaveform", "signalType":"sine", "signalFreq":1000000, "vpp":3000, "vOffset":0 } ] } } { "log":{ "analog":{ "1":[{ "command":"setParameters", "maxSampleCount":-1, "gain":1, "vOffset":0, "sampleFreq":5000000000, "startDelay":0, "storageLocation":"sd0", "uri":"log1.dlog" }] } } } { "awg":{ "1":[ { "command":"run" } ] } } { "log": { "analog": { "1": [{ "command": "run" }] } } } After 10 seconds, post this command to stop logging. { "log": { "analog": { "1": [{ "command": "stop" }] } } } Thank you Link to comment Share on other sites More sharing options...
Kristoff Posted June 22, 2018 Share Posted June 22, 2018 It looks like you're starting a logging session to log indefinitely ("maxSampleCount": -1) at 5000 samples per second ("sampleFreq":5000000000,), waiting 10 seconds and sending the stop command. The response to the stop command in your first post looks like it is stopping successfully and had acquired 25344 samples (5.0688 seconds worth of data). How are you 'waiting 10 seconds' is this done it code and very precise or are you just waiting a while? What part is not working as you expect? Thanks! -Kristoff Link to comment Share on other sites More sharing options...
pon Posted June 22, 2018 Author Share Posted June 22, 2018 "Waiting 10 seconds" is caused by python time class method. I want to know this message means. On 6/20/2018 at 7:05 PM, pon said: "stopReason": "FORCED", Did it finish normally? Link to comment Share on other sites More sharing options...
Kristoff Posted June 22, 2018 Share Posted June 22, 2018 Yes, that is normal behavior. Since you told it to run forever with "maxSampleCount": -1 the "stopReason": "FORCED", indicates that you manually 'forced' it to stop with a command. Let us know if you have more questions about this. Thanks! -Kristoff Link to comment Share on other sites More sharing options...
pon Posted June 27, 2018 Author Share Posted June 27, 2018 Dear Kristoff Thanks for your answers! I succeed data logging ! My mistake was part of reading data script. This image is logging 1Hz sin curve in 2 seconds. I used Digilent/dlog-utils to translate binary data. The timescale is not collect. Is it known bug? Link to comment Share on other sites More sharing options...
Kristoff Posted June 27, 2018 Share Posted June 27, 2018 Can you post the Logger>>Read response packet as well as the converted CSV? Thanks! -Kristoff Link to comment Share on other sites More sharing options...
pon Posted June 29, 2018 Author Share Posted June 29, 2018 I solved the first one second problem. It was caused from waveform generator starting delay. These data are reading 1Hz sine wave in two seconds with 10kHz sampling. log1.dlog log1.csv Link to comment Share on other sites More sharing options...
Kristoff Posted June 29, 2018 Share Posted June 29, 2018 Hey, I converted your DLOG in WaveForms Live and it looks correct: You can retrieve and convert small log files directly in WaveForms Live by clicking the folder icon to browse files on the SD card. I did the same with the DLOG Utilities and had the same issue you did. I'll have a look and see if I can fix the util. -Kristoff Link to comment Share on other sites More sharing options...
Kristoff Posted June 29, 2018 Share Posted June 29, 2018 I resolved the issue and updated the repository on GitHub. Converting the CSV in WaveForms Live and dlog-utils should both work now. Let us know if you have any other questions and thanks for the feedback! -Kristoff Link to comment Share on other sites More sharing options...
pon Posted July 4, 2018 Author Share Posted July 4, 2018 Hi I build the new dlog-utils and it works normally. Thanks for your kindness! Link to comment Share on other sites More sharing options...
Kristoff Posted July 12, 2018 Share Posted July 12, 2018 Glad to hear it works for you. Thanks! -Kristoff Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.