User manual

SPI API reference
43 © 2007-2010 Analytica GmbH
SPIWriteDigital
SPIWriteDigital — Write a new value to the digital output register of the AnaGate device.
Syntax
#include <AnaGateDllSPI.h>
int SPIWriteDigital(int hHandle, unsigned long nOutputBits);
Parameter
hHandle Valid access handle.
nOutputBits New register value. Currently only bits 0 to 3 are used, other bits are reserved for future
use.
Return value
Returns Null if successful, or an error value otherwise (Appendix A, Return Codes).
Description
All models of the AnaGate series (except the model AnaGate CAN uno in DIN rail case) have connectors
for 4 digtial inputs and 4 digital outputs at the rear panel.
The digital outputs can be written with the SPIWriteDigital function.
A simple example for reading/writing of the IOs can be found at the description of SPIReadDigital.
See also
SPIReadDigital