How to Display Status in the Program Editor (GS 7.2)

Related Topics

What is your Program Editor?

LAD

FBD

STL

PROGRAM STATUS IN LAD

Back to Top

This section discusses the following subjects:

Turning on Program Status

Understanding the Program Status Display

Restrictions on Program Status

Forcing or Unforcing Values in Program Status

Adjusting the Program Status Display

Turning on Program Status

Back to Top of LAD Section

Tip:

When you download a program to the PLC, you are prompted to switch the PLC to STOP mode. If you want to watch continuous updates of Program Status, be sure to switch the PLC back to RUN mode! You can check the STEP 7-Micro/WIN 32 status bar to see the current mode of the PLC.

To turn on Program Status, use one of the following methods:

·Choose the menu command Debug>Program Status.

·Click on the Program Status button in the Debug toolbar.

After a brief pause, the Program Editor window should begin to display status.

Boolean instructions (contacts, coils) are shown as colored blocks if the operand value equals 1 (bit is on). The value of non-Boolean operands is shown, and updated as rapidly as communication speed permits.

Tip:

When you turn Program Status on, many other STEP 7-Micro/WIN 32 functions are disabled. For instance, you cannot edit your program unless you turn Program Status off again. Other functions, such as changing your view from one Program Editor to another, cause Program Status to turn off automatically, and if you want to continue viewing status you have to re-select (turn back on) the Program Status option.

Troubleshooting If you have trouble turning program status on, remember these prerequisites:

·You must successfully establish communications (in order to download your program) first.

·You must select the correct PLC model for downloading your program.

·You must successfully compile your program.

·You must successfully download your program.

·To view a continuous update of status, your PLC must be in RUN mode. Otherwise, you see only changes to I/O (if there are any). Because the PLC program is not executing, changes to the I/O do not have the effect you would expect on program logic in the Program Status display.

·If you are in a region of the program that is not being executed (for instance, a subroutine, an interrupt routine, or a region that has been bypassed because of a JMP instruction), there is no status display because the code is not being scanned.

Understanding the Program Status Display

Back to Top of LAD Section

When you turn on Program Status in LAD, Boolean instructions are displayed as colored blocks if the value of the operand equals 1 (bit is on). The current data value of other operands is displayed next to (or in place of) the operands, and the display is updated as changes are read from the PLC.

A lock icon indicates that the value has been "explicitly," or directly, forced to the value that is currently displayed.

A grayed-out lock icon indicates that the value has been "implicitly" forced. That is, the address was not forced directly, but the memory area falls within another greater value that has been explicitly forced. For example, if you explicitly force VW0, then VB0 and VB1 are implicitly forced because they are contained by VW0.

A half-lock icon indicates that the value is "partially" forced. For example, if you explicitly force VB1, then VW0 is partially forced because one of its bytes, VB1, is forced.

Restrictions on Program Status

Back to Top of LAD Section

The advantage of viewing status from the Program Editor window is that you get a graphical representation of what is happening in your program. You can force and unforce values from Program Status, but you do not have all of the tools that are available from the Status Chart (such as the Single Read, Write All, and Read All Forced functions, and the ability to type in the precise value to which you want to force an operand).

It is important to understand the limitations of Program Status when you are debugging or monitoring your program.

Communications Lag When Forcing Values Because of the communications time lag between the PLC and the programming device where you are watching Program Status, the value that you see displayed for an operand always changes in the PLC before it changes in the status display. While it does not take long for the display to be updated, it is possible for you to issue a Force command to an operand whose value has actually changed in the PLC but not in the Program Status representation.

Tips:

·When you force an operand, always watch the Program Status display until the lock icon appears. Once the lock icon appears, you can be certain that the value has been correctly forced (or else you will see what value was forced, and you can correct it).

·If you want to force an operand whose value is fluctuating, use the Status Chart. That way, instead of trying to "capture" a value from a changing display, you can type the desired value directly into the New Value column and then issue the Force command.

"Power Flow" Coloring Does Not Always Mean Power Is Flowing! Because Program Status in LAD reports only end-of-scan values, it can sometimes be difficult to interpret what a "power flow" representation really signifies. Boolean contacts and coils are colored in LAD Program Status according to the value of their bit operand. If the bit value is equal to 1 (bit is on), the instruction receives color. However, this does not necessarily mean that the instruction has executed. There are several conditions which may cause a misleading representation of power flow:

