Skip to content

Commit 52549eb

Browse files
author
neil.hamilton
committed
Update ps6000a examples to allow 6824E-D scopes to run with default values
1 parent bd38396 commit 52549eb

File tree

6 files changed

+30
-30
lines changed

6 files changed

+30
-30
lines changed

ps6000aExamples/ps6000aBlockAdvancedTriggerExample.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020 Pico Technology Ltd. See LICENSE file for terms.
2+
# Copyright (C) 2020-2024 Pico Technology Ltd. See LICENSE file for terms.
33
#
44
# PS6000 A BLOCK MODE EXAMPLE
55
# This example opens a 6000a driver device, sets up two channels and a trigger then collects a block of data.
@@ -26,8 +26,8 @@
2626
# Set channel A on
2727
# handle = chandle
2828
channelA = enums.PICO_CHANNEL["PICO_CHANNEL_A"]
29-
coupling = enums.PICO_COUPLING["PICO_DC"]
30-
channelRange = 7
29+
coupling = enums.PICO_COUPLING["PICO_DC_50OHM"]
30+
channelRange = 5
3131
# analogueOffset = 0 V
3232
bandwidth = enums.PICO_BANDWIDTH_LIMITER["PICO_BW_FULL"]
3333
status["setChannelA"] = ps.ps6000aSetChannelOn(chandle, channelA, coupling, channelRange, 0, bandwidth)
@@ -51,7 +51,7 @@
5151
assert_pico_ok(status["getAdcLimits"])
5252

5353
# use the trigger functions seperately
54-
# set up a simple edge trigger on channel A OR B with a 1 V threshold
54+
# set up a simple edge trigger on channel A OR B with a 100 mV threshold
5555

5656
conditions = (struct.PICO_CONDITION * 2)()
5757
conditions[0] = struct.PICO_CONDITION(channelA,enums.PICO_TRIGGER_STATE["PICO_CONDITION_TRUE"])
@@ -71,8 +71,8 @@
7171
assert_pico_ok(status["setTriggerChannelDirections"])
7272

7373
channelProperties = (struct.PICO_TRIGGER_CHANNEL_PROPERTIES * 2)()
74-
channelProperties[0] = struct.PICO_TRIGGER_CHANNEL_PROPERTIES(mV2adc(1000,channelRange,maxADC), 0, 0, 0, channelA)
75-
channelProperties[1] = struct.PICO_TRIGGER_CHANNEL_PROPERTIES(mV2adc(1000,channelRange,maxADC), 0, 0, 0, channelB)
74+
channelProperties[0] = struct.PICO_TRIGGER_CHANNEL_PROPERTIES(mV2adc(100,channelRange,maxADC), 0, 0, 0, channelA)
75+
channelProperties[1] = struct.PICO_TRIGGER_CHANNEL_PROPERTIES(mV2adc(100,channelRange,maxADC), 0, 0, 0, channelB)
7676
nChannelProperties = 2
7777
autoTriggerMicroSeconds = 1000000
7878
status["setTriggerChannelProperties"] = ps.ps6000aSetTriggerChannelProperties(chandle, ctypes.byref(channelProperties),nChannelProperties,0,autoTriggerMicroSeconds)

