From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB Initialization problems

Hi,

I'm using LabView 6i with a Fluke 45 IEEE dmm. The communication works fine as long as I use MAX to initialize the GPIB. I tried the GPIB Initialization function and it does set the meter in REMOTE, but that's it. It doesn't allow me to send any command. In order to do it, I have to go to MAX. I'm using the regular write and read GPIB commands. Any suggestions?

Thanks in advance,

Javier Pena
0 Kudos
Message 1 of 14
(4,702 Views)
Problem is often in message termination- you send a command to the
instrument butthe instrument doesn;t start processing it until it receives
the termination signal. If you get this wrong, communication appears to
hang.

You need to read the DMM manual and see what termination is required. Or try
adding CR, LF, or CR-LF to the end of your string.

"Javier Pena" wrote in message
news:50650000000800000015360000-1007855737000@exchange.ni.com...
> Hi,
>
> I'm using LabView 6i with a Fluke 45 IEEE dmm. The communication works
> fine as long as I use MAX to initialize the GPIB. I tried the GPIB
> Initialization function and it does set the meter in REMOTE, but
> that's it. It doesn't allow me to send any command. In order to do it,
> I have to go to
MAX. I'm using the regular write and read GPIB
> commands. Any suggestions?
>
> Thanks in advance,
>
> Javier Pena
Message 2 of 14
(4,702 Views)
Thanks for your input Craig,

The GPIB commands in LabView work fine, I can read and write without problems, but only once the meter is initialized (or detected/configured) in MAX, and that would work only while the computer is on. My question is if there's any difference between the GPIB initialization function and the process MAX uses to initialize the device. I have the GPIB initialization function at the beginning of the program. I've tried different combination of parameters and it does set the meter in REMOTE mode, but when I send the next command (let's say... VAC) it doesn't work. So I go to MAX, send an *IDN? or whatever and after that, all commands from LabView work. Pretty weird, huh? (maybe not so weird for many of you, but I'm a newbie in
GPIB 🙂

Thanks
0 Kudos
Message 5 of 14
(4,702 Views)
Exactly how are you doing the initialisation in your code? Are you sending
*IDN? and not reading back the response by any chance?

"Javier Pena" wrote in message
news:5065000000050000003B550000-1007855737000@exchange.ni.com...

> does set the meter in REMOTE mode, but when I send the next command
> (let's say... VAC) it doesn't work. So I go to MAX, send an *IDN? or
> whatever and after that, all commands from LabView work. Pretty weird,
> huh? (maybe not so weird for many of you, but I'm a newbie in GPIB 🙂
>
> Thanks
0 Kudos
Message 6 of 14
(4,702 Views)
I have a sequence structure. The first frame contains the GPIB initialization function, which only has the address the meter is at (1) as the only parameter, then, on the next frame, I send a command using the write function (here I use the VAC or MEAS?), then, on the frame after that, I use the read command to get the reading (in the MEAS? case). On all functions (including the Initialization), I only use the address parameter, which is 1 (the address the meter is at). Any suggestions?
0 Kudos
Message 7 of 14
(4,702 Views)
Try putting the read function on the same frame. You can also try putting
GPIB Clear function before GPIB Send.

Nam.

Javier Pena wrote in message
news:50650000000500000047550000-1007855737000@exchange.ni.com...
> I have a sequence structure. The first frame contains the GPIB
> initialization function, which only has the address the meter is at
> (1) as the only parameter, then, on the next frame, I send a command
> using the write function (here I use the VAC or MEAS?), then, on the
> frame after that, I use the read command to get the reading (in the
> MEAS? case). On all functions (including the Initialization), I only
> use the address parameter, which is 1 (the address the meter is at).
> Any suggestions?
0 Kudos
Message 9 of 14
(4,702 Views)
Without using MAX, try to retart your instrument (i.e. DMM) after your
program is running. Other than CR or CR+LF, ; (semi colon) could be used for
command termination.

Good luck,

Nam.

Javier Pena wrote in message
news:5065000000050000003B550000-1007855737000@exchange.ni.com...
> Thanks for your input Craig,
>
> The GPIB commands in LabView work fine, I can read and write without
> problems, but only once the meter is initialized (or
> detected/configured) in MAX, and that would work only while the
> computer is on. My question is if there's any difference between the
> GPIB initialization function and the process MAX uses to initialize
> the device. I have the GPIB initialization function at the beginning
> of the program. I've tried dif
ferent combination of parameters and it
> does set the meter in REMOTE mode, but when I send the next command
> (let's say... VAC) it doesn't work. So I go to MAX, send an *IDN? or
> whatever and after that, all commands from LabView work. Pretty weird,
> huh? (maybe not so weird for many of you, but I'm a newbie in GPIB 🙂
>
> Thanks
0 Kudos
Message 8 of 14
(4,702 Views)
Do you get an error when sending? Or does nothing happen? You might try using the NI Spy program to watch the GPIB and see what (if anything) is being sent on the line. You may have to add an EOL (CR/LF combination) to the end of the command that you are sending.

Rob
Message 3 of 14
(4,702 Views)
Thanks so much for your response Rob,

I don't have problems communicating with the device via LabView once it is initialized using MAX. What I've been wondering is if there's any difference between the GPIB Initialization function and the procedure MAX uses to initialize the device. I've tried the function using different combination of parameters with no avail (I have the initialization function in the beginning of the program). Once I run MAX the device would work while the computer is on, but when I shut it off, it doesn't start by itself with the function in the program, so I have to open MAX, send an *IDN? and bingo!!, now I'm able to send and receive information with the write and read functions directly from LabView. That's something I can't do
with the initialization function alone. Weird, huh?
0 Kudos
Message 4 of 14
(4,702 Views)

I have the same problem here... i found out it was because .. MAX actually did initialize the GPIB interface when u scan instruemtns.. Meanwhile, if u run ya program in LABVIEW. Eg: communicating with non-HP instrument, GPIB initialization is required!!! 

0 Kudos
Message 10 of 14
(3,831 Views)