Convert time chart to relation vector to calculate plc I-O state as function of time