Hi Claes
I use ModBus RTU as example for my Hitachi project.
At starup with Sendop=0 and Continous=No (ModBus_RTU_Slave)
**********************************************
typedef pwr_tEnum pwr_tYesNoEnum;
typedef enum {
pwr_eYesNoEnum_No = 0,
pwr_eYesNoEnum_Yes = 1,
} pwr_eYesNoEnum;
**********************************************
I get the value Continous == 4 ?????? then value should be 0
undefined???
after the first scan (Start Runtime) the value is change to Continous == 0
I don't know why its starts with the value 4
but in my case is starts with sending all the programmed messages.(only one time)
I solved this problem with the next changes:
IN rt_io_m_mb_rtu_master.c :
********************************************************************************************
for ( i = 0; i < modules; i++) {
sts = 1;
if (!modulep->Continous[/b] && !modulep->SendOp) {
break;
}
local_card = &((io_sCardLocal *)cardp->Local)->msg;
if ( modulep->ScanInterval > 1 && local_card->interval_cnt != 0) {
modulep++;
continue;
}
****************************************************************************************
I change it to :
****************************************************************************************
for ( i = 0; i < modules; i++) {
sts = 1;
if (!(module_p->Continous==pwr_eYesNoEnum_Yes) && !modulep->SendOp) { <----change--
break;
}
local_card = &((io_sCardLocal *)cardp->Local)->msg;
if ( modulep->ScanInterval > 1 && local_card->interval_cnt != 0) {
modulep++;
continue;
}
***************************************************************************************