·If the PLC is in STOP mode when you examine status, contacts may be enabled but coils and boxes do not turn on because the program is not executing.

·If you have issued a jump instruction, the networks you are examining may not display the results that you expect because the PLC is actually bypassing them during program execution.

·Similarly, if you examine a subroutine, the Boolean operands may be enabled but the subroutine logic can only execute when the subroutine is activated. If the subroutine has not been called by the program, no logic is executed on those networks, regardless of the bit values of the instructions.

LAD End-of-Scan versus STL Per-Instruction Status When you monitor Program Status in the LAD Program Editor, status is collected at the end of each scan cycle. When you monitor Program Status in the STL Program Editor, status is collected after the evaluation of each instruction. As a LAD programmer, you can view your program in STL to make use of the STL method of status reporting, and simply switch back to your preferred view (LAD) afterward. The STL method of status reporting may help you pinpoint details that cannot be detected using the LAD end-of-scan method of status reporting. Changing your view has no impact on your actual program.

To change views from LAD to STL, simply choose the menu command View>STL and then turn Program Status back on by choosing Debug>Program Status. When you are finished, return to LAD view by choosing View>Ladder.

Forcing or Unforcing Values in Program Status

Back to Top of LAD Section

The Force function overrides an immediate-read or immediate-write instruction. The Force function also overrides an output that was configured to go to a specified value on transition to STOP mode: if the CPU goes to STOP mode, the output is set to the forced value and not the configured value.

Warning

When you force a value in your program, the operand is reset to that value with each scan of your program, regardless of input/ output conditions or other program logic that would ordinarily have an effect on the operand value. Forcing can cause your process to operate unpredictably, and unpredictable process operation can cause death or serious injury to personnel, and/ or damage to equipment. The Force function is an aid for debugging your program; never force a value to compensate for problems with your process equipment. Only qualified personnel should use the Force function. Be sure that all personnel who have authority to maintain or debug your process are aware when program values have been forced.


How to Force and Unforce Values Use one of these methods.

To force an operand:

·Click directly on the operand (not on the instruction) and then click on the Force icon from the Debug toolbar.

·Right-click directly on the operand (not on the instruction) and choose Force from the pop-up menu.

To unforce a single operand:

·Click directly on the operand (not on the instruction) and then click on the Unforce icon from the Debug toolbar.

·Right-click directly on the operand (not on the instruction) and choose Unforce from the pop-up menu.

To unforce all forced values:

·Click directly on the operand (not on the instruction) and then click on the Unforce All icon from the Debug toolbar.

·Right-click directly on the operand (not on the instruction) and choose Unforce All from the pop-up menu.

The Read All Forced option is only available from the Status Chart, not from Program Status.

Note:

Program Status allows you to force operands to their current value, whereas Chart Status allows you to type a desired value into the New Value column. Bear in mind that the PLC forces the operand to its current value when the PLC receives the force command. This is a rapid but not instantaneous process. It is possible for the operand value to change between the time when you click on the status display in STEP 7-Micro/WIN 32 and the time that your force command is received by the PLC. Once the lock icon appears next to the operand, you can see what value it has been forced to in the PLC. If the value was not forced correctly, you can use a status chart to type the exact value that you desired into the New Value column and force the operand from Chart Status.

Memory Areas That Can Be Forced Not all memory addresses are forceable. The following memory areas can be forced:

·Any or all digital inputs and outputs (DI, DQ)

·Up to 16 internal memory values (V or M) and/ or analog inputs and outputs (AI, AQ)

V memory or M memory values can be forced in bytes, words, or double words. Analog values are forced as words only, on even-numbered byte boundaries (such as AIW6 or AIW14). If you force VD0 (which contains VB0, VB1, VB2, and VB3), that counts as 1 of the 16 internal memory values that you can force. If you force VB0, VB1, VB2, and VB3 as separate entities, that counts as 4 of the 16 internal memory values that you can force. All forced values are stored in the permanent EEPROM memory of the CPU.

Scan Cycle Because the forced data might be changed during the scan cycle (either by the program, by the I/O update cycle, or by the communications processing cycle), the CPU reapplies the forced values for each scan cycle.

