From 001cd763e65a1bf7544b16640c62b8d03449209f Mon Sep 17 00:00:00 2001 From: Shrediquette <42935970+Shrediquette@users.noreply.github.com> Date: Wed, 13 Jul 2022 11:31:36 +0200 Subject: [PATCH] Minor tweak in chronos image capture --- .../PIVlab_capture_chronos_synced_start.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PIVlab_capture_resources/PIVlab_capture_chronos_synced_start.m b/PIVlab_capture_resources/PIVlab_capture_chronos_synced_start.m index 8a43ff6..16c8ea5 100644 --- a/PIVlab_capture_resources/PIVlab_capture_chronos_synced_start.m +++ b/PIVlab_capture_resources/PIVlab_capture_chronos_synced_start.m @@ -36,11 +36,12 @@ response = webwrite([cameraURL '/control/getResolutionTimingLimits'],struct('hRes',1280,'vRes',1024),options); max_exp=response.exposureMax; max_fr=1/(response.minFramePeriod/1000/1000/1000); +response2 = webwrite([cameraURL '/control/p'],struct('exposureMode','shutterGating','exposurePeriod', floor(max_exp),'frameRate',max_fr),options); response = webwrite([cameraURL '/control/set'],struct('ioMapping',struct('shutter',struct('shutterTriggersFrame',0,'source','io1','debounce',0,'invert',0))),options); -response = webwrite([cameraURL '/control/p'],struct('exposureMode','shutterGating','exposurePeriod', floor(max_exp),'frameRate',max_fr),options); +% swapped the two above. pause(cmd_delays) -if strcmp(response.exposureMode,'shutterGating') +if strcmp(response2.exposureMode,'shutterGating') set(frame_nr_display,'String',['setting external trigger OK!']);drawnow; else set(frame_nr_display,'String',['Error: External trigger could not be set!']);drawnow;