Initializing

[At master]

Uses three functions to perform initialization at master.

Ret = GpIni( );      //Initializes the GPIB board.

Ret = GpIfc( );      //Initializes the interface.

Ret = GpRen( );   //Puts the destination device in a Remote Enable state.

[At slave]

Uses only one function to perform initialization at slave.

Ret = GpIni( );      //Initializes the GPIB board.

 

image\Line.gif

Notes: To use a GPIB board, it is required to initialize it. The functions that is necessary to be performed to make a board operate properly are described, but not for what the board initialization is in detail. The functions GpIni GpIfc GpRen are used for initializing board. What operation these functions perform and how to use in VB are described here.

(1)Initializes a board by using "GpIni" function.

(2)Initializes the GPIB interface by using "GpIfc" function.

(3)Puts the destination device in a Remote Enable state by using "GpRen" function.

Indeed, the delimiter/EOI(GpDelim) and time-out (GpTimeout) need to be set. These functions have initialization values, so these functions are not described specially here. In addition, depending on the destination devices, extra code may be required (GpSdc and so on).

For details on these functions, please refer to Function Reference. In samples, function GpExit is used to release IRQ, DMA channel, and reset GPIB controller PD7210C chip (puts all the lines in initial state). In samples, description on preventing duplicated initialization is given.

In initialization routine, the function GpBoardsts is also used. This function is used to retrieve the GPIB information of registry or uPD7210C, and described in reference. For example, when you want know the own address,

Ex.) Ret = GpBoardsts (0x8, &MyAddress);

The various information can be retrieved by the code above.

For the function GpBoardsts, specify the value that indicates the data you want to retrieve for the first parameter, and specify the variable to store the information for the second parameter.

Up to now, the initialization routine is created.