Azzera filtri
Azzera filtri

Triggeractivation error in image acquisition toolbox

8 visualizzazioni (ultimi 30 giorni)
HYZ
HYZ il 3 Mar 2023
Risposto: Sachin il 16 Mar 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)

Risposte (1)

Sachin
Sachin il 16 Mar 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

Community Treasure Hunt

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

Start Hunting!

Translated by