GpibSendDeviceClear


Function

Performs Transfer of commands (SDC and DCL) that make slave device to initial states (when power is supplied).

Format

Ret = GpibSendDeviceClear (  Id )

Parameter

Id [ VB.NET: Short ][ C, C++: short ][ C#: short ]

When using DevID:

Specifies the address of slave device that transmits SDC to for listener in GpibSetAddrInfo function.

Specifies -1 for listener when transmits DCL.

Specifies -1 for talker.

(Please use this when transmitting SDC command to plural slave devices at the same time)

When using EqpID:

Transmits SDC command to address of slave device specified in EqpID.

Return Value

Ret [ VB.NET: Integer ][ C, C++: long ][ C#: int ]

 

0

Normality completion

10001

Invalid ID was specified

10002

Driver can not be called

12821

Address specified in GpibSetAddrInfo is wrong

12840

Asynchronous function is running now

22823

When device is used as master (controller), functions for slave (non-controller) are executed

22841

Forcibly terminated by GpibStopAsync

22842

Terminates by forcible termination key

22844

TimeOut

22845

No connected device (GPIB error)

22847

Being used in other process

Initial Value

None

Remarks

Even if slave device receives DCL and SDC commands, the states of listener, talker and controller will not be initialized. To initialize the states of listener, talker and controller, please use GpibSendIFC function.

When slave device received DCL and SDC commands, according to device, its action may not return to the state completely when power is supplied. For details please refer to manual of device to use.

Example

When using DevID:

Sets all slave devices to initial states. (Transmits DCL command)

C

short Talker, ListenerArray[15];

Talker = -1;

ListenerArray[0] = -1;

Ret = GpibSetAddrInfo ( DevId, Talker, ListenerArray );

Ret = GpibSendDeviceClear ( DevId );

Makes the slave devices whose address are 1 and 2 to initial states. (Transmits SDC command)

C

short Talker, ListenerArray[15];

Talker = -1;

ListenerArray[0] = 1;

ListenerArray[1] = 2;

ListenerArray[2] = -1;

Ret = GpibSetAddrInfo ( DevId, Talker, ListenerArray );

Ret = GpibSendDeviceClear ( DevId );

 

When using EqpID:

Makes the slave device to initial state that specified in EqpID. (Transmits SDC command)

C

Ret = GpibSendDeviceClear ( EqpId );

See Also

GpibSendIFC