From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Issuing commands and receiving data

I'm using a Stanford Research Counter (SR400) and trying to issue commands to it (specifically the SS command which queries the status byte). I want to receive the byte after I issue the command, but it doesn't seem to be working correctly. I'm using a GPIB interface and have tried the GPIB Write and GPIB Read commands as well as the MISC ones and some others. I'm not sure how labview gets the data from the instrument, but when I query the status byte, it just get the default 0. Thanks for any help!

- Jon
0 Kudos
Message 1 of 4
(2,957 Views)
Hi John,
I'm kind of new to Labview, but it sounds like there may be a built-in VI for doing what you're talking about. Have you tried the GPIB Serial Poll.vi or the GPIB Status.vi?

--Wensu
0 Kudos
Message 2 of 4
(2,951 Views)
I've tried the GPIB Status and Serial Polls, but neither of them return the status byte that contains a bit that indicates whether there's data ready to be collected. I was thinking of using this bit to trigger my program, but now I'm not quite sure how. Thanks for the tip.

- Jon
0 Kudos
Message 3 of 4
(2,945 Views)
There's the function VISA Read STB. It's been so long since I've used the old GPIB commands that I don't remember exactly what had to be used with them. In any case, I would recomend you use VISA for all your communication anyway.
0 Kudos
Message 4 of 4
(2,939 Views)