Owner`s manual
M SERIES DAC
BASE UNIT AND MODULE OPERATION
____________________________________________________________________________
175
strncpy(string,ctime(),19);
s=disc in(3,7);
if(!s){
serout(2,1,"on ");
serout(2,1,string);
serout(2,1,"\r");
}else{
serout(2,1,"off ");
serout(2,1,string);
serout(2,1,"\r");
++x;
}while(x<100);
*
*
*
In this code fragment, the status of the discrete input Module 3 Channel 7 is sent to
Module 2, Port I each second for 100 seconds. The output will look like the
following:
on Tue Aug 13 08:11:01
on Tue Aug 13 08:11:02
off Tue Aug 13 08:11:03
*
*
*
on Tue Aug 13 08:12:39
4k. int rlyset(int a,int b)
Input: a - module number (1 to 16)
b - desired channel number (1 to 8 for the V78 or 13 to 16 for the V84)
Output: O - successful (always)
Description: The rlyset(...) function energizes the specified relay channel of a selected
module. The selected module must be a V78 CRM-1 or a V84 ADR-1.
An example of the rlyset(...) function is shown in the rlyrst(...) function example
below.
41. int rlyrst(int a,int b)
Input: a - module number (1 to 16)