How to stream vector (1X5) data from Target device to App designer?

4 ビュー (過去 30 日間)
jesica
jesica 2022 年 8 月 17 日
編集済み: jesica 2022 年 9 月 22 日
I have been using ConnectScaler object function to stream data to app desginer from Speedgoat. but I am unable to stream vector data .
I tried Converting to string in App designer but it is not working.
ConnectScaler(app.hInst,app.TextArea,'data');
Unable to resolve the name 'app.hInst'.
ConnectScaler(app.hInst,string(app.TextArea),'data'); // not working
I tried to introduce matlab function in simulation to convert into string, but no progress.
y=string(u); // unable to generate code
  1 件のコメント
jesica
jesica 2022 年 9 月 13 日
編集済み: jesica 2022 年 9 月 13 日
connectScalar(app.hInst,app.TextArea,'data','callback',(t,d)string(d));

サインインしてコメントする。

回答 (1 件)

Dimitri MANKOV
Dimitri MANKOV 2022 年 9 月 13 日
Hi Jesica,
I think there are several mistakes here:
  1. The correct syntax of the function is connectScalar (lowercase "c" and "a" before "r")
  2. Is the object app.hInst initialized/declared in your app before you use it in the connectScalar function? You can for example declare is as a private property in your app.
  3. What type of component is the app.TextArea object in your app?
I hope this is helpful!
Dimitri
  1 件のコメント
jesica
jesica 2022 年 9 月 13 日
編集済み: jesica 2022 年 9 月 22 日
Thank you for your answer.
  1. Its typo. I had corrected and still it was not wokring.
2. app.hInst is Instrument object created to stream data from target computer to development computer. i had defined it.
3. app.TextArea is a object used to display string in app designer.
4. I solved the issue by using the below command.
connectScalar(app.hInst,app.TextArea,'data','callback',(t,d)string(d));

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeVerification, Validation, and Test についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by