Listing 101 continued AIOC

******************************************************

* UPDATE PHYSICAL OUTPUTS

* Description : This function is called to write the 'raw' counts to the proper analog output device

* (i.e. DAC). It is up to this function to direct the DAC counts to the proper DAC if more

* Arguments : ch is the DAC logical channel number (0. .AI0_MAX_A0-1).

* cnts are the DAC counts to write to the DAC

********************************************************************************************************* */

void AOWr CENT8U ch, INT16S cnts) {

/* This is where you will need to provide the code to update your DAC(s) . */

/* ACWr{) is passed a 'LOGICAL' channel number. You will have to convert this logical channel */ /* number into actual physical port locations (or addresses) where your DACs are located. */

/* ACWrO is responsible for writing the counts to the selected DAC based on a logical number. */

#endif

*************************************************************************************************

* Analog I/O Module

* (c) Copyright 1999, Jean J. Labrosse, Weston, FL

* All Rights Reserved

* Programmer : Jean J. Labrosse *********************************************************************************************************

#ifdef AIO_GLOBALS

┬╗define AIO_EXT ttelse ttdefine AIO_EXT extern #endif

* CONFIGURATION CONSTANTS

*********************************************************************************************************

#ifndef CPG_H

#define ttdefine ttdefine

AIO_TASK_PRIO

AIO_TASK_DLY

AIO_TASK_SIK_SIZE

40 100 512

┬╗define AIO_MAX_AI ttdefine AIO_MAX_AO

Maximum number of Analog Input Channels (1..250) Maxiinum number of Analog Output Channels (1. .250)

Was this article helpful?

0 0

Post a comment