Issue
You need to create a programmable object in Sigma that:
- Monitors an existing object (Object 1).
- Uses a time schedule (Object 2) to determine when to hold and output the value from Object 1.
- Maintains the output until the next time schedule "off" period, at which point the value is reviewed again.
Product Line
Satchwell BAS & SigmaEnvironment
Satchwell Sigma
Cause
Assistance is required to implement a programmable object that dynamically responds to both an object’s state and a time schedule.
Resolution
The following logic fulfills the requirement. Ensure you use the correct controller and object numbers for your specific setup.
Object Definitions
- Object 1: The existing object whose value is to be monitored.
- Object 2: The time schedule controlling when the value is held and reviewed.
Programming Logic
10 IF P (2) ON THEN XINT = 1 ELSE XINT = 0
20 IF XINT DOWN THEN GOTO 40
30 GOTO 50
40 IF P (1) ON THEN YINT = 1 ELSE YINT = 0
50 IF YINT = 1 THEN RETURN TRUE "HW"
60 RETURN FALSE "CW"
Explanation
- Line 10: Checks if the time schedule (Object 2) is ON.
- Line 20: If the time schedule transitions from ON to OFF, proceed to line 40.
- Line 40: Evaluates the state of Object 1 and sets YINT accordingly.
- Line 50–60: Returns TRUE or FALSE based on YINT, outputting either "HW" or "CW".
Additional Notes
- This logic ensures the value from Object 1 is captured and held when the time schedule turns OFF.
- The value is only updated during subsequent OFF transitions of the time schedule.