Message Boards Message Boards

GROUPS:

Commands to and Data from an Oscilloscope?

Posted 11 months ago
1290 Views
|
2 Replies
|
2 Total Likes
|

enter code hereAn well-operating interface is made to the oscilloscope PM3384 via RS 232.

An attempt to realize this also for a PM3320A oscilloscope fails, because the command DeviceOpen["Serial" ....] does not make the signal DTR on the RS232 connector true (+10 V) as holds for e.g. Quick Basic. This means for this last oscilloscope that the interface is not ready. The only possible actions are putting the scope in ""Remote" and getting its identity.

An alternative way is to use an USB/IEEE488 interface, but this blocks in the same manner.

Question: How to set DTR on the RS232 port TRUE ?

Just as background, the code in its simplest form:

Clear["Global`*"];

baudratescope = 19200;

comportscope = "COM1";

(* definition data comunication expresions*)

CR = FromCharacterCode[13];

LF = FromCharacterCode[10];

ESC = FromCharacterCode[27];

(* interface to scope PM33xx*)

dev = DeviceOpen[
   "Serial", {comportscope, "BaudRate" -> baudratescope, 
    "DataBits" -> 8, "Handshake" -> None, "Parity" -> None, 
    "ReadBufferSize" -> 8192, "StopBits" -> 1}];

Print["Communication starting, Philips PM3320 connected?"]

FindDevices[""]

DeviceWrite[dev, StringJoin[ ESC, "8", CR, LF]];

DeviceWrite[dev, StringJoin[ "IDT ?", CR, LF]];

Print[DeviceReadBuffer[dev]];
2 Replies

John,

The DTR is set automatically. You turned off the handshake so the computer will not use DTR and RTS. If you need it you should change this

"Handshake" -> None

To

"Handshake" -> "RTS"

Also, you should use the code button when you post code (upper left button). It makes it more readable and copyable.

Regards,

Neil

Posted 11 months ago

Dear Neil,

Thanks for the quick answer. Issue solved. The description of RTS is not overwhelming ;-)

John Compter

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract