ISaGRAF. Version 3.4


C - 15


else if (CU && data->value < PV) (data->value)++;

data->overflow = (data->value >= PV) ? (T_BOO)1 : (T_BOO)0;

}

 

/* cast operation required to copy parameters to ISaGRAF buffer */

 

#define BOO_VALUE ((T_BOO *)value)

#define ANA_VALUE ((T_ANA *)value)

#define REAL_VALUE ((T_REAL *)value)

#define TMR_VALUE ((T_TMR *)value)

#define MSG_VALUE ((T_MSG *)value)

 

/* read service: get the value of one return parameter */

 

void FBREAD_sample (uint16 hinstance, str_data *data, uint16 parno, void *value)

{

switch (parno) {

case FBLPNO_Q : *BOO_VALUE = data->overflow; break;

case FBLPNO_CV : *ANA_VALUE = data->value; break;

}

}

 

/* declaration service used for dynamic link with the ISaGRAF kernel */

 

ABP fbldef_sample (char *name, IBP *initproc, RBP *readproc)

{

strcpy (name, "SAMPLE");

*initproc = (IBP)FBINIT_sample;

*readproc = (RBP)FBREAD_sample;

return ((ABP)FBACT_sample);

}

 

/* end of file */




- -  - -  - -