Advertisements

Sena PS410 Serial Server: Capturing HP 54602 Screen Images

The objective is to capture screen shots from my HP 54602 oscilloscope, now connected to Serial Port 1 of the Sena PS410 serial server.

Although the scope command language offers a :PRINT? command, it produces output in HP PCL, from which there seems no practical way to get a raster image format like PNG. So this remains an output-only transfer triggered by poking the PRINT SCREEN softkey, after first setting the serial parameters:

HP 54602 scope serial parameters

HP 54602 scope serial parameters

In text:

  • Connect to: HP Plotter
  • Factors: ON
  • Resolution: HIGH
  • Baud rate: 19200 b/s
  • Handshake: XON

I have no idea what’s inside the serial cable at this late date (see the HP 8591 post for more musings), but the (paper!) manual says:

For three-wire operation, an XON/XOFF software handshake must be used to handle handshaking between the devices.
For extended hardwire operation, handshaking may be handled either with XON/XOFF or by manipulating the CTS and RTS lines of the oscilloscope.
For both three-wire and extended hardwire operation, the DCD and DSR inputs to the oscilloscope must remain high for proper operation.
With extended hardwire operation, a high on the CTS input allows the oscilloscope to send data and a low on this line disables the oscilloscope data transmission.
Likewise, a high on the RTS line allows the controller to send data and a low on this line signals a request for the controller to disable data transmission.
Since three-wire operation has no control over the CTS input, internal pull-up resistors in the oscilloscope ensure that this line remains high for proper three-wire operation.

Apparently, the DCD, DSR, and CTS inputs have internal pullups.

Hardware handshakings uses these signals:

  • Pin 4 RTS (Request To Send) is an output from the oscilloscope which can be used to control incoming data flow.
  • Pin 5 CTS (Clear To Send) is an input to the oscilloscope which controls data flow from the oscilloscope.
  • Pin 6 DSR (Data Set Ready) is an input to the oscilloscope which controls data flow from the oscilloscope within two bytes.
  • Pin 8 DCD (Data Carrier Detect) is an input to the oscilloscope which controls data flow from the oscilloscope within two bytes.
  • Pin 20 DTR (Data Terminal Ready) is an output from the oscilloscope which is enabled as long as the oscilloscope is turned on.

The scope wiggles them thusly:

The TD (Transmit Data) line from the oscilloscope must connect to the RD (Receive Data) line on the controller. Likewise, the RD line from the oscilloscope must connect to the TD line on the controller.
The RTS (Request To Send) line is an output from the oscilloscope which can be used to control incoming data flow. A high on the RTS line allows the controller to send data, and a low on this line signals a request for the controller to disable data transmission.
The CTS (Clear To Send), DSR (Data Set Ready), and DCD (Data Carrier Detect) lines are inputs to the oscilloscope which control data flow from the oscilloscope (Pin 2). Internal pull-up resistors in the oscilloscope assure the DCD and DSR lines remain high when they are not connected.
If DCD or DSR are connected to the controller, the controller must keep these lines and the CTS line high to enable the oscilloscope to send data to the controller. A low on any one of these lines will disable the oscilloscope data transmission.
Dropping the CTS line low during data transmission will stop oscilloscope data transmission immediately.
Dropping either the DSR or DCD line low during data transmission will stop oscilloscope data transmission, but as many as two additional bytes may be transmitted from the oscilloscope.

The “as many as two additional bytes may be transmitted” suggests the same problem as with the HP 8591 spectrum analyzer at 19200 b/s, wherein it seems to overrun the PS410 input despite the flickering CTS control line.

I set up hardware handshaking in the PS410 and discovered the CTS line flickers as it does with the 8591, but the transfer complete without overruns. Perhaps the 8591 sends more than however many characters the PS410 can handle after calling for a pause?

The Kermit setup points to Serial Port 1 on the PS410:

set host 192.168.1.40 7001 /raw-socket
set modem none

And then the rest of the script Just Works:

Calibrator waveform

Calibrator waveform

The Kermit script as a GitHub Gist:

 

Advertisements

  1. #1 by eriklscott on 2018-04-03 - 13:30

    I have no idea if it’s any good, but apparently this exists: https://www.ghostscript.com/GhostPCL.html Looks like it’s GPL licensed with a (probably irrelevant) commercial option.

    • #2 by Ed on 2018-04-04 - 11:22

      Thanks for the pointer!

      Alas, some casual tinkering with minicom shows I (still) can’t keep the scope’s parser on the rails long enough issue a :PRINT? command, capture the PCL output, then hand it to the utility.

      Surely it’s just me, but I’m all I have to work with.

      Le sigh.

Spam comments vanish. Comment moderation may cause a delay.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s