Access the Program object
The Program object provides status information about a program. Specify the program name to determine the Program object you want.
Attribute | Data Type | Instruction within Standard Task | Instruction within Safety Task | Description |
---|---|---|---|---|
DisableFlag | SINT | GSV SSV | None | Controls this program’s execution. Each value has a specific meaning:
|
DINT | GSV | GSV | A non-zero value disables. | |
LastScanTime | DINT TIME32 | GSV SSV | None | Time to execute program the last time it was executed. Time is in microseconds. |
MaxScanTime | DINT TIME32 | GSV SSV | None | Maximum recorded execution time for this program. Time is in microseconds. |
MajorFault Record | DINT[11] | GSV SSV | GSV SSV | Records major faults for this program. |
MinorFault Record | DINT[11] | GSV SSV | GSV SSV | Records minor faults for this program. |
Name | String | GSV | GSV | Name of the program. |
TIP:
Rockwell Automation recommends creating a user-defined structure to simplify access to either Fault Record attribute:
Name | Data Type | Style | Description |
---|---|---|---|
Timestamp | LINT | Decimal | The time at which the fault occurred. Units are microseconds since Jan 1, 1970. |
Type | INT | Decimal | Fault type (program, I/O, and so forth) |
Code | INT | Decimal | Unique code for the fault (depends on fault type) |
Info | DINT[8] | Hexadecimal | Fault specific information (depends on fault type and code) |
Provide Feedback