Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I do a Continuous GPIB Read in 8.5 LabView?

How do I do a Continuous GPIB Read in 8.5 LabView?

 

I have a Command from and old HP Computer that sends ";IM36,OP"  It is looking for a coordinates info from an IBM Plotter.  I have been able to send the String with Coordinates by timing it and clicking my write program.  What I want to do is have the laptop monitor the GBIP Bus until it sees ";IM36,OP" then send the String of Coordinates, without me setting there an waiting.  I tried doing a For loop with a Match String and it errors out.

Wally

 

0 Kudos
Message 1 of 4
(3,625 Views)

I'm not sure I would use a for loop. A while loop with a VISA Read should work. Whenever the return string is equal to what you expect, then exit the loop. If you get an error, what is the code? If it's the timeout error, you should be trapping this and ignoring it. Of course, you will want to have some sort of logic so that the loop will not run forever so a check of time elapsed might be appropriate.

 

The other thing you want to make sure of is that you only have one controller in charge. If the HP is set for CIC, the GPIB in your pc cannot be set to that.

0 Kudos
Message 2 of 4
(3,620 Views)

Wally48,

 

The other problem you could run into is the addressing on the GPIB.  You said that you wanted to monitor the bus for a certain command with your laptop and then reply.  Is the controller in charge communicating directly to your laptop, or is it communicating with another device and you want to also receive the data with your laptop?

 

Thanks,

Steven T.

0 Kudos
Message 3 of 4
(3,598 Views)

The HP is a CIC, I will need to change this on the Laptop.  As for the command it use to go to a GPIB Plotter, but now it goes to  a USBtoGPIB addressed card that I have dumping into a plotter emulation program. 

 


Wally

0 Kudos
Message 4 of 4
(3,590 Views)