Section 7 Sample Programs
7-2
7.1 Notes on Creating the Program
Note the items listed in the table below when creating the remote control program
Explanation
The state of each device in actual use such as operating the
operator panel of the device itself or executing another
program may not be appropriate. Be sure to initialize each
device to unify conditions at the start of use.
Do the following:
[1] Initialize the interface function (Call ibsic(ud%))
[2] Initialize the message exchange function of the device
(Call ibclr (ud%))
[3] Initialize the device-specific function (PRE.INI or
∗RST)
Execute Call ibcnd (ud%) to set the device to the local
lockout state to prevent the device from returning to the
local state.
In the simple remote state, the device enters the local state
when the [Local] key is pressed. At this time, when the
panel key is pressed, automatic measurement of the device
is not done correctly and measurement data may be
unreliable.
Execute Call ibcnd (ud%, chr$ (<listener>), [+chr$
(secondary-address)]+chr$ (&H01)) to set all devices to
the local control state.
Write Call ibrd (ud%) after the query command.
If MLA is received when a command other than Call ibrd
(ud%) is sent to the controller before a query result is read,
the output buffer is cleared. Therefore, the response
message is erased.
No.3 above is also a type of exceptional processing of the
protocol. Avoid exceptional processing if necessary. For a
predicted exception, create the exceptional processing part
in the program to prevent execution from being halted due to
an error.
Be sure to check the subset of each device. Even if the
program is executed on a device that does not provide the
required subset, processing does not proceed. Also, check
that the device type conforms to IEEE488.2.
No.
1
2
3
4
5
Note
Be sure to initialize each device.
Set the remote state of the device to
remote with lockout state (RWLS).
Except for Call ibrd (ud%), do not
send a command related to a device
immediately after a query is sent.
Program that avoids exceptional
processing of protocol
Check the interface function (subset)
of each device.