Unexpected Program Operation with a Forced Value You need to understand how each memory type is forced in order to use the Force function effectively.

For example, you might have program logic like this:

...

If you are looking Network 43 of this program, and do not remember how VB0 is manipulated in other sections of the program, you might think you could force VB0 to 20 in order to activate SBR1. But remember that Network 29 sets the value of VB0 to 50 with the MOV_B instruction. When Network 43 is evaluated by the PLC, VB0 contains the value 50, so SBR1 is not activated. Even if you create a Status Chart, type in a New Value of 20 for VB0, and apply the Force command, the value of VB0 is only set to 20 after program logic is evaluated, at the end of the scan. VB0 is a V memory value, and the force command is applied to V memory addresses after the program logic is evaluated.

Because LAD Program Status displays end-of-scan values, it shows VB0 at the forced value of 20. But VB0 does not contain the forced value when Network 43 is actually evaluated by the PLC; hence, forcing VB0 does not have the desired effect on SBR1.

If you are debugging your program and find that a network with a forced operand does not execute as you would expect it to, use the Edit>Find command to look for other networks that may be referencing and altering the value of the operand.

Adjusting the Program Status Display

Back to Top of LAD Section

Use the menu command Tools>Options and select the Status tab to modify the following settings:

·Zoom factor: edit the Scale setting.
Shortcut: To quickly adjust the Zoom setting from Program Status, use key combinations. Press the CTRL key and the PLUS key from the numeric keypad to increase the display size; press the CTRL key and the MINUS key from the numeric keypad to decrease the display size.

·Cell width and height: edit the Grid settings.
You might want to increase cell width to allow more information to be displayed without truncation.
You might want to decrease cell height to allow more networks to displayed on the screen.

·Power flow: you can change the color that is used to indicate when Boolean operands are enabled (bit value equals 1).

·Operand display: you can display operands inside or outside of instructions; you can also display the status value without showing a name or address for the operand.

In addition, you can rearrange other windows within STEP 7-Micro/WIN 32 in order to make more room for the Program Editor window (or in order to view it side-by-side with another window, such as a Status Chart, Symbol Table, or Cross Reference window). Use the View and Windows menu commands and size and drag windows with your mouse to arrange all windows to your satisfaction.

PROGRAM STATUS IN FBD

Back to Top

This section discusses the following subjects:

Turning on Program Status

Understanding the Program Status Display

Restrictions on Program Status

Forcing or Unforcing Values in Program Status

Adjusting the Program Status Display

Turning on Program Status

Back to Top of FBD Section

Tip:

When you download a program to the PLC, you are prompted to switch the PLC to STOP mode. If you want to watch continuous updates of Program Status, be sure to switch the PLC back to RUN mode! You can check the STEP 7-Micro/WIN 32 status bar to see the current mode of the PLC.

To turn on Program Status, use one of the following methods:

·Choose the menu command Debug>Program Status.

·Click on the Program Status button in the Debug toolbar.

After a brief pause, the Program Editor window should begin to display status.

Boolean operands are shown in color wherever the operand has a value of 1. The value of non-Boolean operands is shown, and updated as rapidly as communication speed permits.

Tip:

When you turn Program Status on, many other STEP 7-Micro/WIN 32 functions are disabled. For instance, you cannot edit your program unless you turn Program Status off again. Other functions, such as changing your view from one Program Editor to another, cause Program Status to turn off automatically, and if you want to continue viewing status you have to re-select (turn back on) the Program Status option.

Troubleshooting If you have trouble turning program status on, remember these prerequisites:

·You must successfully establish communications (in order to download your program) first.

·You must select the correct PLC model for downloading your program.

·You must successfully compile your program.

·You must successfully download your program.

·To view a continuous update of status, your PLC must be in RUN mode. Otherwise, you see only changes to I/O (if there are any). Because the PLC program is not executing, changes to the I/O do not have the effect you would expect on program logic in the Program Status display.

·If you are in a region of the program that is not being executed (for instance, a subroutine, an interrupt routine, or a region that has been bypassed because of a JMP instruction), there is no status display because the code is not being scanned.

Understanding the Program Status Display

Back to Top of FBD Section

When you turn on Program Status in FBD, Boolean operands are displayed in color if the value of the operand equals 1 (bit is on). The current data value of other operands is displayed next to (or in place of) the operands, and the display is updated as changes are read from the PLC.

