Redirect Serial data from a COM port to a VISA instrument connected via TCP-IP ?

3 次查看(过去 30 天)
Hi, I am trying to figure out a way to send some HEX data from a modem to a VISA instrument i.e. Signal Generator. The best way I could achieve this was by connecting the modem to my PC i.e say at COM port 24 (RSRC name: ASRL24::INSTR) and the VISA instrument is connected to the address say (TCPIP0::192.165.0.3::inst0::INSTR) All I need to do is redirect data from the COM 24 to this address. I looked at VISA- NI MAX but it does not help. I guess I need to write a program in MATLAB or LABVIEW. Please comment if you could help.
Thanks

回答(1 个)

Walter Roberson
Walter Roberson 2015-9-2
Everything they have there is the same for serial ports except for the device setup, and you might even be able to use visa for that (you could try). If not then see http://www.mathworks.com/help/matlab/ref/serial.html
v = serial('COM24', 'BaudRate', 19200);

类别

Help CenterFile Exchange 中查找有关 Interface-Based Instrument Communication 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by