{"action":"created","issue":{"url":"https://api.github.com/repos/colinoflynn/pico-python/issues/128","repository_url":"https://api.github.com/repos/colinoflynn/pico-python","labels_url":"https://api.github.com/repos/colinoflynn/pico-python/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/colinoflynn/pico-python/issues/128/comments","events_url":"https://api.github.com/repos/colinoflynn/pico-python/issues/128/events","html_url":"https://github.com/colinoflynn/pico-python/issues/128","id":331309228,"node_id":"MDU6SXNzdWUzMzEzMDkyMjg=","number":128,"title":"Cannot get trigger to work","user":{"login":"hadisajj2","id":12514435,"node_id":"MDQ6VXNlcjEyNTE0NDM1","avatar_url":"https://avatars2.githubusercontent.com/u/12514435?v=4","gravatar_id":"","url":"https://api.github.com/users/hadisajj2","html_url":"https://github.com/hadisajj2","followers_url":"https://api.github.com/users/hadisajj2/followers","following_url":"https://api.github.com/users/hadisajj2/following{/other_user}","gists_url":"https://api.github.com/users/hadisajj2/gists{/gist_id}","starred_url":"https://api.github.com/users/hadisajj2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadisajj2/subscriptions","organizations_url":"https://api.github.com/users/hadisajj2/orgs","repos_url":"https://api.github.com/users/hadisajj2/repos","events_url":"https://api.github.com/users/hadisajj2/events{/privacy}","received_events_url":"https://api.github.com/users/hadisajj2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2018-06-11T18:57:12Z","updated_at":"2018-06-13T22:23:41Z","closed_at":null,"author_association":"NONE","body":"I am using Picoscope 3406 D (uses p3000a sdk) I was able set a trigger and pickup a signal from my FPGA using the C code provided by pico tech. \r\n\r\nI am trying to do the same in the Python code with the provided example\r\n(test_ps3000.py). However, the code doesn't seem to pick up any trigger. In fact, it should wait a timeout period and do an auto-trigger, but that seems to be faulty as well.  In the end, I am trying to set a trigger on Channel A, and read power from Channel B. Even if I just want to do both trigger and read from Channel A, I can't.\r\n\r\nThe call to ps.waitReady() just keeps on waiting.\r\n\r\nAnything I'm missing or doing wrong?\r\n\r\nCode:\r\n------------------------------\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nimport time\r\n\r\nfrom picoscope import ps3000a\r\n\r\n#SERIAL_NUM = 'AR911/011\\x00'\r\n#ps = ps3000a.PS3000a(SERIAL_NUM)\r\nps = ps3000a.PS3000a()\r\n\r\n# now = time.strftime(\"%Y%m%d_%H%M%S\")\r\n# filename = \"sweep_\" + now + \".swp\"\r\n# output_file = open(filename, \"wb\")\r\n\r\nc = 3e8\r\n\r\n# rapid block mode\r\n\r\nps.setChannel(channel=\"A\", coupling=\"DC\", VRange=1)\r\n#ps.setChannel(channel=\"B\", coupling=\"AC\", VRange=1)  --> Commented out for now, but would need # #to get Channel B's readings\r\n\r\nn_captures = 2300 * 3  # int(600 * 1.4)\r\nsample_interval = 5 / 3e8\r\nsample_duration = 1e3 * 2 / 3e8\r\n\r\nps.setSamplingInterval(sample_interval, sample_duration)\r\n\r\nps.setSimpleTrigger(\"A\", threshold_V=0.1)\r\n#ps.lib.ps3000SetTriggerChannelProperties(ps.handle, )\r\n\r\nsamples_per_segment = ps.memorySegments(n_captures)\r\nps.setNoOfCaptures(n_captures)\r\n\r\ndata = np.zeros((n_captures, samples_per_segment), dtype=np.int16)\r\n\r\nt1 = time.time()\r\n\r\nps.runBlock()\r\n\r\nps.waitReady()\r\n\r\nt2 = time.time()\r\nprint(\"Time to get sweep: \" + str(t2 - t1))\r\n\r\nps.getDataRawBulk(data=data)\r\n\r\nt3 = time.time()\r\nprint(\"Time to read data: \" + str(t3 - t2))\r\nplt.imshow(data[:, 0:ps.noSamples], aspect='auto', interpolation='none',\r\n           cmap=plt.cm.hot)\r\nplt.colorbar()\r\nplt.show()\r\n\r\nps.close()\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/colinoflynn/pico-python/issues/comments/397107074","html_url":"https://github.com/colinoflynn/pico-python/issues/128#issuecomment-397107074","issue_url":"https://api.github.com/repos/colinoflynn/pico-python/issues/128","id":397107074,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzEwNzA3NA==","user":{"login":"hadisajj2","id":12514435,"node_id":"MDQ6VXNlcjEyNTE0NDM1","avatar_url":"https://avatars2.githubusercontent.com/u/12514435?v=4","gravatar_id":"","url":"https://api.github.com/users/hadisajj2","html_url":"https://github.com/hadisajj2","followers_url":"https://api.github.com/users/hadisajj2/followers","following_url":"https://api.github.com/users/hadisajj2/following{/other_user}","gists_url":"https://api.github.com/users/hadisajj2/gists{/gist_id}","starred_url":"https://api.github.com/users/hadisajj2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadisajj2/subscriptions","organizations_url":"https://api.github.com/users/hadisajj2/orgs","repos_url":"https://api.github.com/users/hadisajj2/repos","events_url":"https://api.github.com/users/hadisajj2/events{/privacy}","received_events_url":"https://api.github.com/users/hadisajj2/received_events","type":"User","site_admin":false},"created_at":"2018-06-13T22:23:41Z","updated_at":"2018-06-13T22:23:41Z","author_association":"NONE","body":"Yes, the C code sets it."}}
{"actor":{"display_login":"hadisajj2"}}