A lock icon indicates that the value has been "explicitly," or directly, forced to the value that is currently displayed.

A grayed-out lock icon indicates that the value has been "implicitly" forced. That is, the address was not forced directly, but the memory area falls within another greater value that has been explicitly forced. For example, if you explicitly force VW0, then VB0 and VB1 are implicitly forced because they are contained by VW0.

A half-lock icon indicates that the value is "partially" forced. For example, if you explicitly force VB1, then VW0 is partially forced because one of its bytes, VB1, is forced.

Restrictions on Program Status

Back to Top of FBD Section

The advantage of viewing status from the Program Editor window is that you get a graphical representation of what is happening in your program. You can force and unforce values from Program Status, but you do not have all of the tools that are available from the Status Chart (such as the Single Read, Write All, and Read All Forced functions, and the ability to type in the precise value to which you want to force an operand).

It is important to understand the limitations of Program Status when you are debugging or monitoring your program.

Communications Lag When Forcing Values Because of the communications time lag between the PLC and the programming device where you are watching Program Status, the value that you see displayed for an operand always changes in the PLC before it changes in the status display. While it does not take long for the display to be updated, it is possible for you to issue a Force command to an operand whose value has actually changed in the PLC but not in the Program Status representation.

Tips:

·When you force an operand, always watch the Program Status display until the lock icon appears. Once the lock icon appears, you can be certain that the value has been correctly forced (or else you will see what value was forced, and you can correct it).

·If you want to force an operand whose value is fluctuating, use the Status Chart. That way, instead of trying to "capture" a value from a changing display, you can type the desired value directly into the New Value column and then issue the Force command.

"Power Flow" Coloring Does Not Always Mean Power Is Flowing! Because Program Status in FBD reports only end-of-scan values, it can sometimes be difficult to interpret what a "power flow" representation really signifies. Boolean operands are colored in FBD Program Status according to the value of their bit operand. If the bit value is equal to 1 (bit is on), the operand receives color. However, this does not necessarily mean that the instruction has executed. There are several conditions which may cause a misleading representation of power flow:

·If the PLC is in STOP mode when you examine status, input operands or other enabling conditions may be turned on, but coils and boxes do not turn on because the program is not executing.

·If you have issued a jump instruction, the networks you are examining may not display the results that you expect because the PLC is actually bypassing them during program execution.

·Similarly, if you examine a subroutine, the Boolean operands may be enabled but the subroutine logic can only execute when the subroutine is activated. If the subroutine has not been called by the program, no logic is executed on those networks, regardless of the bit values of the instructions.

FBD End-of-Scan versus STL Per-Instruction Status When you monitor Program Status in the FBD Program Editor, status is collected at the end of each scan cycle. When you monitor Program Status in the STL Program Editor, status is collected after the evaluation of each instruction. As an FBD programmer, you can view your program in STL to make use of the STL method of status reporting, and simply switch back to your preferred view (FBD) afterward. The STL method of status reporting may help you pinpoint details that cannot be detected using the FBD end-of-scan method of status reporting. Changing your view has no impact on your actual program.

To change views from FBD to STL, simply choose the menu command View>STL and then turn Program Status back on by choosing Debug>Program Status. When you are finished, return toFBD view by choosing View>FBD.

Forcing or Unforcing Values in Program Status

Back to Top of FBD Section

The Force function overrides an immediate-read or immediate-write instruction. The Force function also overrides an output that was configured to go to a specified value on transition to STOP mode: if the CPU goes to STOP mode, the output is set to the forced value and not the configured value.

Warning

When you force a value in your program, the operand is reset to that value with each scan of your program, regardless of input/ output conditions or other program logic that would ordinarily have an effect on the operand value. Forcing can cause your process to operate unpredictably, and unpredictable process operation can cause death or serious injury to personnel, and/ or damage to equipment. The Force function is an aid for debugging your program; never force a value to compensate for problems with your process equipment. Only qualified personnel should use the Force function. Be sure that all personnel who have authority to maintain or debug your process are aware when program values have been forced.


How to Force and Unforce Values Use one of these methods.

To force an operand:

·Click directly on the operand (not on the instruction) and then click the Force icon from the Debug toolbar.

