10-31-2007 09:31 PM
Hi Chris_R,
I have no problem to finding the examples, I know where to get them. The main problem is, I can't understand the whole picture from the simple coding. Beside, the help file just show me what are the members inside NI Measurement Studio .NET Class. It doesn't show me how and when to use those methods and properties.
For example, how should I implement ibrsv() in C#? Which function provided is equivalent to ibrsv()?
Let me explain what I going to do in my project. Firstly, I had 2 PCs (let denote as PC-A and PC-B), where both having PCI-GPIB card installed. Both PCs will communicate with each other thru the GPIB interface. PC-A will request service by sending ibrsv() command to PC-B. And PC-B will respond to the request by sending back a string. In this case, which class should I use to implement, Board or Device?
When I try to query PC-B from PC-A by writing "*idn?\n", I will get "Method requires GPIB interface to be CIC". What does the message means? How should I get rid of the error?
I hope I could get a proper documentation on this. Thanks.
11-02-2007 03:39 PM - edited 11-02-2007 03:39 PM
Hi mau_horng,
I did some checking around and found a function that you can use. The function is the Board.SerialPollResponseByte property. In checking the .NET source, this function actually calls ibsrv, so it should be doing the same thing. Details for this function can be found in the .NET 2.0 Frameworks Help installed with the NI-488.2 driver (if the frameworks were selected to install). I have included an image below:
I hope this gets you the information you need.
As for PC to PC communication, this document my be helpful in setting that up if needed.
As for the CIC (Controller in Charge) error, in order to send a command over the GPIB, you have to be a controller in charge at the time. It seems like PC-A is not controller in charge at the time, but is trying to send a command. Make sure you have passed control to PC-A before trying to send any commands.
The best documentation for C# is to use the .NET Frameworks help. Search in the Index (Help>>Index...) for any function name and it should provide you syntax and information for VB and C#.
Try these suggestions and let me know how it goes. Have a great day!
Message Edited by Chris_R. on 11-02-2007 03:39 PM