Jump to content

OpenscopeMZ logging is stopped forced


Recommended Posts

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

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

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

"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

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

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?

log1.png

Link to comment
Share on other sites

Hey,

I converted your DLOG in WaveForms Live and it looks correct:

image.png

 

You can retrieve and convert small log files directly in WaveForms Live by clicking the folder icon to browse files on the SD card.

image.png

 

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

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...