Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I receive GPIB data with a device that is not a controller in charge?

Hi - I have two PCs connected via GPIB - I wish to allow one to be the CIC and the other to act like a device. I set up the non-controller with a ibrsc 0 and I can send a message from the host with intercative control using ibwrt and ibrd at the other end. But, I wish to use labview as the software on the non-controller end and use a while loop that looks at the status bits ATN and LACS and when they change state(which they do when I write to that PC), I wish to read the data sent. Troubles is, every IEEE488.2 labview function I try gives me an error "must be controller-in-charge" when I try a GPIB read or receive. How do I do the equiv of a ibrd in Labview?
0 Kudos
Message 1 of 4
(3,986 Views)
I set the GPIB addy to 1 on the non-controller machine using MAX|options|configure|software and used RcvRespMsg vi and it worked - I wonder how to do that programmatically......
0 Kudos
Message 2 of 4
(3,986 Views)
Hi,

For this type of application you would use the GPIB VIs located on the "Instrument Control >> GPIB >> GPIB 448.2" pallette. These VIs give you access to some of the low level functionality of the board.

You can use the 'GPIB wait' VI to determine if the board has been addressed as listener or talker. Depending on the state of the board you would call RvcRespMsg or SendDataBytes. The important thing about these VIs is that if you look at the help, this VIs send or receive data assuming that all the bus addressing has been performed by the controller. Any attemp to address the bus from the non-controller board will give the Controller in charge error.

the following search at www.ni.com has some articles that you might find useful:

http://search.ni.c
om/query.html?col=alldocs&qs=%7C-contenttype%3Acommunitydiscussions+-languagetype%3Anonenglish&layout=default&qt="pc+to+pc"

Hope this helps.
DiegoF.
0 Kudos
Message 3 of 4
(3,986 Views)
Hello:
I am having a similar problem, but I think I am doing something stupid. The NonController PC does an ibrsv and waits to be addressed to talk. When addressed it does an ibwrt and everything is fine. However, it looks to be addressed to listen. When the Controller PC does it's ibwrt, the NonController PC gets the data by checking for the LACS flag in ibsta, then does an ibrd. Fine and well. However, the LACS flag is never reset! So my code ends up in an infinite loop until another device does an SRQ and then is addressed to talk. How did I get my controller so messed up that it doesn't unaddress the NonController PC so it won't attempt ibrds all the time? Or is there another command that I should do? Thank you to anyone who can shed some
light. I am going nuts.
0 Kudos
Message 4 of 4
(3,986 Views)