ps6000aExamples/ps6000aBlockExample.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020 Pico Technology Ltd. See LICENSE file for terms.
2+
# Copyright (C) 2020-2024 Pico Technology Ltd. See LICENSE file for terms.
33
#
44
# PS6000 A BLOCK MODE EXAMPLE
55
# This example opens a 6000a driver device, sets up two channels and a trigger then collects a block of data.
@@ -25,8 +25,8 @@
2525
# Set channel A on
2626
# handle = chandle
2727
channelA = enums.PICO_CHANNEL["PICO_CHANNEL_A"]
28-
coupling = enums.PICO_COUPLING["PICO_DC"]
29-
channelRange = 7
28+
coupling = enums.PICO_COUPLING["PICO_DC_50OHM"]
29+
channelRange = 5
3030
# analogueOffset = 0 V
3131
bandwidth = enums.PICO_BANDWIDTH_LIMITER["PICO_BW_FULL"]
3232
status["setChannelA"] = ps.ps6000aSetChannelOn(chandle, channelA, coupling, channelRange, 0, bandwidth)
@@ -42,11 +42,11 @@
4242
# handle = chandle
4343
# enable = 1
4444
source = channelA
45-
# threshold = 1000 mV
45+
# threshold = 100 mV
4646
direction = enums.PICO_THRESHOLD_DIRECTION["PICO_RISING"]
4747
# delay = 0 s
4848
# autoTriggerMicroSeconds = 1000000 us
49-
status["setSimpleTrigger"] = ps.ps6000aSetSimpleTrigger(chandle, 1, source, 1000, direction, 0, 1000000)
49+
status["setSimpleTrigger"] = ps.ps6000aSetSimpleTrigger(chandle, 1, source, 100, direction, 0, 1000000)
5050
assert_pico_ok(status["setSimpleTrigger"])
5151

5252
# Get fastest available timebase

ps6000aExamples/ps6000aBlockExampleExtClk.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020 Pico Technology Ltd. See LICENSE file for terms.
2+
# Copyright (C) 2020-2024 Pico Technology Ltd. See LICENSE file for terms.
33
#
44
# PS6000A Demonstrates external clock callback using block mode.
55
# This example opens a 6000a driver device, sets up the External clock callback, and reports its status during a block capture.
@@ -51,8 +51,8 @@ def ExternalReferenceInteractions_callback(handle, statusCallback, reference):
5151
# Set channel A on
5252
# handle = chandle
5353
channelA = enums.PICO_CHANNEL["PICO_CHANNEL_A"]
54-
coupling = enums.PICO_COUPLING["PICO_DC"]
55-
channelRange = 7
54+
coupling = enums.PICO_COUPLING["PICO_DC_50OHM"]
55+
channelRange = 5
5656

5757
# analogueOffset = 0 V
5858
bandwidth = enums.PICO_BANDWIDTH_LIMITER["PICO_BW_FULL"]
@@ -69,11 +69,11 @@ def ExternalReferenceInteractions_callback(handle, statusCallback, reference):
6969
# handle = chandle
7070
# enable = 1
7171
source = channelA
72-
# threshold = 1000 mV
72+
# threshold = 100 mV
7373
direction = enums.PICO_THRESHOLD_DIRECTION["PICO_RISING"]
7474
# delay = 0 s
7575
# autoTriggerMicroSeconds = 1000000 us
76-
status["setSimpleTrigger"] = ps.ps6000aSetSimpleTrigger(chandle, 1, source, 1000, direction, 0, 1000000)
76+
status["setSimpleTrigger"] = ps.ps6000aSetSimpleTrigger(chandle, 1, source, 100, direction, 0, 1000000)
7777
assert_pico_ok(status["setSimpleTrigger"])
7878

7979
# Get fastest available timebase

ps6000aExamples/ps6000aBlockMSOExample.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020 Pico Technology Ltd. See LICENSE file for terms.
2+
# Copyright (C) 2020-2024 Pico Technology Ltd. See LICENSE file for terms.
33
#
44
# PS6000 A BLOCK MODE EXAMPLE
55
# This example opens a 6000a driver device, sets up two channels and a trigger then collects a block of data.
@@ -25,8 +25,8 @@
2525
# Set channel A on
2626
# handle = chandle
2727
channelA = enums.PICO_CHANNEL["PICO_CHANNEL_A"]
28-
coupling = enums.PICO_COUPLING["PICO_DC"]
29-
channelRange = 7
28+
coupling = enums.PICO_COUPLING["PICO_DC_50OHM"]
29+
channelRange = 5
3030
# analogueOffset = 0 V
3131
bandwidth = enums.PICO_BANDWIDTH_LIMITER["PICO_BW_FULL"]
3232
status["setChannelA"] = ps.ps6000aSetChannelOn(chandle, channelA, coupling, channelRange, 0, bandwidth)
@@ -59,11 +59,11 @@
5959
# handle = chandle
6060
# enable = 1
6161
source = channelA
62-
# threshold = 1000 mV
62+
# threshold = 100 mV
6363
direction = enums.PICO_THRESHOLD_DIRECTION["PICO_RISING"]
6464
# delay = 0 s
6565
# autoTriggerMicroSeconds = 1000000 us
66-
status["setSimpleTrigger"] = ps.ps6000aSetSimpleTrigger(chandle, 1, source, 1000, direction, 0, 1000000)
66+
status["setSimpleTrigger"] = ps.ps6000aSetSimpleTrigger(chandle, 1, source, 100, direction, 0, 1000000)
6767
assert_pico_ok(status["setSimpleTrigger"])
6868