·Right-click directly on the operand (not on the instruction) and choose Force from the pop-up menu.

To unforce a single operand:

·Click directly on the operand (not on the instruction) and then click the Unforce icon from the Debug toolbar.

·Right-click directly on the operand (not on the instruction) and choose Unforce from the pop-up menu.

To unforce all forced values:

·Click directly on the operand (not on the instruction) and then click the Unforce All icon from the Debug toolbar.

·Right-click directly on the operand (not on the instruction) and choose Unforce All from the pop-up menu.

The Read All Forced option is only available from the Status Chart, not from Program Status.

Note:

Program Status allows you to force operands to their current value whereas Chart Status allows you to type a desired value into the New Value column. Bear in mind that the PLC forces the operand to its current value when the PLC receives the force command. This is a rapid but not instantaneous process. It is possible for the operand value to change between the time when you click on the status display in STEP 7-Micro/WIN 32 and the time that your force command is received by the PLC. Once the lock icon appears next to the operand, you can see what value it has been forced to in the PLC. If the value was not forced correctly, you can use a status chart to type the exact value that you desired into the New Value column and force the operand from Chart Status.

Memory Areas That Can Be Forced Not all memory addresses are forceable. The following memory areas can be forced:

·Any or all digital inputs and outputs (DI, DQ)

·Up to 16 internal memory values (V or M) and/ or analog inputs and outputs (AI, AQ)

V memory or M memory values can be forced in bytes, words, or double words. Analog values are forced as words only, on even-numbered byte boundaries (such as AIW6 or AIW14). If you force VD0 (which contains VB0, VB1, VB2, and VB3), that counts as 1 of the 16 internal memory values that you can force. If you force VB0, VB1, VB2, and VB3 as separate entities, that counts as 4 of the 16 internal memory values that you can force. All forced values are stored in the permanent EEPROM memory of the CPU.

Scan Cycle Because the forced data might be changed during the scan cycle (either by the program, by the I/O update cycle, or by the communications processing cycle), the CPU reapplies the forced values for each scan cycle.

Unexpected Program Operation with a Forced Value You need to understand how each memory type is forced in order to use the Force function effectively.

For example, you might have program logic like this:

...

If you are looking Network 43 of this program, and do not remember how VB0 is manipulated in other sections of the program, you might think you could force VB0 to 20 in order to activate SBR1. But remember that Network 29 sets the value of VB0 to 50 with the MOV_B instruction. When Network 43 is evaluated by the PLC, VB0 contains the value 50, so SBR1 is not activated. Even if you create a Status Chart, type in a New Value of 20 for VB0, and apply the Force command, the value of VB0 is only set to 20 after program logic is evaluated, at the end of the scan. VB0 is a V memory value, and the force command is applied to V memory addresses after the program logic is evaluated.

Because FBD Program Status displays end-of-scan values, it shows VB0 at the forced value of 20. But VB0 does not contain the forced value when Network 43 is actually evaluated by the PLC; hence, forcing VB0 does not have the desired effect on SBR1.

If you are debugging your program and find that a network with a forced operand does not execute as you would expect it to, use the Edit>Find command to look for other networks that may be referencing and altering the value of the operand.

Adjusting the Program Status Display

Back to Top of FBD Section

Use the menu command Tools>Options and select the Status tab to modify the following settings:

·Zoom factor: edit the Scale setting.
Shortcut: To quickly adjust the Zoom setting from Program Status, use key combinations. Press the CTRL key and the PLUS key from the numeric keypad to increase the display size; press the CTRL key and the MINUS key from the numeric keypad to decrease the display size.

·Cell width and height: edit the Grid settings.
You might want to increase cell width to allow more information to be displayed without truncation.
You might want to decrease cell height to allow more networks to displayed on the screen.

·Power flow: you can change the color that is used to indicate when Boolean operands are enabled (bit value equals 1).

·Operand display: you can display operands inside or outside of instructions; you can also display the status value without showing a name or address for the operand.

In addition, you can rearrange other windows within STEP 7-Micro/WIN 32 in order to make more room for the Program Editor window (or in order to view it side-by-side with another window, such as a Status Chart, Symbol Table, or Cross Reference window). Use the View and Windows menu commands and size and drag windows with your mouse to arrange all windows to your satisfaction.

