Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Using the while iteration block

조회 수: 3 (최근 30일)
Joseph
Joseph 2012년 3월 30일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi all,I have a tank system and would like to use the while iteration block so it runs and writes to file(using the to file block) say every second as i want to read and display this data in Labview every second.Can you assist me with this?It doesnt seem to write continuously to the file block

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2012년 3월 30일
I explained a little bit here about why I think you cannot expect the "To File" block to write to a file immediately:
"I think the reason that To Workspace blocks don't write the variable immediately it because it is very inefficient for To Workspace/File blocks to write the workspace/disk at every time-step, because these are slow processes than will slow down simulation. My guess is that they maintain a buffer that they write to at every time-step - the data is probably written to the final destination only when the buffer is full."
I think the LabVIEW-Simulink interface is a better option for your application.
  댓글 수: 2
Joseph
Joseph 2012년 3월 30일
Thanks,tried using the 'Interpreted matlab fcn' but its still not working
Kaustubha Govind
Kaustubha Govind 2012년 4월 2일
Do you mean what you are using File I/O operations in an Interpreted MATLAB Fcn block? Do you open and close the file at every time step?

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by