Run, Test and Publish Projects

The following sections describe how to build and test applications:

n        Running the Application

n        Diagnostic Tools

n        Build and Pack Projects

n        Project Version Control

n        Information Runtime Objects


Running the Application

You can test the application one of the following ways:

n        From Run > Test—Lets you run the project in “safe mode,” which runs the application with some features protected. Historical, Alarm and Event data are logged to temporary files so they will not effect the production logs, and drivers cannot write any data to the devices.

n        From Run > Startup—Lets you run the fully operational project, without building the project.

You can run the project using both test and startup at the same time.

To test the application:

1.      Do one of the following:

n        Go to Run > Test.

n        Go to Run > Startup.

2.      Enter or select information, as needed.

Field

Description

UserName

Enter a valid username to access the application.

Password

Enter the password that corresponds to the username.

Project Server

Read-only. Displays the IP address or name of the computer where the project is based on the configuration on the Server tab. See Running Projects.

Port

Read-only. Displays the port Action.NET uses for access. For test, it uses 3201. For startup, it uses 3101. These ports must be open on the server.

Startup Computer

Read-only. Displays whether the configured server is the local computer or a remote server.

Execution Path

Overrides the default execution path, which is the project file location.

Module Information

Run the Module Information tool.

Property Watch

Run the Property Watch tool.

Trace Window

Run the TraceWindow tool.

Run Modules

Select which Modules execute when running the project.

Status

Field shows current running and connected or disconnected status.

l      Click Try to Connect to connect to the running application. Required to let changes you make to the project apply immediately to the test or startup runtime.

l      Click Disconnect if you do not want changes you make to the project to apply immediately to the test or startup runtime.

l      Click Stop to stop the execution of the application.

Online Configuration Enabled

Select to let changes you make to the project apply immediately to the test runtime. You must also be connected to the running project (see Status setting above).

3.      Click either Run Test or Run Startup.


Diagnostic Tools

After starting the project, the Startup window, lets you select diagnostic tools: PropertyWatch (Watch), TraceWindow (Trace), and ModuleInformation (Info).

You can also start the diagnostic tools, as explained above, on the Run-Test and Run-StartUp pages by pressing the left mouse button on the diagnostic tool icons. If the menus are enabled for the Screens you can also access the Tools menu at run time.

inset_0.jpg 

Module Information

Module Information contains information about the operation of the modules. Select the Devices Module and a specific channel for information about the functioning of the communication channel.

The Read Groups Information provides information about the virtual reading groups, runtime of each item, quantities of readings and readings, that have failed, and also reports on the code and date/time of the last error.

inset_4.jpg 

To use the Module Information:

1.      Go to Read Groups Information to look at the number of Success and Failed communications, to quickly identify the communication blocks.

2.      If you have systematic errors in all blocks or status codes with negative values, typically it means you cannot access the remote device. Verify if the node address is correct.

3.      If you have a block with systematic errors, verify the tags and addresses connected with that block. Use the Trace Window with Device information to collect information about those communication errors.

4.      For some protocols, such as OPC, the Discarded items will show the wrong addresses in the configuration.

When running the Enterprise version in test mode, the system only reads from the field devices, even if you have a configuration to write to field.

You can run the application with online configuration enabled, so you don’t need to start and stop the application when modifying the configuration. You can modify PLC addresses, access types, and most of the application and see the real-time the results on your running application. You can use the Startup window or the PropertyWatch to start and stop only one module, like the Devices, instead of restarting the whole runtime system.

Property Watch

The Property Watch is a diagnostic tool used to access tags and internal properties of the system for reading or writing. Type the name of the property in the Object column and have to see its value in the Value column.

inset_1.jpg 

For example, Tag.Coils, Device.Channel.Modbus.Status. On the right side are additional properties of the selected object.

Trace Window

The Trace Window is a tool that displays system messages in a data grid interface. The messages contain status information (based on Edit > Channels > Settings column) about reads, writes, unsolicited, TX frames (sent), and RX (received).

inset_2.jpg

 


When checking the Devices check box in the Settings, enable only the error, info and warning information, not the debug information, otherwise you will create too much data. For ControlLogix devices, it is very important to use this tool, as the system will display the invalid addresses in the configuration.

Click Settings in the Trace Window to select options for which message types and modules, data format, or to save to file. You can also configure a tag in the Object Name field and click Add to select that object to include on the monitoring.

inset_3.jpg 


By checking the Devices CheckBox in the settings, only enable ERROR, INFO, and alert information, not debug information, otherwise you will create a lot of data. For several devices and protocols it is important to use this tool, since the system will present here possible invalid addresses of the configuration.


Build and Pack Projects

The "build" function is started by pressing the Build icon in the sub-menu panel of the Run desktop. The work area shown below is used for function control.

inset_5.jpg

 

 

Build serves to recompile all project objects and scripts from the project for final verification as to possible errors before putting the project to production.

A complete check of the application logic is made during the preparation of the files for the final production version. This operation is not required during project development, since all modifications are automatically and transparently being compiled into the background while the edits are made.

The workspace has two tabs with informative, non-changeable tables. These are the Build activity reports.

