I'm developing a Measuring-Software using the Picoscope 4424 device. Following your Programmers-Guide I made a simple tool measuring 1000 samples and traces them on the screen.
So here's my problem: After finished my first period of 1000 samples I have to restart the whole tool, because following your Programmers Guide p. 9 part "Using Block Mode" simply repeating steps 5 to 9 calls an Infinity loop.
This is probably due to either not calling the correct functions to set up the device or passing an out-of-range parameter.
I would look at the example code and ensure that you are following exactly the same steps. Also, you should check the error codes returned by the driver.
You could use the example as the starting point and change it to suit your needs.
Hm that's the other problem. There are no error codes given back by the driver because it runs great I only measure one set of data. In the second run it waits until the runBlock function uses the callback function to signal that there are datas ready,which does not happen.
So i think it's more a problem of the callback function than parameters because I do not change my parameters from run 1 to run 2.
Before run 2 starts I only reset my g_ready flag. This is the problem I cant't understand, because there's nothing changedf betwenn the runs.
This is my program:
1. import the ps4000 library
2. open unit
3. display unit info
4. set my channel settings
4.1 activate channel A
4.2 activate channel B
4.3 deactivate C
4.4 deactivate D
6. set TriggerChannelConditions to channel A with my threshold and window mode
7. TriggerChannelDirections TRUE on A DONT_CARE others
8. TriggerChannelProperties FALLING on A NONE on B,C,D
9. loop "for int i=0;i<2;...
9.1 runBlock samples 8192 timebase 6
9.2 wating until scope is ready...
9.3 stop the scope
9.4 setDataBuffers for A and B
9.5 getValues noOfSamples 8192
9.6 display
10. closeUnit
11. free arrays
12. end
as you do in the example code. So I think it's more a problem of the flags and the recall of the callback function but I don't know where to look.
I can't see anything that is obviously wrong, I'm afraid. It's difficult to say what the problem is, especially if all the calls are returning PICO_OK.
I suggest that you use our example as your starting point and modify it as required.
Hey I hope I'm not anoying you. I used your example to creatre a new program. But there's still the same problem. In the second run the runBlock fuction does not run the callback function.
I don't really know your function so I think it's a problem of my settings but I use exactly the same as in the first run. Please help me.