Since you have only 8 outputs, why not using a loop test and branch to different procedure...
something like this...
Code:MyInput var Byte ' contactor input State var bit[8] 'state of each input TestLoop var byte Start: MyInput = PORTA TestLoop = 0 DoContactorTest: State[TestLoop] = Myinput.0[TestLoop] If state[testloop] = 1 then finishorno Branch TestLoop,[relay1,relay2,relay3,relay4,_ relay5,relay6,relay7,relay8] FinishOrNo: TestLoop = TestLoop + 1 If Testloop<=7 then DoContactortest goto start relay1: ' Do the according stuff goto finishorno relay2: ' Do the according stuff goto finishorno ' ' same for the other




Bookmarks