4.1.3. Access via protocol
Description
This command sets 32 digital outputs simultaneously.
Definition
void DapiDOSet32(ULONG handle, ULONG ch, ULONG data);
Parameters
handle=This is the handle of an opened module
ch=Specifies the number of the output, from which it begins to write
to (0, 32, 64, ..)
data=Specifies the data values, to write to the outputs
Return value
None
Example program
// Write a value to the outputs
data = 0x0000ff00; // Set outputs 9-16 to 1
DapiDOSet32(handle, 0, data); // Chan start = 0
printf("Write to outputs data=0x%x\n", data);
printf("key for continue");
getch();
// ----------------------------------------------------
// Write a value to the outputs
data = 0x80000000; // Set output 32 to 1
DapiDOSet32(handle, 0, data); // Chan start = 0
printf("Write to outputs data=0x%x\n", data);
printf("key for continue");
getch();
// ----------------------------------------------------
// Write a value to the outputs
data = 0x80000000; // Set output 64 to 1
DapiDOSet32(handle, 32, data); // Chan start = 32
printf("Write to outputs data=0x%x\n", data);
printf("key for continue");
getch();
Software | Seite
25