I have a touch screen monitor (HMI) that I am tinkering with. It programs a series of tempurature controllers I have. I got it to talk to one controller but it doesn't pass on the info to 1 other controller I have attached for practice. Here is the code I have.
The HMI has a TAG section and all of my TAG's are associated correctly.Code:int range = 5; while(State != 3) { switch(State) { case 0: if((Abs(PV1-ActiveSP) < range)&&(Abs(PV2-ActiveSP1) < range)) // wait until PV is with range { State = 1; FinishTime = GetNow() + ActiveSoak; } break; case 1: if(GetNow() >= FinishTime) { RunningStep++; State = 2; } break; case 2: if((SPs[RunningStep] == 0)&&(SPs1[RunningStep] == 0)&& (Ramps[RunningStep] == 0)&&(Ramps1[RunningStep] == 0)&& (Soaks[RunningStep] == 0)&&(Soaks1[RunningStep] == 0)) { State = 3; CTL = 0; ActiveSP = 0; } else { State = 0; ActiveSP = SPs[RunningStep]; ActiveRamp = Ramps[RunningStep]; ActiveSoak = Soaks[RunningStep]; ActiveSP1 = SPs1[RunningStep]; ActiveRR1 = Ramps1[RunningStep]; ActiveSoak1 = Soaks1[RunningStep]; } break; } }
This may be odd since it's not a OS specific problem.
Any help is appreciated. Just a warning, I will have many more questions I am sure. Plus if you can help with this I can direct you to the program software that is free with this HMI and you can view my Database completely.
Thanks,
EW