Setup Example

image\head10.gif VB.NET

Dim EventOn, Ret As Integer

 

EventOn = 1 ' Event generation

Ret = GpSetEvent(EventOn)

 

' The routine which receives an event

Select Case message ' the 2nd argument which a program in execute receives.

Case WM_USER + &H30S ' WM_USER + 0x30 is a setting up value in GpSetEventSrq function.

' At necessary processing a description.

Ret = GpEnableNextEvent()

End Select

image\head10.gif C

DWORD EventOn, Ret;

 

EventOn = 1; /* Event generation */

Ret = GpSetEvent(EventOn);

 

/* The routine which receives an event */

switch(message){ /* the 2nd argument which a program in execute receives. */

case WM_USER + 0x30: /* WM_USER + 0x30 is a setting up value in GpSetEventSrq function. */

/* At necessary processing a description.*/

Ret = GpEnableNextEvent();

 break;

}

image\head10.gif C#

uint EventOn, Ret;

 

EventOn = 1; /* Event generation */

Ret = gpib.SetEvent(EventOn);

 

/* The routine which receives an event */

switch(message){ /* the 2nd argument which a program in execute receives. */

case WM_USER + 0x30: /* WM_USER + 0x30 is a setting up value in gpib.SetEventSrq function. */

/* At necessary processing a description.*/

Ret = gpib.EnableNextEvent();

 break;

}

image\head10.gif Python

EventOn, Ret = ctypes.c_ulong(), ctypes.c_ulong()

 

EventOn.value = 1 # Event generation

Ret.value = GpibPy.GpSetEvent(EventOn)

 

# The routine which receives an event

# the 2nd argument which a program in execute receives.

if message == (WM_USER + 0x30): # WM_USER + 0x30 is a setting up value in GpSetEventSrq function.

    # At necessary processing a description.

    Ret.value = GpibPy.GpEnableNextEvent()