Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Multimeter : serial port communication

Hi, I tried to connect Labview 8.2 to a multimeter : Digital Multimeter DVM345DI ex Velleman (alias MAS34-xx  ex Mastech). The multimeter sends data to the PC through the serial port and the acquisition works fine with the supplied software from Valleman and Mastech. The document of the last vendor gives the following information:
 
"
3. 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 used Labview 8.2 with : Basic Serial Write and Read.vi and the following settings: 

baud rate: 600
data bit set:7
parity:none
stop bit:2
flow control:none
delay before read (ms): 1500
from my point of view this should be fine. I received the error:
 

Error -1073807253 occurred at VISA Read in Basic Serial Write and Read.vi
Possible reason(s):VISA:  (Hex 0xBFFF006B) A framing error occurred during transfer.
 
Can someone help me to understand what is wrong ? Thanks in advance.

 
0 Kudos
Message 1 of 6
(6,385 Views)

For a situation such as yours, I would first try communicating to the instrument using Hyperterminal.

After you get that working then I would try using NI-MAX to communicate to the instrument.

When that works, then go back to LabVIEW.

 

0 Kudos
Message 2 of 6
(6,374 Views)
the framing error points to a wrong speed, or too many stopbits.
First try with one stopbit and after that with other bausrates.

The cable is probably ok otherwise the Velleman software wouldn't work.
Maybe you need an extra cr/lf to end the command?
greetings from the Netherlands
0 Kudos
Message 3 of 6
(6,350 Views)
Ok I have now all the parameters of my RS-232C port:
 
baud rate: 600
data bit set:7
parity:none
stop bit:2
flow control:none
terminator:''(none)
delay before read (ms): 1000
I have a Asynchronous communication in continous mode. I was able to be connected with other software but not with: 
 
Basic Serial Write and Read.vi
 
I changed all the parameters in an obvious way but I still receive the framing error.
I suppose this is caused by the fact that I read 4 byte insted of the 15 bytes send by the instrument but I don't know what I have to change. I also suppose that the communication is not setted to asynchronous and continous.
 
Any idea how to modify the :  Basic Serial Write and Read.vi ?
 
Thanks
 

0 Kudos
Message 4 of 6
(6,318 Views)
Do you have an oscilloscope?
Measure the baudrate or try sevral standard baudrates.
Last week it took me one whole day before I discovered that the default baudrate of a motor was actually twice as much as stood at least 20 times in the manual.
And with the scope I compared a byte that I did  send and one I received. the received one was half the size. so double speed.

The 1000ms delay should be enough for 15 bytes (10 bit for each byte and some extra stop, but make it 2000 mseconds

if you only get 4 bytes and a framing error, try 4 times the speed being 2400baud (instead of almost 16 bytes.....)

succes
greetings from the Netherlands
0 Kudos
Message 5 of 6
(6,313 Views)

I can't imagine why a company would use such an odd baud rate as 600.  Try all the standard baud rates (300, 1200, 2400, etc.) before anything else.  If it truly is 600 baud, write the company and ask them what they were thinking when they picked that number.  I have an old Metex DMM that I got to communicate fine using 1200 baud with LabVIEW.  Sure beats trying to write something in C (which I wasted a half a day trying to do).

- Brad

0 Kudos
Message 6 of 6
(6,276 Views)