PROGRAM STATUS IN STL

Back to Top

This section discusses the following subjects:

Turning on Program Status

Understanding the Program Status Display

Selecting Types of Data to Monitor with Program Status

Gathering First Scan Information

Using a Triggered Pause to Capture Quickly Changing Data (SBR, INT)

Troubleshooting Problems with Pointer Values

Adjusting the Program Status Display

Turning on Program Status

Back to Top of STL Section

Tip:

When you download a program to the PLC, you are prompted to switch the PLC to STOP mode. If you want to watch continuous updates of Program Status, be sure to switch the PLC back to RUN mode! You can check the STEP 7-Micro/WIN 32 status bar to see the current mode of the PLC.

To turn on Program Status, use one of the following methods:

·Choose the menu command Debug>Program Status.

·Click the Program Status button in the Debug toolbar.

After a brief pause, the Program Editor window should begin to display status for whatever categories of information you have selected by using the STL Status tab of the Options dialog box (which is reached by the menu command Tools>Options).

Tip:

When you turn Program Status on, many other STEP 7-Micro/WIN 32 functions are disabled. For instance, you cannot edit your program unless you turn Program Status off again. Other functions, such as changing your view from one Program Editor to another, cause Program Status to turn off automatically, and if you want to continue viewing status you have to re-select (turn back on) the Program Status option.

Troubleshooting If you have trouble turning program status on, remember these prerequisites:

·You must successfully establish communications (in order to download your program) first.

·You must select the correct PLC model for downloading your program.
Note: STL Program Status is only supported for 22x PLCs with the correct firmware release.

·You must successfully compile your program.

·You must successfully download your program.

·To view a continuous update of status, your PLC must be in RUN mode. Otherwise, you see only changes to I/O (if there are any). Because the PLC program is not executing, changes to the I/O do not have the effect you would expect on program logic in the Program Status display.

·If you are in a region of the program that is not being executed (for instance, a subroutine, an interrupt routine, or a region that has been bypassed because of a JMP instruction), there is no status display because the code is not being scanned.

Understanding the Program Status Display

Back to Top of STL Section

When you turn on Program Status in STL, the Program Editor window is divided into a code region (left side) and a status region (right side). The status region can be customized according to the types of values that you want to monitor.

There are three categories of values that you can monitor in STL Program Status:

·Operands You can monitor up to three operands per instruction.

·Logic Stack You can monitor up to the four most recent values from the logic stack.

·Instruction Status Bits You can monitor up to a dozen status bits.

The STL Status tab of the Options dialog box allows you to select or deselect any of these categories of values. If you deselect an item, it does not appear in the Program Status display.

STL Program Status allows you to monitor values, but not to force them. To force values for an STL program, simply use a status chart. Be aware that while STL Program Status shows status changes as each instruction is evaluated, the Status Chart only displays end-of-scan status information. If you observe a discrepancy between STL Program Status and the Status Chart information, you need to take into account the difference in how they report status information.

Notes:

·A series of dashes ------------ indicates that the PLC cannot report any more status information. This can happen if you are viewing a section of your program that contains numerous DWORD values, for instance, or if you try to monitor a large number of instructions simultaneously.

·A series of ellipsis marks ... indicates that the operand column is not wide enough to display the value. Place the mouse pointer in the column header area, on the boundary between two operand columns, and drag to move the column boundary.

·Red indicates that there was an error during the execution of a given line of your program.

·Gray indicates that the program line was not executed by the PLC.

Selecting Types of Data to Monitor with Program Status

Back to Top of STL Section

You can customize the way that Program Status is reported in STL by editing settings in the STL Status tab of the Options dialog box. Choose the menu command Tools>Options and click on the STL Status tab.

The Watch Status checkboxes allow you to include or remove operands, stack values, and instruction status bits (that is, flags) from the Program Status display. The Operands, Logic Stack, and Instruction Status Bits fields allow you to specify how many operands or logic stack values to display, or which status bits to display.

Gathering First Scan Information

Back to Top of STL Section

Any time that you switch the PLC from STOP mode to RUN mode, the First Scan bit (SM0.1) is activated for one scan. However, due to the speed of PLC execution, it may be difficult to monitor this bit from Program Status: the bit turns off quickly and the status information is refreshed rapidly.

