I want to give a digital output to my DAQ using Simulink. But I get an error says:Input to a block must have a discrete sample time.

조회 수: 3 (최근 30일)
I am using Data Acquisition Toolbox. I want to give a digital output from my Data Translation DAQ (DT9812-10v) by using simulink.
I used the Digital Output block from the toolbox and I connect it with a Constant block as an input. When I run the program, it gives me error message: Error reported by S-function 'sdaqdo' in 'research_projek_1/Digital Output': Input to a block must have a discrete sample time.
How would I overcome this problem? Thank you

채택된 답변

Shankar Subramanian
Shankar Subramanian 2014년 3월 6일
Hi Taufik,
Can you open the constant and set the sample time on it to something other than 0 or Inf. The Digital blocks in Data Acquisition require discrete sample time inputs.
Thanks
Shankar
  댓글 수: 1
Taufik
Taufik 2014년 3월 7일
Hi Shankar,
Thank you for your response. When I set the Sample Time to 0.002 it give me another error.
It says: Error reported by S-function 'sdaqdo' in 'research_projek_1/Digital Output': Data type at the input port must be logical type.
I try to find how to set the data type as the logical data type, but I do not manage to get it. Do you have any idea on how to change the data type to logical data type.?
Thank you

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by