Aleatory reading response from oscilloscope via serial port
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello community,
I'm using a Win 7 systema with a Matlab R2015 with Instrument Control installed. And, a Tektronix TDS1012 oscilloscope connect to my computer via a USB-to-SERIAL connector.
The device is connected and recognized by the PC and the Instrument Control.
My first attempt reading response via command windows:
>> os = serial('COM5'); fopen(os); os
Serial Port Object : Serial-COM5
Communication Settings
Port: COM5
BaudRate: 9600
Terminator: 'LF'
Communication State
Status: open
RecordStatus: off
Read/Write State
TransferStatus: idle
BytesAvailable: 0
ValuesReceived: 0
ValuesSent: 0
>> fprintf(os, '*IDN?'); os.BytesAvailable
ans =
0
>> response = fscanf(os)
response =
*IDN?
Whenever I try to query something, I got the command query as an answer.
But, here's the thing, if I send commands to set the oscilloscope, it works. (I reset with *RST and also Volt Range of CH1 and could see it in the oscilloscope display)
I also try using the Instrument Control App, and got the same result as previous.
I also icreated an IC Device with the tektronix_tds1012.mdd file driver, and got aleatory read responses and didn't work well setting some parameters.
I checked the Printer Port is at Centronics, and the RS232 is free for communication.
Am I missing some configuration on my oscilloscope in order to read what I expecte to be read?
0 comentarios
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!