Messages - Which shows the current status of each script and screen with information about potential errors or alerts about logic. If you do not perform a complete "Build", the BuildStatus column in this report shows any warnings or errors encountered during the build process in the background.

Double-click a line with a red X to go to the source code where the line that generated this warning or error is. Warnings are informative and are not intended to run the script. Errors prevent the specified script from running, but do not affect the entire application. If a script or monitor has a warning, it will still run.

 

History - Shows the list of BUILD executions made in this project, informing several details about each of these executions, such as date, error occurrence, product version, user that executed, and others.

References - This is a third tab that should be used to record references to external or user code files used by the scripts defined and used in the project.


Building Projects

Periodically, you should run a full build:

n        When you have made many changes and you want a full validation and recompile of the whole project.

n        When you want to assign a build number to a version.

n        When you want to pack the database. When the build executes, the system creates a backup of the current project file. If you want to save the project as it was for this build, rename the backup file.

n        When you are getting ready to publish, that is, create the read-only runtime application

To build the application:

1.      Go to Run > Build > Messages.

2.      If you want to pack the database, select the Pack Database after Build option.

n        Select this option to significantly reduce the size of the project file. The system creates a file with the backup extension, which is the database before the packing. Typically, you want to pack the database every time you run a build. 

3.      If you want to save all displays, select the Save all Displays when Building option.

n        Be sure to use this option if you have made changes to the symbol library. This option applies to all symbol library changes throughout the project.

4.      Click Build.


When checked, a backup of project connected with that build is automatically created.


References to external codes

In the References tab of the Build menu you can create references to external DLLs or check existing references.

inset_6.jpg

 

To create a reference to an external DLL:

1.      Go to Run> Build> References.

2.      Click the Add DLL reference button. The MS-Windows common window for selecting a file will be displayed.

3.      Navigate to where the DLL is that you want to reference and click on it.

4.      The Reference setting window shown below appears. Type or select information as needed.

inset_7.jpg

 

 

 

 

Coluna

Descrição

Identity

Read Only- The name of the DLL chosen in the file search win­dow

Domain

Select domain for reference use:

l      Server - DLL will be used by scripts on the server

l      Client - DLL will be used by scripts on client machines

l      ServerAndClient - DLL will be used in both domains

Description

Type a description of the reference

Path:

Read Only - Displays the full path where the DLL to which this reference is located.

To check for existing references:

1.      Go to Run> Build> References.

2.      Click the Verify References button.

n        All external DLLs already mentioned in the scripts in the project will be shown in the DataGrid.


Project Version Control


Tracking configuration changes

Action.NET provides many ways to help you to keep track of the project configuration changes:

n        All configuration tables have the DateCreated and the DateModified information.

n        The Run-Build-History shows all Build commands executed to that project. A backup of the project in that state my be available according the user settings.

n        The Info > Track > Tables shows all configuration tables, listing the number of rows and if the tables where changed.

n        The Info > Track > Changes shows all project objects that have been modified. In order to enable or disable that, you must be logged as Administrator. By default, the object tracking is only enabled after you publish the project, but you can enable that anytime, independently of using or not the publish feature.


Publishing the Project

Publishing the project creates a read-only version of the project.

It is NOT necessary to publish the project to install it for production. In scenarios that you intend to have continuous changes to the project in field, it is simpler to put the main project file, TPROJ, directly on the production computer.

The benefits of publishing is that the system created a compacted and real-only version of the project file. The file created has the same name of the project file, with the publish version number and the extension TRUN.

This allows the system to comply with regulated industries.

The typical scenarios to the publish command are:

n        You want to deploy a read-only version of the project, for instance to be in compliance with  certified and regulated environments.

n        You want to use the automatic version numbering system. The result of publishing is a .TENG file that also contains a major (1.0) or minor (0.1) version number as part of the file name. In addition, Info > Track helps you manage the files published to the field, including which project build they are.

n        You want a smaller footprint and faster loading of the project, for instance on machines, OEM and embedded systems. The TRUN file can be up to 5 to 10 times smaller than the TPROJ file.

n        You want to protect the project from modification.


The TRUN file is always read-only, but if the project configuration will not be visible to end-user, it is an independent option defined in the Security System. If you don’t want end-users to see the project configuration remove the permission of the GUEST user and other users to edit the project before publishing it.

To publish the project:

1.      Go to Run > Build > Messages.

2.      Select the desired build settings and Click Build.

3.      Go to Run > Publish.

n        The Current Project Settings fields show the read-only status of the project.

4.      Select the Publish Settings you want.

5.      Click Publish.


Information Runtime Objects

There names a few runtime objects that provide information about running the project.

The Info namespace in the main location for runtime status. The main objects on that namespace are:

Info.Project: information about the project that is running

Info.License: information on the license

Info.Module: Information and start/stop command to Modules

Info.Trace(): displays a message on the TraceWindow

Info.TestMode: shows if the project is running in Test Mode

 

The Server namespace has information about the server computer.

The Client namespace has information about each client computer. running a graphical interface.

See http://www.spinengenharia.com.br/help/an-2016/runtime/index.html for the complete programming reference on runtime objects.