You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This document presents information about the server autostart options.



Introduction

FactoryStudio projects can run several different ways: 

  • Local or Remote manual command
  • On user login
  • Projects as a Service (On Computer PowerUP)
  • Remote OPC Activation

The configuration for these options is a simple radio-box setup. This document describes those options, as well as presents the technical details on the configuration settings applied to the computer, when a selection is name. <<<<please check "when a selection is name". is it correct?>>>>

Projects on Remote Computers

These tools can also setup an Auto-start option in a remote computer. Just connect with a remote ProjectServer. See more information on ProjectServer here.


How to Use

Select the Runtime Autostart Option

You can run the project in any of the following four ways:

None: Projects are started Manually:

  • From the Project Management Tool list. To do this, Select a Project and click the Run button or right-click the project and select Run Project.
  • When you are configuring the project. To do this, go to Run → Startup and click Run Startup.
  • Creating a windows shortcut to start the Project.

Login: Application starts when an user logs in and stops when user logs out

Service: Application run as a Windows Service and starts when the computer powers up

OPC Activation: Application is activated when the first remote OPC client request is received. In order to be fully OPC compliant, we support OPC client activation. However, it is not recommended in many scenarios, as it allows a remote client's connection status to control whether or not the server application is running. 

To set a project to start automatically, use the configuration interface available in the project management tools that are located on the Server tab. 

In “Select runtime auto startup mode”, choose the Service option to run the project as a service when the computer starts, and select which project you want. Finally, click the Apply Settings button.

Server tab options

After completing the configuration, click Apply Settings

Starting Project manually

We recommend that you manually start your project during development and installation because an operator is needed during these stages. Automated startup is more suitable when the project is setup for production. 

Starting Project with an User Login or shortcut

When the second option is selected (Auto-Start with User Login), a shortcut is automatically created and placed on the Windows Startup folder to all users. So when the first user on that computer logs in, the project is started.

This section explains the behind-the-scenes setup that is executed with this option, as well as the details you want to setup that startup shortcut manually. 

Using a Shortcut on Windows Startup

The runtime startup is executed by the program, TStartup.exe.

When using this example, make sure to change the installation path in the script and the FactoryStudio version to the installation on your computer. 

The project is started from a command line window. The following command line parameters are available:

/project: Project Path and Name between double quotes
/username: (optional), username that will be used to start the server. If you do not specify, the user guest will be used.
/redundancy: indicates that the server redundancy is being used (requires ip1 and ip2)
/ip1: IP Address of the Primary FactoryStudio Server
/port1: TCP port of the Primary FactoryStudio Server
/ip2: IP Address of the Secondary FactoryStudio Server
/port2: TCP port of the Secondary FactoryStudio Server
/viewonly: indicates that the project is in view only mode
/wa: indicates that the project uses Windows Authenticatio


The modules that will be started are configured in the project and are located at Run → Startup.

Run Modules options

Examples

"C:\Program Files\Studio\fs-8.1\TStartup.exe"   /project:"C:\Studio Projects\Project1.tproj" 
"C:\Program Files\Studio\fs-8.1\TStartup.exe"   /project:"C:\Studio Projects\Project1.tproj" /port1:3101 
// Server Redundancy:
"C:\Program Files\Studio\fs-8.1\TStartup.exe" /project:"C:\Studio Projects\Project1.tproj" /username:Administrator /redundancy /ip1:192.168.1.1 /port1:3101 /ip2:192.168.1.2 /port2:3101

More information on the parameters for the TStartup application are located here <<<<<<<.  link startup open >>>>>>>>>>>>>>>>>>>>>>

Creating a Windows shortcut

Go to Start → All Programs. Right-click the startup folder, and select Open.

  • In the Startup folder, right-click and select New → Shortcut.
  • In the Create Shortcut window, paste into the field that displays. <<<<.please check this sentence. what should be pasted? all three options above?>>>>
  • If you are not using redundancy, delete the redundancy part of the text.

In the examples below, be sure to change the installation path and version of FactoryStudio to the installation on your computer.

  • Type or paste the full command line. For example: "C:\Program Files\Studio\fs-8.1\TStartup.exe" /project:"C:\Studio Projects\Project1.tproj"
  • Click Next.
  • Enter a name for the shortcut.
  • Click Finish.

The project will automatically start on the next user login if you place that startup icon on the Windows Startup folder. Or you can use the shortcut to start the application manually..

Auto-Start the Project as a Windows Service

When the third second option is selected, Auto-Start running as a Windows Service, the project will start running when the computer powers up. The Windows Service starts the application as soon as the computer is powered on and the Windows Operating System starts, even if no user has logged in to Windows.

