
Virtual Logic is a user-friendly application that enables you to construct "ladder logic"-style programs that run on the HyperTAC II SCADA server.
Ladder logic is a graphical (symbols and text) language that is used to plan, maintain and control industrial systems. Each rung of the ladder (hence the name - Ladder Logic) is used to control a single output.
The ladder logic diagrams - built using groups of rungs and branches - are actually programs you create to manage complex control functions. These graphical programs are converted into virtual points and auto control points, and are continuously scanned by the system - HyperTAC II is scheduled to complete one program scan every second. The speed of the scanning process enables you to have the most up-to-date information, which allows you to react to situations quickly and efficiently.
DFS's Virtual Logic Builder provides the extra flexibility of allowing rungs and branches to hold numeric values, including inputs from analog points and the results of math operations, such as ADD and MAXIMUM.
After a ladder logic diagram has been built and installed, you can use its virtual points and auto controls in custom screens - graphical representations of your SCADA system that can be used to remotely monitor and control your system.
Following are some simple examples of this valuable system tool.
Example > Examine Objects
In this example, we create a ladder logic diagram that determines if a high well level condition exists by taking the following steps:
- Fetches the value of a point that measures the level of a well.
- Determines if the well level is greater than or equal to a constant value.
- Outputs the result of the comparison to a virtual point. If the above statement is true, the virtual point will have a digital value of 1. If the above statement is not true, the virtual point will have a digital value of 0. This virtual point will then be used in another equation (See Output Objects example) to determine if a pump should be turned on.

- Start Virtual Logic Builder and create a new ladder logic diagram file.
- Add a RUNG and drag it down a little.
- Add an EXAMINE ANALOG and assign it the existing telemetry address 3A52 (address of point that measures well level). Name the object "Well Level."
- Add a GREATER OR EQUAL to the right of Well Level. Move GREATER OR EQUAL to the right so there is sufficient room between it and Well Level.
- Add a BRANCH that begins to the left of Well Level and ends at GREATER OR EQUAL.
- Add a CONSTANT to the branch. Set CONSTANT'S value to 45.000.
- Select GREATER OR EQUAL and add a VIRTUAL OUT. Assign VIRTUAL OUT the new virtual address V_HWELL. Change VIRTUAL OUT'S name to "High Well."
Example > Output Objects
In this example, we create a ladder logic diagram that turns on a pump if a high well level condition exists by taking the following steps:
- Fetches the value of a virtual point that outputs a 1 (well level is high) or 0 (well level is not high).
- Determines if the above virtual point is "true" has a value of 1 by comparing its value to a constant (1).
- Outputs the result to an auto control point. If the output from the comparison is true (equal to 1), the pump is turned on.
This diagram uses the virtual point High Well (virtual address V_HWELL) that was created in the Examine Objects example.

- Start Virtual Logic Builder and create a new ladder logic diagram.
- Add a RUNG and move it down a little.
- Add an EXAMINE ON object. Assign EXAMINE ON the existing virtual address V-HWELL. Change its name to "High Well."
- Add an EQUAL operator to the right of High Well. Move EQUAL to the right so that there is sufficient room between it and High Well.
- Add a BRANCH that begins to the left of High Well and ends at EQUAL.
- Add a CONSTANT to the BRANCH. Set the CONSTANT'S value to 1.
- Add a Digital OUT to the right of EQUAL. Assign it the existing telemetry address 3A65 (address of the auto control that turns on Pump) Change OUT'S name to "Pump 1 Start."
Example > Time/Date Objects
In this example, we create a ladder logic diagram that determines if today is Monday by taking the following steps:
- Fetches current day of week value (possible values are 1 -7, where 1 = Sunday).
- Checks if current day is equal to 2 (Monday).
- Outputs the result of this comparison to a virtual point. If the above comparison is true (today is Monday), then the output is 1. If the comparison is not true, then the output is 0.

- Start Virtual Logic Builder and create a new ladder logic diagram file.
- Add a RUNG and move it down a little.
- Add a DAY OF WEEK object.
- Add an EQUAL operator to the right of DAY OF WEEK.
- Add a BRANCH that begins to the left of DAY OF WEEK and ends at EQUAL.
- Add a CONSTANT to the BRANCH. Set CONSTANT'S value to 2.
- Add an Analog VIRTUAL OUT to the right of EQUAL. Assign it the new virtual address V_MONDAY. Change VIRTUAL OUT'S name to "Monday?".
Example > Cycle
In this example, we create a ladder logic diagram that counts the number of times a pump has come on during a 24-hour period by taking the following steps:
- Fetches the current state of Pump1 and adds a 1 to Cycle if Pump1 is on.
- Resets CYCLE at midnight.
- Outputs the total to an Analog VIRTUAL OUT that is given the new virtual address V_PUMP1ON.

