Owner`s manual

M SERIES DAC
BASE UNIT AND MODULE OPERATION
____________________________________________________________________________
170
Description: The serout(. ..) function transfers the specified null
terminated character string to the selected
module and port. The selected module must be
a 4-port serial I/O module (e.g., V74, V75,
etc.).
Example: Assume a V74 4-port serial I/O module is installed as
Module 2.
int s;
char string[30];
*
*
*
x=O;
do{
delay(1000);
strncpy(string,ctime());
serout(2,1,string);
serout(2,1,"\r");
}
while(x<100);
*
*
*
In this code fragment, the time and date is output to Module 2, Port 1 each second for
100 seconds. The output will be sirnilar to the following:
Tue Aug 13 08:11:01 1998
Tue Aug 13 08:11:02 1998
Tue Aug 13 08:11:03 1998
*
*
*
Tue Aug 13 08:12:39 1998
4d. int serin(int a,int b,char *s)
Input: a - module number (1 to 16)
b - desired port number (1 to 4)
*s - pointer stnng for output
Output: 0 - successful