The solution is to use the First Scan command. The First Scan command causes your PLC to switch from STOP to RUN mode, execute a single scan with SM0.1 on, and then switch back to STOP mode. Because the PLC does not execute more than one scan, the status information associated with the First Scan logic does not disappear before you have a chance to view it.

To gather First Scan information, follow this procedure:

1.Scroll the Program Editor window until it displays the region of the program that you want to monitor.

2.Ensure that Program Status is on. Examine the Debug menu or toolbar and turn the Program Status option on if it is not already on.

3.Put the PLC in STOP mode. (Choose the menu command PLC>STOP or use the STOP toolbar button.)

4.Choose the menu command Debug>First Scan.

Note:

When you use the First Scan option, your program is executed with SM0.1 turned on for one scan. However, memory areas are not automatically re-initialized. Therefore, the First Scan option does not completely simulate the effects of commissioning your system.

Using a Triggered Pause to Capture Quickly Changing Data (SBR, INT)

Back to Top of STL Section

Use the Triggered Pause feature to ensure that if a subroutine or interrupt routine is activated, the Program Status display retains the status information until you have inspected it to your satisfaction.

Scroll or tab your program to the section of code that you want to monitor. If the Program Status display shows only grayed (inactive) status information, you can use the Triggered Pause function to capture the status information the next time these lines of code are activated.

Click the Triggered Pause toolbar button or right-click and choose the popup menu item Triggered Pause.

Once new status information is obtained, it remains on screen as long as the Triggered Pause function is enabled. No further status updates are performed until you deselect the Triggered Pause function, regardless of how rapidly the data actually changes in the PLC. Without the Triggered Pause function, the screen would be refreshed on a continual basis and the status data might disappear before you could read and interpret it (or data might not reach the display at all).

Troubleshooting Problems with Pointer Values

Back to Top of STL Section

If you try to treat an address as a pointer, but the value contained at that address does not consist of a valid memory address, the error is shown in red.

Adjusting the Program Status Display

Back to Top of STL Section

Making More Space Use the View menu to dismiss any unnecessary items (such as the Navigation Bar, Instruction Tree, or Output Window) and make more space for the Program Status display.

Resizing the Display You can resize the Program Status display by placing the mouse pointer on the left edge of the status area and dragging.

If you have more than one Operand column, you can resize the columns. To resize them all equally, either resize the entire Program Editor window or resize the entire status region within the Program Editor window: the Operand columns automatically adjust, while the Logic Stack and Instruction Status Bit columns remain fixed. To resize a single Operand column, place the mouse pointer in the column header area, on the boundary between two operand columns, and drag to move the column boundary.

Note:

You cannot adjust the boundary between the last Operand column and the Logic Stack or Instruction Status Bit area, because you cannot resize the Logic Stack or Instruction Status Bit columns.

Adjusting What Items Are Displayed If you only see a few columns in the Logic Stack or Instruction Status Bit area, and you expected that more would be displayed, check the selections under the STL Status tab. (Choose the menu command Tools>Options to display the Options dialog box, and click the STL Status tab.) The columns must be checkmarked in the Watch Status area of the dialog box in order to be visible from Program Status.

Scrolling When you use the vertical scroll buttons, the lines of program code and the rows in the Program Status display advance synchronously. It may take a moment for the Program Status display to be refreshed when you scroll, because of the amount of data that has to be obtained from the PLC. If you resize the Program Status display to a smaller size, the horizontal scroll buttons become active for the Operand columns. You can also re-adjust the Operand column sizes to make them fit in the smaller display area. You cannot resize the Logic Stack or Instruction Status Bit columns and you cannot scroll them horizontally. If these columns do not fit in your Program Status display area, you should enlarge the horizontal Program Status display.

Back to Top

See Also:

Overview of Debugging and Monitoring Features (GS 7.1)

How to Display Status in a Status Chart (GS 7.3)

How to Execute a Limited Number of Scans (GS 7.4)

How to Download a Program (GS 6.3)

Timestamp Mismatch Error (ensuring that project in programming device matches project in PLC)

Cross Reference and Element Usage (ensuring that program edits do not cause duplicate assignments)

Program Edit in RUN Mode

PLC RUN/ STOP Mode

Writing and Forcing Outputs in STOP Mode