Having all sequences stored in eeprom and reading them from there would make it much shorter.
for example:
This is just an example.Code:read Index,PosX ' Read all sequences from eeprom, previously arranged manually. Read (Index+100),PauseVal ' Read required delay time stored in eeprom (in case the delay time is different for each sequence). Thy1 = PosX.0 ' Assign thyristor distribution. Thy2 = PosX.1 Thy3 = PosX.2 Thy4 = PosX.3 Thy5 = PosX.4 Thy6 = PosX.5 pauseus PauseVal ' Delay for required time. index = index + 1 ' Increment the sequence index. if index = ENDOFSEQ then index = 0 ' Reached the end of sequence. Loop over.
You may change it as you like.
Just have all on-off sequence and delay time(s) stored in eeprom and read from there.




Bookmarks