Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

labview and serial comms with dmm

hi folks
i am trying to acquire voltage readings from a dmm via the serial port and plot a graph using labview v7. i am all new to this so would like some help!?
basically, i want to control the dmm with labview and plot a voltage/time graph
 
regards
 
eric
 
0 Kudos
Message 1 of 39
(5,677 Views)
Your first step should be to got to the Instrument Driver Network at http://www.ni.com/devzone/idnet/default.htm and see if there is an existing driver for the DMM. If there is, your life will be a lot easier as all or most of the instrument code will have been written for you. If there is no driver, then you have a couple of options. You can use the Instrument I/O Assistant to send and read data from a serial instrument. There are also some shipping examples on serial communication that you can try. In both cases, you need the programming commands for the instrument. I would recomend first using Hyperterminal to verify basic communication. This will ensure that your serial cable is correct and you've got the right parameters (i.e. baud rate, parity, etc.).
0 Kudos
Message 2 of 39
(5,668 Views)
hi dennis
 
the dmm i got is a HAMEG, i verified the commands on hyperterminal, so i can control the various functions on the dmm from hyperterminal, i now wish to do the same with labview. i need to measure power consumption of a 25mm prototype module, so want to plot current/time and voltage/time graphs and derive a power graph from them.
 
i have no idea where to begin with on labview !
 
0 Kudos
Message 3 of 39
(5,662 Views)
As I said, you have the Instrument I/O Assistant and the shipping examples (i.e. Basic Serial Write and Read). You should also read the LabVIEW Measurements Manual (Help>Search the LabVIEW Bookshelf). If you look at the example or open the Instrument I/O Assistant, the process is using VISA Write to send a command to the instrument to set the type of measurement such as volts, write a command requesting the instrument to take a measurement, then using VISA Read, get the data back from the instrument. The data returned is a string. In order to graph it, you have to convert the string to a numeric. A problem that most beginning users have with serial com is sending the correct termination character with each write. This might be a carriage return, line feed, or both. The CR/LF is shown in the Basic Serial Write and Read as the control characters \r\n. In order to actually send the control codes, a string control or constant has to be set for '\' Codes Display. Right click on a string control or constant and you will see this option. Start with a single read/write cycle to get a single measurement. Once you've got that working, you can put a section of your code in a loop so that a series of measurements can be taken. Graphs and charts have various properties to enable a time display on the x-axis. There are shipping examples for graphs and charts that show some of the options.
0 Kudos
Message 4 of 39
(5,658 Views)
dennis
 
ok, i have the serial comm.vi loaded, how do i alter it so as to send instructions to the hameg dmm? to change to volts using hyperterminal i type in volts,  to request current measurement i type in R?
sorry
0 Kudos
Message 5 of 39
(5,639 Views)
dennis
 
ok, i have the serial comm.vi loaded, how do i alter it so as to send instructions to the hameg dmm? to change to volts using hyperterminal i type in volts,  to request current measurement i type in R?
sorry for
0 Kudos
Message 6 of 39
(5,639 Views)
dennis
 
ok, i have the serial comm.vi loaded, how do i alter it so as to send instructions to the hameg dmm? to change to volts using hyperterminal i type in volts,  to request current measurement i type in R?
sorry for my
0 Kudos
Message 7 of 39
(5,638 Views)
dennis,
sorry for my ignorance here! where do i type in the strings on the labview vi? i have the serial comm vi loaded, if i wish to change the hameg dmm to read current, i type in AMP on the hyperterminal. i want to alter the serial comm vi to use it with the hameg dmm, if thats possible.
 
when the instruction is send to the dmm i have to read it back and convert it to a decimal?
 
thanks for your help and congrats on your 6k milestone.........!
 
 
0 Kudos
Message 8 of 39
(5,637 Views)

You type your strings in the string control labeled "string to write". Go to the help menu and select "Show Contect Help". when you move your mouse over a control or indicator, a little help window will appear that tells you what it does. And, yes, you will need to convert the string returned and convert to a numeric if you want to graph it or do other operations.

You might want to look at some of the existing DMM drivers at http://www.ni.com/devzone/idnet/default.htm. Many of them work with either serial or GPIB connections so you could get an idea of how a real driver is constructed.

It also sounds form your question about where to enter data that you might be having problems with LabVIEW basics. There are several resources at the LabVIEW Learning Center (http://zone.ni.com/devzone/labviewzone.nsf/OpenPage?openagent&lvsection=learningcenter) that might help.

0 Kudos
Message 9 of 39
(5,621 Views)

hey dennis

 

still no joy with this! i cant get drivers for the hameg 8012, not available it says. which of the example VI programs could or would work for my job here or would i have to create a new VI? as for the string, i have a better idea now on this, if i type in *volt?\n to the string box it would tell the dmm to switch to volts? once i can get basic comms going then i can worry about plotting graphs later.

regards

 

eric

0 Kudos
Message 10 of 39
(5,611 Views)