Triggeractivation error in image acquisition toolbox

5 visualizaciones (últimos 30 días)
HYZ
HYZ el 3 de Mzo. de 2023
Respondida: Sachin el 16 de Mzo. de 2023
Hi, I tried to record a video using Image acquisition toolbox.
src.TriggerActivation threw an error as below:
Attempt to modify currently read-only or inaccessible property: TriggerActivation.
Use IMAQHELP(OBJ, 'TriggerActivation') for information.
Could anyone suggest? Thanks.
vobj = videoinput("gentl", 1, "Mono8");
src = getselectedsource(vidobj);
vobj.LoggingMode='disk';
src.AcquisitionFrameCount = 200;
src.AcquisitionFrameRateEnable = "True";
src.AcquisitionFrameRate = 50;
src.ExposureAuto = "Off";
src.TriggerMode = "On";
src.TriggerSelector = "AcquisitionStart";
src.TriggerSource = "Software";
src.TriggerActivation = 'RisingEdge';
src.ExposureTime = 15000;
diskLogger = VideoWriter('C:\Users\user\Desktop\cameratest\test.avi', 'Grayscale AVI');
diskLogger.FrameRate = 50;
vobj.DiskLogger = diskLogger;
start(vidobj)
stop(vidobj)

Respuestas (1)

Sachin
Sachin el 16 de Mzo. de 2023
Hi @HYZ,
I understand that you are getting error 'Attempt to modify currently read-only or inaccessible property: TriggerActivation' .
Some properties are only read-only in ‘videoinput’ object i.e. you cannot update those properties.
e.g. ‘Videoformat’ property is a read-only property and it is set by the ‘videoinput.’
Try this command after creating ‘videoinput’ object ‘vobj’ which will give you more information about the ‘triggeractivation’ property
imaqhelp(vobj,'Triggeractivation')
You can refer to the following page for more information about ‘videoinput’ and read-only properties.
Thanks
Sachin

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by