The Windows Service can be used on production servers that need different Windows user to login to the computer and keep the server side runtime components running at all times. Use the Windows Service on production servers that are not being used as engineering stations if you need the ability to differentiate between the logged in Windows users while the project is running. 

This section explains the behind-the-scenes setup on the Windows Service that is executed with this option, as well as the details you want to move the Windows Services configuration

Client Displays

When running as a Windows Service, you cannot start the Client Displays, as the service server side components run independently from any user logged in. Refer to Running Displays Clients <<<<< link >>>>>>>>  section of the manual for information on starting client side applications.

Running the Project as a Windows Service

When running the application as a Windows Service, you need to take 4 actions:

  • Setup the Run-time startup: By using the FactoryStudio configuration tools or directly editing the Windows Service system, you define a FactoryStudio project to start as a Windows Service that will run the “server” components of the project. The graphical user interface always runs in a Windows User Mode in the same computer or started in a remote computer.
  • Setup a Web Server: If you want remote access to this project — for project configuration or to access the displays in runtime —, you need to setup a Web Server. This is accomplished with the built-in TWebServer software or with the Microsoft IIS (Internet Information Services). Refer to the <<<<<<<<< this link >>>>>>>>>>> about installing a Web Server 
  • Verify the security settings: Verify the security settings of the Windows Service and the security settings of the project, using this procedure <<<<< ANCHOR >>>>>>. to this page
  • Define the client startup: When a FactoryStudio project is starting as a Windows Service, the Displays will not run, despite the project configuration, due to the restrictions of it running as a service. Therefore, you need to setup the client displays, either in a startup shortcut on the same computer or in a remote computer. Information on starting client displays can be located here <<<<<<<<<<. >>>>>>>>>>>>>>>>>>>>>>>>>


In “Select runtime auto startup mode”, choose the Service option to run the project as a service when the computer starts, and select which project you want. Finally, click the Apply Settings button.

Select the Service option


When the Apply Settings button is clicked. the following actions are automatically executed by the platform 

1)  A Command line, based on the project configuration is created. The whole command line should look something like this:

"C:\ProgramFiles(x86)\Tatsoft\FactoryStudio\fs-8.1\ tStartup.exe" /project:C:\Factory Studio Projects\ <project_name>.tproj /username:<username>

2) A command at the <.NET Framework Install Path> is executed:

installutil <InstallPath>\<fs-version>\TStartupAsService.exe 
Example: C:\Windows\Microsoft.NET\Framework\v2.0.50727>installutil C:\Program files\Tatsoft\FactoryStudio\fs-8.1\ TStartupAsService.exe

3) In the Windows Registry, the following entry is added


"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ TStartup\ImagePath" 
Example: "C:\\tatsoft\fs-8.1\TStartupAsService.exe" "/project:C:\FactoryStudio Projects\Project1.tproj"

4) In the Windows Service (Administrative Tools), the "TStartup Service" is set to automatic, so the selected project will start when the computer starts.


Check the Windows Service Security Settings

Check the Windows Security settings for Log On.

When you setup the project to run as a Windows Service, it will run by default under the built-in “Local System” Window Credentials. For some projects, especially if accessing external databases or folders, you may need to run under a specific user's Windows Security Log On credentials. The configuration is executed in the Windows Service Configuration directly. For most scenarios, the default configuration will suffice.


Optionally, you can delay the start of the service

If the application is using external resources, services, or applications, you may want to delay the start of the project to allow the other services to start first. This is also executed in the Windows Service configuration.


Setup the Security in the Project Configuration  Project

When the application is running as a service, the server components will run under the credentials of the “project user” defined in Run → Startup. By default, the user is a “guest”. For most projects, that user will be changed to Administrator, which will allow the user to make changes to the project with online configuration or have access to all application objects.

Startup tab options



Starting the Module Monitor interfaces

When you start the application in the user mode, you have the TStartup.exe application, which shows a dialog page with all the modules running, and you can start and stop the modules individually using that interface. The application is not visible when the project server (TServer application) is started as a Windows Server.

If you want to access the same interface when running as a service, you need to start the PropertyWatch.exe located in the FactoryStudio installation folder (typically, C:\Program Files (x86)\Tatsoft\FactoryStudio\fs-2014.2\PropertyWatch.exe).

When running as a service, you need to define the parameters /ip1 and /port1 with the computer name or with the computer IP. The default configuration will not allow a connection in this case. You can define other optional parameters, such as /username. E.g.: "C:\Program Files (x86)\Tatsoft\FactoryStudio\fs-2016.2\PropertyWatch.exe" /ip1:W10-VS /username: Administrator

Another way to start these tools is to open the project configuration, Run Startup, and click the connect button. This will enable a button on that dialog that will open the monitoring Tools.


In order to setup Microsoft IIS, see the project documentation.


In this section...

The root page @parent could not be found in space v10.

  • No labels