Logic to check controller loaded project from nonvolatile memory
When a controller loads a project from nonvolatile memory, it:
- Logs a minor fault (type 7, code 49).
- Sets the FAULTLOG object, MinorFaultBits attribute, bit 7.
If you want your project to flag that it loaded from nonvolatile memory, use this logic.
On the first scan of the project (S:FS is on), the GSV instruction gets the FAULTLOG object, MinorFaultBits attribute, and stores the value in minor_fault_bits. If bit 7 is on, the controller loaded the project from its nonvolatile memory.
Where: | Is the: |
minor_fault_bits | Tag that stores the FAULTLOG object, MinorFaultBits attribute (data type is DINT). |
NVM_load | Tag that indicates the controller loaded the project from its nonvolatile memory. |
Provide Feedback