Simulink Query Instrument "Response from instrument was non-numeric" fix?
조회 수: 4 (최근 30일)
이전 댓글 표시
I use "To Instrument" in Simulink to talk to Keithley 2450 SMU, successfully, through GPIB configured correctly. I use "Query Instrument" box to query ':READ?' (done successfully through tmtool application), now I get "Response from instrument was non-numeric". No other blocks are used. Yes I know the data returned after ':READ?' is a char. How do I use this in the "Query Instrument" box? where and how do I convert(do I need to convert?) so don't get this error? Nowhere in the docs is this mentioned. Many thanks..
댓글 수: 0
답변 (1개)
Abhi Sundararaman
2017년 7월 26일
The "Query Instrument Block" doesn't currently have the ability to read non-numeric data, unfortunately.
As a workaround, you could use MATLAB code to query the instrument using the interface object, and then parse that string however you wish to get it into Simulink. This could be done in a MATLAB function block.
For example, if the interface object existed in the MATLAB workspace, then you could use the " evalin " function in a MATLAB function block to access the interface object, and read the values, and then output them to the rest of your model..
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Instrument Connection and Communication에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!