How can I set trigger callback function for session based interface?

Hi,
I want to callback some functions when trigger is executed in DAQ session based interface.
How can I set it? I tried to execute >> set(AI,'TriggerFcn',@show_data); but matlab says "TriggerFcn is not an accessable property for 'daq.ni.Session'". The instrument is NI USB-6251 and Matlab version is R2013b.
Sincerely yours

댓글 수: 1

Has anyone looked into this int he past 9 months? This is essentially capabilities that existed in the past and were removed.

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
Walter Roberson 2015년 5월 13일

1 개 추천

Add a listener for DataAvailable? See here and an example of someone using it over there

댓글 수: 2

Thank you. I successfully add a listener for DataAvailable. I finally found that session based functions are very convenient.
If I solved the problem, please mark my answer as Accepted.

댓글을 달려면 로그인하십시오.

Yishai
Yishai 2014년 8월 4일

0 개 추천

I would like to second this question. This is functionality that existed in the legacy based interface and was removed in the session-based interface. I don't know how to convert my old code to this now.

댓글 수: 1

Dear Mr.Yishai
Thank you. I see callback was removed in the session-based interface. Can anyone answer our question?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Data Acquisition Toolbox에 대해 자세히 알아보기

질문:

2014년 7월 31일

댓글:

2015년 5월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by