6969
# Set number of samples to be collected

ps6000aExamples/ps6000aRapidBlockExample.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020 Pico Technology Ltd. See LICENSE file for terms.
2+
# Copyright (C) 2020-2024 Pico Technology Ltd. See LICENSE file for terms.
33
#
44
# PS6000 A BLOCK MODE EXAMPLE
55
# This example opens a 6000a driver device, sets up two channels and a trigger then collects 10 blocks of data in rapid block mode.
@@ -25,8 +25,8 @@
2525
# Set channel A on
2626
# handle = chandle
2727
channelA = enums.PICO_CHANNEL["PICO_CHANNEL_A"]
28-
coupling = enums.PICO_COUPLING["PICO_DC"]
29-
channelRange = 7
28+
coupling = enums.PICO_COUPLING["PICO_DC_OHM"]
29+
channelRange = 5
3030
# analogueOffset = 0 V
3131
bandwidth = enums.PICO_BANDWIDTH_LIMITER["PICO_BW_FULL"]
3232
status["setChannelA"] = ps.ps6000aSetChannelOn(chandle, channelA, coupling, channelRange, 0, bandwidth)
@@ -42,11 +42,11 @@
4242
# handle = chandle
4343
# enable = 1
4444
source = channelA
45-
# threshold = 1000 mV
45+
# threshold = 100 mV
4646
direction = enums.PICO_THRESHOLD_DIRECTION["PICO_RISING"]
4747
# delay = 0 s
4848
# autoTriggerMicroSeconds = 1000000 us
49-
status["setSimpleTrigger"] = ps.ps6000aSetSimpleTrigger(chandle, 1, source, 1000, direction, 0, 1000000)
49+
status["setSimpleTrigger"] = ps.ps6000aSetSimpleTrigger(chandle, 1, source, 100, direction, 0, 1000000)
5050
assert_pico_ok(status["setSimpleTrigger"])
5151

5252
# Get fastest available timebase

ps6000aExamples/ps6000aStreamingModeExample.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
# Set channel A on
2929
# handle = chandle
3030
channelA = enums.PICO_CHANNEL["PICO_CHANNEL_A"]
31-
coupling = enums.PICO_COUPLING["PICO_DC"]
32-
channelRange = 7
31+
coupling = enums.PICO_COUPLING["PICO_DC_50OHM"]
32+
channelRange = 5
3333
# analogueOffset = 0 V
3434
bandwidth = enums.PICO_BANDWIDTH_LIMITER["PICO_BW_FULL"]
3535
status["setChannelA"] = ps.ps6000aSetChannelOn(chandle, channelA, coupling, channelRange, 0, bandwidth)
@@ -53,11 +53,11 @@
5353
# handle = chandle
5454
# enable = 1
5555
source = channelA
56-
# threshold = 1000 mV
56+
# threshold = 100 mV
5757
direction = enums.PICO_THRESHOLD_DIRECTION["PICO_RISING"]
5858
# delay = 0 s
5959
# autoTriggerMicroSeconds = 1000000 us
60-
status["setSimpleTrigger"] = ps.ps6000aSetSimpleTrigger(chandle, 1, source, 1000, direction, 0, 1000000)
60+
status["setSimpleTrigger"] = ps.ps6000aSetSimpleTrigger(chandle, 1, source, 100, direction, 0, 1000000)
6161
assert_pico_ok(status["setSimpleTrigger"])
6262

6363
# create buffers

0 commit comments

Comments
 (0)