Send a LUA script via USB to a Test Script Processor enabled device using Matlab

7 ビュー (過去 30 日間)
Ajay Kumar
Ajay Kumar 2011 年 9 月 12 日
回答済み: Dhrumil 2013 年 10 月 30 日
I am working with a Keithley 3706-S switcher which can be configures using a LUA code sent via Test Script Builder (TSB). LUA code for my application is simply one single line:
channel.exclusiveclose('1003')
Now the above instrument is interfaced over the USB port. I would like to know how could I do the same using Matlab

採用された回答

Walter Roberson
Walter Roberson 2011 年 9 月 12 日
Wait, I thought the interface to that device was via TCP ??
Well if it is USB, then use serial() to allocate the virtual USB serial port to an object, use set() to configure the speed and so on, fopen() the serial object, and fwrite() or fprintf() the string to the serial object.
Be sure to find out exactly what line terminator is required and watch out because fprintf() automatically adds the LineTerminator configured for the serial object if you use the call fprintf(object,string) instead of using fprintf(object,format,string)

その他の回答 (1 件)

Dhrumil
Dhrumil 2013 年 10 月 30 日
Hello,
I am trying to do the same thing but using TCP/IP and Matlab. How would I send the LUA commands through Matlab over TCP/IP?
Thanks.

カテゴリ

Help Center および File ExchangeData Acquisition Toolbox Supported Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by