- Start Virtual Logic Builder and create a new ladder logic diagram file.
- Add a RUNG and move it down a little.
- Add an EXAMINE ON object. Assign EXAMINE ON the existing telemetry address 10B2. Change its name to "Pump 1."
- Add a CYCLE object to the right of Pump 1. Move CYCLE to the right so that there is sufficient room between it and Pump 1. [Note: By not adding a BRANCH to CYCLE'S second input, we force HyperTACII to automatically reset CYCLE at midnight.]
- Add an Analog VIRTUAL OUT to the right of CYCLE. Assign VIRTUAL OUT the new virtual address V_PUMP1ON. Change VIRTUAL OUT'S name to "Pump1 On Count." Set this object's LOG parameter to Y. Doing this enables us to track and view cycle count changes using HyperTACII's Pump Activity Report.
Example > Latch
In this example, we create a ladder logic diagram that turns on a sprinkler at 9:00 AM and turns it off at 10:00 AM by taking the following steps:
- Creates the conditions for setting and resetting the LATCH.
- Uses these conditions for the set and reset inputs for the LATCH.
- Sends output from LATCH to the auto control point named Sprinkler Start.

- Start Virtual Logic Builder and create a new ladder logic diagram file.
- Create Set Latch condition. Auto control point is SET when current hour is equal to 15, current minute is equal to 10 and current second is equal to 01. (See Example Time/Date Objects). The result of the first condition (Hour = 15) is ouput to the EXAMINE ON object VCON1. The result of the second condition (Minute = 10) is output to the EXAMINE ON object VCON2. The result of this evaluation is output to a Digital VIRTUAL OUT object. VIRTUAL OUT is given the new virtual address V_SET and is renamed "SET." When Second = 01 and both VCON1 and VCON2 are true, the latch is SET.
- Create Reset Latch condition. Auto control point is RESET when current hour is equal to 10, current minute is equal to 0 and current second is equal to 0. (See Example Time/Date Objects). The result of the first condition (Hour = 15) is output to the EXAMINE ON object VCON3. The result of the second condition (Minute = 15) is output to the EXAMINE ON object VCON4. The result of this evaluation is output to a Digital VIRTUAL OUT object. VIRTUAL OUT is given the new virtual address V_RESET and is renamed "RESET." When Second = 01 and both VCON3 and VCON4 are true, the latch is RESET.
- Add a new RUNG below the Reset Latch condition.
- Add an EXAMINE ON object. Assign it the virtual address V_SET (created in step 2, above) and rename it "SET."
- Add a LATCH to the right of SET.
- Add a BRANCH that starts to the left of SET and ends at Latch.
- Add an EXAMINE ON object to the branch. Assign it the virtual address V_RESET (created in step 3, above) and rename it "RESET."
- Add a Digital OUT to the right of LATCH. Assign it the real, existing telemetry address 1A1 (address of the point that controls the sprinklers) and rename it "Start Device."
Example > Move
In this example, we create a ladder logic diagram that turns on a pump if the well level reaches a certain depth by taking the following steps:
- Retrieves the current value for the well level.
- Determines if the current level is less or equal to a constant value.
- If current well level is less than or equal to the constant, a 1 is output, which starts a pump. If current well level is not less than or equal to the constant, a 0 is output.

- Start Virtual Logic Builder and create a new ladder logic diagram file.
- Add a RUNG and move it down a little.
- Add an EXAMINE ANALOG object. Assign it the real, existing telemetry address 1A52 (address of point that measures level of well) and rename it "Well Level."
- Add a LESS OR EQUAL object to the right of Well Level.
- Add a BRANCH that begins to the left of Well Level and ends at LESS OR EQUAL.
- Add a CONSTANT to the BRANCH and change its value to 15.000 (the level at which we want the pump to come on).
- Add a MOVE object to the right of LESS OR EQUAL.
- Add a BRANCH that begins to the left of the Well Level/LESS OR EQUAL branch and ends at MOVE.
- Add a Digital OUT to the right of MOVE. Assign it the real, existing telemetry address 1A65 (address of point that starts pump) and rename it "Pump1 Starter."