Hi all,
I try to read out the data of a METEX M-3850D multimeter in a LabWindows CVI
program (5.0.1).
These are the communication parameters:
1200 baud, 7-bit ASCII, no parity, 1 stop bit.
I use serial port 2.
After sending the characters 'D' and 'enter', the multimeter should respond
with a 14-character frame.
This is the code I use:
int numbytes;
char buf[512];
OpenComConfig (2, "", 1200, 0, 7, 1, 512, 512);
SetCTSMode (2, LWRS_HWHANDSHAKE_OFF);
FlushInQ (2);
FlushOutQ (2);
numbytes = ComWrtByte (2, 68);
numbytes = ComWrtByte (2, 13);
numbytes = ComRd (2, buf, 14);
CloseCom (2);
This is the problem: after the instruction OpenComConfig, the RD line is
pulled high (+15V) by the computer, resulting in a logical 0 and thus
blocking the port. Wi
th a scope, I can clearly see that the multimeter is
responding its 14 characters, but as this results only in a 0.5 volt signal
superimposed on the +10 V, the computer is of course unable to read this
data.
Only after about 5 seconds after calling the ComRd instruction, the RD line
is released.
There are no problems with the TD line.
When the multimeter is unplugged, the same thing happens (except the
response of the multimeter of course), so I blame my program, my serial port
or LabWindows.
Changing the SetCTSMode does not help.
What could be the problem?
Kind regards,
Geert