Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

labview and serial comms with dmm

hey again,
 
im in a real mess with this labview! i took off that integer but you couldnt join the output of the string to the graph directly, so i left in in for the time being, my graph still wasnt getting me a correct volts reading, it was 'jumping' every time it took a reading, and i had a saw tooth like waveform
i think it was due to too much info been sent to the dmm at once, like too much commands.  i altered the sequence at the start. namely the vo\r and s?\r commands sent to the dmm. i need some sort of a delay between each routine?
however, in typcial fashion i cant even get it to swtich the dmm to volts now ,the very first block!
 
can you tell me what am i doing wrong, and how can i get a steady graph on volts and time?! seems like im going wrong somewhere, but have it almost right.
 
thanks
 
eric
 
0 Kudos
Message 21 of 39
(2,410 Views)

One thing you did wrong is change the format of the write strings. In order to actually send a '\' code like \r, you right click on the string and select '\' Code Display. In the example I posted, I had all of the string constants with this set. You created new constants and didn't do this so you're not sending the control code. All you're sending is the separate characters "\" and "r" and that won't work. Also, do not use \R (capital R). You have to use \r (little r).

Fix this and then do what I asked a little while ago. Create a string indicator on the output of the VISA Read, run the VI, make current values default, save the VI, then re-post it. I'd like to see if you're parsing the response from the meter correctly.

0 Kudos
Message 22 of 39
(2,407 Views)

ok, i did them changes, if you run this VI , you can see well, you wont see anything unless you got a hameg dmm!, but all that happens is that it sends the voltage to the graph and goes back to zero after every cycle, so its not much use.

how can i correct this? also i still havent got the right decimal place values onto the graph.

 

regards

eric

 

0 Kudos
Message 23 of 39
(2,396 Views)

I don't see any reason for the chart to back to zero after every cycle. It has a history of 1024 points so it should keep updating.

Somehow, the Scan From String got set to output an integer. I fixed that by just disconnecting and reconnecting the wire. Here's a VI with that modification and the other one that I've been asking for. Run this for a minute or two and then stop it. From the Options menu, select Make Current Values Default. Save the VI and repost it. Then I actually will be able to see what the DMM is returning without having the meter here.

0 Kudos
Message 24 of 39
(2,393 Views)

i just executed that one you did but errors came out, here is the vi i saved if its any good.errors come out of the sequence part.

 

 

0 Kudos
Message 25 of 39
(2,391 Views)
I didn't change anything there. If I had, I would have gotten rid of the whole stacked sequence structure. I find them pretty much wothless. What was the error code?
0 Kudos
Message 26 of 39
(2,382 Views)

your vi worked alright, i must have done something wrong, but it was the same story. voltage kept jumping. oddly, when you run it in debug mode it doesnt jump at all.

here is your vi with current values saved. any idea why its not stable?

eric

 

0 Kudos
Message 27 of 39
(2,375 Views)
Okay, I think I finally see what is going on. If you look at my original VI, I had some wait (ms) functions before each read. These were there to give the instrument time to take a measurement and make it available. At some point, these got lost. That's one of the reasons I don't like sequence structures. It's harder to see at a quick glance what is going on and I never really looked close enough at your modifications. I apologize for that. You can put some nominal delay back in. A better and more sophisticated tecnique is to put the Bytes At Serial Port in a while loop. Exit the while loop when the byte count is greater than zero. Then, in another while loop, do another Bytes at Serial Port, read the data, and exit the while loop when the bytes available is equal to zero. The fixed wait approach is the simplest and should get you up and running right away.
0 Kudos
Message 28 of 39
(2,371 Views)

ok, let me see if i can implement what you just said!

thanks

 

0 Kudos
Message 29 of 39
(2,366 Views)

do i put a wait (ms) block before the write function, ? where do i connect it to?!

 

 

0 Kudos
Message 30 of 39
(2,366 Views)