Here’s the updated version of my AOI incorporating the changes I mentioned a few posts back. The Run Mode and Program mode status bits are now brought out of the controller status.
Here are the quick and dirty details about the AOI
[ul]
[li] Written in Ladder Logic[/li]
[li] 448 bytes large[/li]
[li] Get’s system Clock[/li]
[li] Extrapolates Day of Week from Clock[/li]
[li] Gets PLC Serial Number[/li]
[li] Gets PLC Name[/li]
[li] Gets PLC Type[/li]
[li] Gets PLC Revision[/li]
[li] Alarms on IO Fault, Serial Port Error, Fault Handler Error, Execution errors, Watchdog timer expirations, Minor and Major Faults, and PLC Battery Status[/li]
[li] Detects position of Key Switch and Run/Program Mode (with limitations previously mentioned)[/li][/ul]
Importing this AOI will create the following additional AOIs, User-Defined Data Types, and String Data Types
[ul]
[li] HexToString AOI (140 bytes) - Used to Convert Serial Number from Hexadecimal to Human Readable String[/li]
[li] Clock User-Defined Data Type (16 bytes) - Presents PLC Clock as object with human readable extensions (i.e. Clock.Year, Clock.Month) instead of having to constantly lookup what Clock[0] and Clock[1] referenced[/li]
[li] String_8 (12 bytes) - a String with 8 characters max (saves a lot of space compared to default string)[/li]
[li] String_50 (56 bytes) a String with 50 characters max (saves a lot of space compared to default string)[/li][/ul]
Let me know if you need any assistance with the block.