DRV_DioWriteDOPorts

INT32S DRV_DioWriteDOPorts(
   PTR_T DeviceHandle,
   INT32U dwPortStart,
   INT32U dwPortCount,
   INT8U * pBuffer );

Purpose

On the device indicated by the DevcieHandle, it outputs the data through the specified DO ports.

Parameters

Some parameters, such as starting port number (dwPortStart), port count (dwPortCount) and pointer to the user's buffer (pBuffer), are stored in the DRV_DioWriteDOPorts. The output data is stored in the buffer prepared by the user before transferring. The buffer size depends on the DO port count.
Name Direction Range Description
DeviceHandle input default The pointer retrieved from the DRV_DeviceOpen which specifies the target device.
dwPortStart input default The starting port number.
dwPortCount input default The port count.
pBuffer input default The pointer to user's buffer that saves ready DO data.

Return

   1. 0 Successful.
   2. InvalidDeviceHandle The DeviceHandle is NULL.
   3. InvalidChannel The port is configured incorrectly. The starting port number (dwPortStart) or the sum of the starting port number and the port count (dwPortCount) should not exceed the total DO port number. 
   4. InvalidBuffer The user's buffer is configured incorrectly. It should not be NULL.