Error reported by S-function 'sldrtai' in 'Laser_exp​eriment_wi​th_2_laser​/Analog Input': Device not found.

14 visualizaciones (últimos 30 días)
any help when reciving error report by s-function 'sldrtai' in laser experiment. it keeps saying device not found. i am connecting humusoft mf624 card. all seems good but don't know why no laser scope run.

Respuestas (1)

Jaynik
Jaynik el 4 de Oct. de 2023
Hi Alaaeldin,
I understand that you are getting an error "sldrtai" saying device not found while using a "S-function" block. A common cause of this is segmentation violation due to an incorrect input port direct feedthrough setting. Another cause can be incorrect memory accesses which occur when your code accesses beyond the end of an array. For example, if you access input port 5 and have specified only 4 input ports.
To debug your C-MEX S-function, you can enable diagnostics by compiling the S-function source with the -g flag, e.g.,
mex -g sfunction_name.c
Hope this helps!
  1 comentario
Alaaeldin Eltayeb
Alaaeldin Eltayeb el 6 de Oct. de 2023
thank you so much, Jaynik, i was able to solve the issue without debguging as oppose i did restart the PC and regenreate the code. however, i will debug it as you instructed. thanks again.

Iniciar sesión para comentar.

Categorías

Más información sobre Event Functions en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by