SYSdev Program Structure
The SYSdev programming language is a combination of ladder, high-level (subset of "C") and assembly (MCS-96). All the files which comprise a SYSdev program are programmed in the same language format. Each file can be written in any combination of the language types.
Each file is executed sequentially from beginning to end. The main program file is executed (scanned) continuously unless interrupted by the timed interrupt or either of the input interrupts. Main program execution is suspended while the interrupt executed. Program execution resumes at the point where the interrupt occurred at the completion of the interrupt.
Each file is implemented as a series of consecutive blocks. Each block is defined as one of the three programming languages: ladder, high-level, or assembly. Blocks of the different languages can be intermixed as necessary within the file.
The typical M4500 PLC SYSdev program consists of the following files:
- Initialization file (.LIN): executed once at power up (optional).
- Main Program file (.LMN): continuously looping (required).
- Timed Interrupt file (.LTD): executed once every 0.250 to 65.000 milliseconds as set by the user (optional).
- User Function file (.Lxy): up to 100 (00-99) user defined subroutines which can be called from the Initialization, Main, Timed Interrupt or any other User Function file.
- Input Interrupts (ufunc00 and ufunc01): With the input interrupts enabled, user function 00 is called when IN0 is activated or user function 01 is called when IN1 is activated.