So I'm trying to talk to an Agilent 34970A data acquisition device (DAQ) via Perl. I'm able to open a link to the DAQ via USB-to-serial, as follows:
$COM_port = Win32::SerialPort-> new('COM#') or die $!;
I'm also able to send commands to the DAQ, as follows:
$COM_port->write("A command") or die $!;
But I haven't been able to receive data from the DAQ. Here's the command I've been trying:
$COM_port->write("Read Command") or die $!;
@Output = $COM_port->read(4096) or die $!;
This simply returns a null value.
I'm sure this is a simple question with a simple answer, but the Win32::SerialPort documentation is pretty opaque on this. Thanks!