Syntax |
Example |
Description/Remarks |
|
Debug 1 |
1 turns on debug mode, and 0 turns it off. In debug mode, a Debug Information screen is displayed after each cell's formula is processed. See below for more information on the Debug Information screen. To manually turn off debug mode, the user can clear the Debug mode check box on the Debug Information screen. This command does not return a value. |
In debug mode, a Debug Information screen is displayed after each cell's formula is processed.
The user may not change any values on this screen – they are for viewing only.
To copy the contents of the text buffer to the clipboard, double-click on the Buffer box.
To close the Debug Information screen and proceed to the next cell, click Close.
Turning DEBUG on and off
To manually turn off debug mode, clear the Debug mode check box on the Debug Information screen, and then click Close.
To manually turn on debug mode during a data entry session, a user with rights to log in to the SPC Designer module can press CTRL + ALT + SHIFT + D or CTRL + ALT + SHIFT + F8. The next cell containing a formula will display the Debug Information screen.
If a formula error is encountered during data entry, the Formula failed message is displayed. A user with rights to log in to the SPC Designer module can click Debug to display the Debug Information screen.
NVar values and SVar values
NVars, MyNVars and MyNArrs that do not equal zero are displayed in the NVar values list.
SVars, MySVars and MyNArrs that are not empty strings are displayed in the SVar values list.
To copy the value of one of these variables to the clipboard, double-click that item.
Data source connection information
To view the active data source connections and the available columns and values for each connection, click SQL.
Executing additional template commands
The process of debugging a template usually involves finding a template command or formula that is not producing the expected results, and then changing or replacing the formula until satisfactory results are achieved. This can be done by using the SPC Designer module to change the formula, saving the modified template, and then re-opening the template in the SPC Data Entry module.
However, a faster method may be to change the template formulas and execute those changes directly from the SPC Data Entry module. To use this method, click the Execute button. This displays the Execute Commands screen.
In the Enter commands box, type the new or modified template formula that you want to run, and then click Execute. If you need help with the template syntax, click Paste to view the list of template commands and to view and paste the correct syntax into the Enter commands box.
You should be aware of the following issues when using the Execute feature:
Important: Using the Execute feature to run additional template formulas does not save any formula changes to the template.
To save any formula changes in the template, use the SPC Designer module to edit the template and save the changes there.
When you use the Execute feature to run additional commands, the template will fail to execute any of the following commands that were contained in the original formula for this cell: GOTO, EXIT, SHUTDOWN, SAVEROW, SAVEROWS, and SAVEALL.
However, if you add any of these commands to the formula that you execute, the template will correctly perform the command when you click Close on the Debug Information screen.
The Execute feature cannot change the value of the current cell – not even by using the SETCELL command. To change the value of the current cell, you must use the SPC Designer module to edit the formula for that cell, save the change, and re-open the template in the SPC Data Entry module.
Cell references such as "[A1]" are only allowed with the GOTO command.
Using the Debug window and the Execute feature on multiple monitors
If you run GainSeeker on a computer with more than one monitor, it is recommended that you launch and run the SPC Data Entry module on your primary monitor when using the Debug window and the Execute feature:
The position of the Debug window and the Execute feature are automatically configured when the SPC Data Entry module is launched. If you launch the SPC Data Entry module on one monitor and then drag it to a different monitor, the Debug window and the Execute feature will still be displayed on the original monitor.
Any programs that are minimized assume a position on the primary monitor. Thus, if you run the SPC Data Entry module on your secondary monitor and minimize it, and your template displays a window, that window will be displayed on your primary monitor.