Hi, I'm a beginner of Labview (8.2) and I'm trying to controll a Digital Multimeter DVM345DI ex Velleman (alias MAS34-xx ex Mastech I found both the vendors supply the same nstrument produced somewhere in China).
The instrument uses a RS232C serial interface that works with a software called Mas-View. The communication specs are the following:
RS232C Interface protocol
3-1. MAS34X series
Mode : 600,n,7,2
Format : Ascii Code
Total : 14 bytes
Whenever any one byte received from P/C, output 14 bytes.
BYTE 1-2 : MEASURING MODE (ex;DC,AC,OH,CA,TE...)
BYTE 4 : SIGN(-)
BYTE 5-9 : Decimal point and value
Current measurement value(ex;10.00, OL.,3.999)
BYTE 10-13 : Unit (ex; mV,A,KOHM,nF...)
BYTE 14 : Carriage Return
Note : Interval time over 1 second is required for stable
measuring data from the meter.
I also made a Matlab code that is working fine :
s = serial('COM4');
s.BaudRate=600;
s.StopBits=2;
s.Timeout=10;
s.Terminator='';
s.DataBits=7;
s.ReadAsyncMode = 'continuous';
get(s,{'BaudRate','DataBits','Parity','StopBits','Terminator'});
fopen(s);
fprintf(s,'D');
s.BytesAvailable;
out = fscanf(s) % es DC -0.000 V
fclose(s);
Now, I would like get the same thing with Labview. I did the code start.vi with a modified driver for the serial communication (both enclosed).
Nothing to do, I cannot succed. I suppose I have some parameters wrong in the .vi code. I always get:
Error -1073807253 occurred at VISA Read in start.vi
Possible reason(s):VISA: (Hex 0xBFFF006B) A framing error occurred during transfer.
I monitored all the three communications with Portmon. I have reported all the results in the spreadsheet file.
In my opinion something is wrong in the read part. It is also interesting that Mas-view and Matlab get the data in two different ways,but Labview cannot get the answer from the instrument. This makes me crazy !
Anyone can help me ? Whatever suggestion is wellcome, thanks.
Gianmarco
Download File:post-7095-1165066712.vi
Download File:post-7095-1165066765.vi
Download File:post-7095-1165067071.xml