hi all,
i am trying to make a simple PLC with 89c52, and i coded a OS-like program for it, so i created my own language like STL.
now it can handle bit based operations as A,AN,O,ON,S,R,= and ondelay timers.
all but the timers work well. but the timer sensitivity belong to the code lenght of the PLC program 'cos in the OS of the plc, i count 100ms interrupt signals, so with a long program, an 10s on delay timer sets its output aprox, at 10,3 - 10,5 seconds.
do you know how real PLCs handle this timing?
i am trying to make a simple PLC with 89c52, and i coded a OS-like program for it, so i created my own language like STL.
now it can handle bit based operations as A,AN,O,ON,S,R,= and ondelay timers.
all but the timers work well. but the timer sensitivity belong to the code lenght of the PLC program 'cos in the OS of the plc, i count 100ms interrupt signals, so with a long program, an 10s on delay timer sets its output aprox, at 10,3 - 10,5 seconds.
do you know how real PLCs handle this timing?