The attached sample programs maybe not operate because it is necessary
for GPIB to match the protocol with the destination device.
To communicate normally, please create programs by the following procedure.
1) Deciding the device address
When a device address says on the telephone,
it is a phone number, the communication can be performed by sending to
or receive from the device with the number.
Please make sure that the device address is unique on the same system.
(It can be set from 0 to 30.)
The PC device address used by this sample program is presented by MyAddress,
and is 0 by default.
2)Deciding the delimiter code and EOI
It is required to terminate communication
(transmission ends / reception ends) simultaneously each other.
To identify the termination, the delimiter code is necessary.
If the sender delimiter is different from
the receiver delimiter, time-out will occurs and only one side can exit
function normally.
In addition, when deciding the delimiters practically, in case of 1 to
1 (1 PC to 1 device), is enough to make the delimiters match with each
other.
If the PC connects with more than one device
(3 devices or more), please unify the delimiter of devices as possible.
(If the delimiter of devices cannot be unified, it is required to switch
the delimiter codes on PC side at every transmission and reception).
Furthermore, in this driver, the delimiter
is set by using GpDelim, and it is added and monitored automatically.
The received data that the delimiter is removed is returned. After initializing,
the initial value of delimiter/EOI is CR+LF+EOI.
(Remark)
If the destination device is not support delimiter and EOI, the transmission
and reception can be completed by the number of transmission and reception
data.
If the communication is completed by the number of reception data, the
return code of 128 will be returned (It does not indicate a communication
error).
3)Deciding Master/Slave
The Master owns the decisive power (sending
commands) for GPIB communication.
Reversely, the slave need to take act on the instruction of master (receiving
commands).
When setting up a system, it is necessary
that there is 1 master, and 1 or more slaves.
When controlling the measurement instruments, the PC is the controller
so that it is a master.
4)Cable length
By specification, the following restrictions are typical:
- A maximum separation of four meters between
any two devices and an average separation of two meters over the entire
bus.
- A maximum total cable length of 20m.
CONTEC prepares 2m and 4m cables.
Ex. 1) When all devices are 2 (1 controller
+ 1 GPIB communication device)
2m × (number of devices = 2) < 20m. Therefore, the
maximum cable length for 1 system is 4m.
Ex. 2) When all devices are 3 (1 controller
+ 2 GPIB communication devices)
2m × (number of devices = 3) < 20m. Therefore, the
maximum cable length for 1 system is 6m.
Ex. 3) When all devices are 15 (1 controller
+ 14 GPIB communication devices)
2m × (number of devices = 15) > 20m. Therefore, the
maximum cable length for 1 system is 20m.
After confirming [Deciding the system configuration] mentioned above, please check the operation by the following procedures.
1)Inserts GPIB a board into PC.
Please perform Setup and Registration of Hardware, Initial Setting of Software.
Moreover, please run the Diagnosis
Program to check whether the GPIB card operates properly.
If the GPIB card operates properly, it operates properly on the system.
2)Please check the protocol of measurement instrument by reading the User Manual of measurement instrument
Please refer to the manual of measurement instrument and follow the control procedure to the measurement instrument to check whether the command/transmission/reception/serial poll/trigger are sent.
For the multiline message, please refer to "Additional Information".
3)Using the actual target instrument to check simple operation
After checking the protocol of 2), please
use the master mode sample program to manually control command/transmission/reception/serial
poll/trigger against the actual target.
If the instrument can be controlled properly, please refer to the GPIB
functions in the Help to create programs.
1)Inserts GPIB a board into PC
It is same with [Connecting with measurement instruments]
2)Deciding the protocol
Please decide the protocol matching with the destination computer (in the order of device address/delimiter code, command/transmission/reception/serial poll).
3)Using the actual target PC to check simple operation
After checking the protocol, please use the sample program of system type (master or slave) to manually control command/transmission/reception/serial poll/trigger against the actual target
If the system can communicate properly, please refer to the GPIB functions in the Help to create programs