Setup Example

image\head10.gif VB.NET

Dim Ret, Cmd(31), Srlen As Integer

Dim Fname As String

Fname = "A:\\ABC.DAT"  ' File name

Cmd(0) = 2  ' Number of talkers and listeners

Cmd(1) = 1

Cmd(2) = 3

Srlen = Len(Fname)  ' File name length

Ret = GpSfile(Cmd, Srlen, Fname);

 

image\head10.gif C

DWORD Ret, Cmd[31], Srlen;

char Fname[] = "A:\\ABC.DAT"; /* File name */

Cmd[0] = 2; /* Number of talkers and listeners */

Cmd[1] = 1;

Cmd[2] = 3;

Srlen = lstrlen(Fname); /* File name length */

Ret = GpSfile(Cmd, Srlen, Fname);

 

image\head10.gif C#

uint Ret, Srlen;

uint[] Cmd = new uint[31];

string Fname = "A:\\ABC.DAT"; /* File name */

Cmd[0] = 2; /* Number of talkers and listeners */

Cmd[1] = 1;

Cmd[2] = 3;

Srlen =Fname.Length; /* File name length */

Ret = GpSfile(Cmd, Srlen, Fname);

 

image\head10.gif Python

Ret, Srlen, Cmd = ctypes.c_ulong(), ctypes.c_ulong(), (ctypes.c_ulong * 31)()

Fname = "A:\\ABC.DAT" # File name

Cmd[0] = 2 # Number of talkers and listeners

Cmd[1] = 1;

Cmd[2] = 3;

Srlen.value = len(Fname) # File name length

Ret.value = GpibPy.GpSfile(Cmd, Srlen, Fname)