AnsweredAssumed Answered

vrf Another simple question (Y Plot Scales)

Question asked by fukui.yutaka on Nov 10, 2004
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META http-equiv=Content-Type content="text/html; charset=us-ascii"><META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD><BODY><DIV><FONT face=Arial><FONT size=2><SPAN class=473032816-11112004><FONT color=#0000ff> >  </FONT></SPAN>I am trying to get two Agilent Vee applications (each on its own laptop)  to communicate with each other over GPIB bus...<SPAN class=473032816-11112004><FONT color=#0000ff> </FONT></SPAN></FONT></FONT></DIV><DIV><FONT><FONT face=Arial><FONT size=2><SPAN class=473032816-11112004><FONT color=#0000ff>></FONT> </SPAN> The problem is that I get the response message that only one system controller can be active at the same time...<SPAN class=473032816-11112004><FONT color=#0000ff> </FONT></SPAN></FONT></FONT></FONT></DIV><DIV><FONT><FONT face=Arial><FONT size=2><SPAN class=473032816-11112004><FONT color=#0000ff>></FONT></SPAN> In the help file  for GPIB-PCMCIA card configuration, it is written that the issue with the controller should be dealt with at the run-time by the application...</FONT></FONT></FONT> <BR><BR><SPAN class=473032816-11112004><FONT face=Arial color=#0000ff size=2> I managed to find answers from about a year ago on the topic of making the PC act as an instrument, which is what I think you want to do.  Here's what I have:</FONT></SPAN></DIV><DIV><SPAN class=473032816-11112004></SPAN> </DIV><DIV><SPAN class=473032816-11112004><FONT face=Arial color=#0000ff size=2>GPIB has two forms of controller.  Active controller is the controller<BR>that is currently in charge.  This controller can address devices to<BR>talk and listen.  The other level of controller is system controller.<BR>The differences are that system controller becomes active controller at<BR>power up and after ifc has been asserted.  The system controller is also<BR>the only device that can assert ifc (InterFace Clear) and the only<BR>device that controls REN (Remote/Local control).</FONT></SPAN></DIV><DIV> </DIV><DIV><SPAN class=473032816-11112004><FONT face=Arial color=#0000ff size=2>There should only be one system controller per bus, so you would need to<BR>configure the computer to not be system controller.  This is done in IO<BR>Config (not in VEE) for the interface card in question.</FONT></SPAN></DIV><DIV> </DIV><DIV><SPAN class=473032816-11112004><FONT face=Arial color=#0000ff size=2>Now, you need to simulate an instrument.  Do you want to do this in VEE,<BR>VB or C?  Agilent does this for their internal testing by using c++ .  </FONT></SPAN></DIV><DIV><SPAN class=473032816-11112004><FONT face=Arial color=#0000ff size=2>(That's Agilent private code, so we can't access it - but it does show that it</FONT></SPAN></DIV><DIV><SPAN class=473032816-11112004><FONT face=Arial color=#0000ff size=2>can be done.)  However, there is no reason you<BR>can't do this in VEE.  You need to run three independent threads.  The<BR>first thread is the input buffer.  This thread would be interrupt driven<BR>and would read characters from the 82350 input buffer.  The second<BR>process, of a lower priority, would process bytes from the input buffer<BR>and parse the message.  The parser can be as complicated as you need to<BR>make it.  Once complete message had been parsed, the action would be<BR>executed (usually a case statement) and any output placed into the<BR>output buffer.  The third process would manage the output buffer and<BR>output bytes when addressed to talk.  It would also be interrupt driven<BR>and would have the highest priority.  Yes, it does have a higher<BR>priority than input buffer and the reason is a very long discussion in<BR>its own right.</FONT></SPAN></DIV><DIV> </DIV><DIV><SPAN class=473032816-11112004><FONT face=Arial color=#0000ff size=2>You would need some form of message control protocol to maintain<BR>synchronization between the input and output buffer.  The IEEE 488.2<BR>state machine is quite complex and is probably more than you need.  It<BR>would probably be sufficient to have a command which flushed a non empty<BR>input and/or output buffer.</FONT></SPAN></DIV><DIV> </DIV><DIV><SPAN class=473032816-11112004><FONT face=Arial color=#0000ff size=2>Those are the steps.  There may be an example VEE program<BR>that implements a simple form of this.</FONT> </SPAN></DIV><DIV><SPAN class=473032816-11112004><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV><DIV><SPAN class=473032816-11112004><FONT face=Arial color=#0000ff size=2>(Notes translated from a Jay Johannes post.)</FONT></SPAN></DIV><DIV><SPAN class=473032816-11112004><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV><DIV><SPAN class=473032816-11112004><P><FONT size=2>Les Hammer<BR>Partner<BR>Complete Test<BR>720 SW 14th St.<BR>Loveland, CO.  80537<BR>Les.Hammer@CompleteTest.com </FONT></P></SPAN></DIV>---<BR>You are currently subscribed to vrf as: rsb@soco.agilent.com<BR>To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".<BR>To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".<BR>To send messages to this mailing list,  email "vrf@agilent.com".  <BR>If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".</BODY></HTML>  

Outcomes