Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

labview and serial comms with dmm

I doubt if any of the existing drivers will work without modification so you would need to create a new VI. What I was suggesting was looking at an existing driver to see how one is structured and use the commands for your instrument instead. LabVIEW 8 comes with a wizard that makes creating a new driver simpler but you still have to edit the files created for the commands that are specific to what the manufacturer implements. LabVIEW 8 also has a new Instrument I/O Assistant that is much more powerful. I don't have or know the commands for Hameg. If you issue the command volts? in Hyperterminal, what does it do? Does it automatically change the DMM function and return a reading or does it do something else? If you have a link to the Hameg programming manual or can post an electronic version, someone can provide some assistance but without that, I don't know how much more I could help.

Because you seem to be struggling a lot, I just googled Hameg 8012 and found that Hameg itself has LabVIEW drivers. The page is http://www.hameg.com/66.0.html

Message Edited by Dennis Knutson on 11-18-2005 10:59 AM

0 Kudos
Message 11 of 39
(2,639 Views)

ok, with hyperterminal its simple to control the hameg dmm, rather than using the nobs and dials on the unit you just issue commands to it,  this is what i want to do with labview, as you have gathered, so now it looks like i will create a new VI, i will install these drivers, thanks for the link. i got version 7 of labview here.

 

if you see the manual here http://www.uni-magdeburg.de/iep/gp12/ba/HM8012_deutsch.pdf you can scroll to the english part and the commands are explained towards the end. sorry but i cant copy and paste here!

many thanks

 

eric

 

 

 

0 Kudos
Message 12 of 39
(2,628 Views)
I had a look at the driver and I'm not impressed. It doesn't follow the NI standards for instrument driver development and then they password protect the diagram. Imho, this is just stupid. The good news is that the commands are pretty simple. Good luck.
0 Kudos
Message 13 of 39
(2,627 Views)

hi dennis

 

i have attached a vi i have done, its all abit of a shambles but maybe you can point me in the right direction somewhat! i am unsure how to send a string to the dmm, say issue a command and then send the write command back to labview. im sure you will have a good idea of what im trying to do from the front panel!

 

i looked at the driver from hameg, indeed it did work, it was abit too much for what i need. i juts want current and voltage readings, and then to combine the both for power. and plot a graph from all of them, also them ni vi's are password protected as you pointed out, not much good for me!

best regards

 

eric

ps: the serial settings for the dmm are : 8 data bits, no parity, 4800 baud, one stop bit, xon/xoff.

also the characters sent to the dmm must be ascii with two characters

 

0 Kudos
Message 14 of 39
(2,613 Views)
Here's something to get you started. All I did was make a few modifications to the shipping example Basic Serial Write and Read. You're going to have to modify it to convert the strings returned to a numeric. Once you've done that, convert to power and wire the result to a chart (not a graph) inside the while loop
0 Kudos
Message 15 of 39
(2,608 Views)

hey dennis

 

thanks alot for that, really got me on the ball! i have plotted volts vs time now, as you can see from the vi  attached, i was tinkering around with it abit. how can i say plot time vs volts and time vs current on the one graph, (in different colours perhaps). or just plot individual graphs from each one.

i would like to setup to volts, read volts, likewise do the same for current and get a graph from both.

regards

 

eric

 

0 Kudos
Message 16 of 39
(2,593 Views)

I'm a little confused as to the changes you made. You've got a read of the volts and then another read but you don't do anything with it. I also don't understand the string to byte array function. What kind of data is that returning? I would have thought that all you needed was a Scan From String to get a floating point number from the DMM. You should also clean up the wires. You got some going nowhere and some on top of each other. This makes it hard to read.

As far as your question about multiple plots, this is simple to do. Turn on context help and move your mouse of the graph indicator on the diagram. The help window shows how to use the bundle function to create a multi-plot chart. There are shipping examples as well.

One thing you can do is run the VI so that you acquire some data. Go to the Operate mneu and select Make Current Values Default. Save the VI. What this will do is save the actual data in the indicators. If you need help in formatting the strings returned by the DMM, this is critical information.

0 Kudos
Message 17 of 39
(2,591 Views)
hey dennis
 
im going back to this labview tomorrow so i will see how i get along and keep you posted! if you were in ireland i'd buy you a drinkSmiley Tongue
0 Kudos
Message 18 of 39
(2,580 Views)

dennis

 

have a look at this vi will you? i have cleaned it up (abit!), as you said some blocks were doing nothing, i used to string function to get a numerical value and want to plot this, so i would get a dc value which changes as i alter the voltage level. however, i need to change the decimal place, to like 9.00 volts, rather than just 9. how do i do this? also is there an easier method to do this as i have alot of blocks in the vi...!

once i get the voltage done, the current has to be done as well.

regards

 

eric

 

0 Kudos
Message 19 of 39
(2,572 Views)
Get rid of the U32 conversion after the scan from string. A U32 is an integer so it has no decimal places.
0 Kudos
Message 20 of 39
(2,546 Views)